From d6a6e573fb5ce08cc9b309ba2df98ba193794e55 Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Fri, 24 Jul 2026 12:13:39 -0400 Subject: [PATCH 1/8] go.mod: bump k8s packages to v0.36 Bump k8s packages and necessary dependencies to v0.36. --- go.mod | 225 ++++++++++++------------- go.sum | 510 ++++++++++++++++++++++++++------------------------------- 2 files changed, 338 insertions(+), 397 deletions(-) diff --git a/go.mod b/go.mod index 002a44f29f..dd3bee5f77 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,15 @@ module github.com/openshift/installer -go 1.25.8 +go 1.26.0 require ( - cloud.google.com/go/kms v1.22.0 - cloud.google.com/go/monitoring v1.24.2 - cloud.google.com/go/storage v1.57.0 + cloud.google.com/go/kms v1.25.0 + cloud.google.com/go/monitoring v1.24.3 + cloud.google.com/go/storage v1.58.0 github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Azure/azure-sdk-for-go v68.0.0+incompatible - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.7.0 @@ -22,44 +22,44 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3 github.com/Azure/go-autorest/autorest v0.11.30 github.com/Azure/go-autorest/autorest/to v0.4.0 github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16 - github.com/IBM-Cloud/power-go-client v1.12.0 - github.com/IBM/go-sdk-core/v5 v5.21.0 - github.com/IBM/ibm-cos-sdk-go v1.12.3 + github.com/IBM-Cloud/power-go-client v1.14.4 + github.com/IBM/go-sdk-core/v5 v5.21.2 + github.com/IBM/ibm-cos-sdk-go v1.12.4 github.com/IBM/keyprotect-go-client v0.12.2 - github.com/IBM/networking-go-sdk v0.51.11 - github.com/IBM/platform-services-go-sdk v0.86.1 - github.com/IBM/vpc-go-sdk v0.71.2 + github.com/IBM/networking-go-sdk v0.51.15 + github.com/IBM/platform-services-go-sdk v0.91.0 + github.com/IBM/vpc-go-sdk v0.76.2 github.com/apparentlymart/go-cidr v1.1.0 github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e github.com/clarketm/json v1.14.1 - github.com/coreos/ignition/v2 v2.24.0 + github.com/coreos/ignition/v2 v2.25.0 github.com/coreos/stream-metadata-go v0.4.10-0.20250806142651-4a7d280a6c7b github.com/daixiang0/gci v0.13.5 github.com/digitalocean/go-libvirt v0.0.0-20240220204746-fcabe97a6eed github.com/diskfs/go-diskfs v1.7.1-0.20251217162235-58541aa8f559 github.com/form3tech-oss/jwt-go v3.2.3+incompatible github.com/go-logr/logr v1.4.3 - github.com/go-openapi/errors v0.22.1 + github.com/go-openapi/errors v0.22.4 github.com/go-openapi/runtime v0.28.0 - github.com/go-openapi/strfmt v0.23.0 + github.com/go-openapi/strfmt v0.25.0 github.com/go-openapi/swag v0.25.4 github.com/go-openapi/validate v0.24.0 - github.com/go-playground/validator/v10 v10.27.0 + github.com/go-playground/validator/v10 v10.28.0 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 - github.com/googleapis/gax-go/v2 v2.15.0 - github.com/gophercloud/gophercloud/v2 v2.8.0 + github.com/googleapis/gax-go/v2 v2.17.0 + github.com/gophercloud/gophercloud/v2 v2.10.0 github.com/gophercloud/utils/v2 v2.0.0-20250212084022-725b94822eeb github.com/h2non/filetype v1.0.12 github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/go-version v1.8.0 + github.com/hashicorp/go-version v1.9.0 github.com/jarcoal/httpmock v1.3.1 github.com/jongio/azidext/go/azidext v0.5.0 github.com/kdomanski/iso9660 v0.2.1 @@ -67,12 +67,12 @@ require ( github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.4.0 github.com/microsoft/kiota-authentication-azure-go v1.3.0 github.com/microsoftgraph/msgraph-sdk-go v0.59.0 - github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0 - github.com/nutanix-cloud-native/prism-go-client v0.5.0 - github.com/onsi/gomega v1.39.1 - github.com/openshift/api v0.0.0-20260624092907-2259ae9f1483 + github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.10.3 + github.com/nutanix-cloud-native/prism-go-client v0.8.0 + github.com/onsi/gomega v1.42.0 + github.com/openshift/api v0.0.0-20260724095150-18550f1a6d13 github.com/openshift/assisted-image-service v0.0.0-20260428115106-2b81dd8e7120 - github.com/openshift/assisted-service/api v0.0.0 + github.com/openshift/assisted-service/api v0.0.0-20260722223301-f50c5b20c7e1 github.com/openshift/assisted-service/client v0.0.0 github.com/openshift/assisted-service/models v0.0.0 github.com/openshift/client-go v0.0.0-20260603140539-6892dc3e1ffc @@ -80,7 +80,7 @@ require ( github.com/openshift/cluster-api-provider-baremetal v0.0.0-20220408122422-7a548effc26e github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20230308152226-83c0473d4429 github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20220323121149-e3f2850dd519 - github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27 + github.com/openshift/hive/apis v0.0.0-20260415205034-aa1db747a6ba github.com/openshift/library-go v0.0.0-20260505113324-de46cb8e2ddc github.com/openshift/machine-api-provider-gcp v0.0.1-0.20260113091719-80740861bb2a github.com/openshift/machine-api-provider-ibmcloud v0.0.0-20231207164151-6b0b8ea7b16d @@ -90,11 +90,11 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.10 github.com/prometheus/client_golang v1.23.2 - github.com/prometheus/common v0.67.4 + github.com/prometheus/common v0.67.5 github.com/rogpeppe/go-internal v1.14.1 github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd github.com/sirupsen/logrus v1.9.4 - github.com/spf13/cobra v1.10.1 + github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 github.com/thedevsaddam/retry v0.0.0-20200324223450-9769a859cc6d github.com/thoas/go-funk v0.9.3 @@ -103,41 +103,41 @@ require ( github.com/vmware/govmomi v0.53.0 go.podman.io/image/v5 v5.37.0 go.uber.org/mock v0.6.0 - golang.org/x/crypto v0.52.0 - golang.org/x/oauth2 v0.34.0 - golang.org/x/sync v0.20.0 - golang.org/x/sys v0.45.0 - golang.org/x/term v0.43.0 - golang.org/x/text v0.37.0 - google.golang.org/api v0.255.0 - google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 - google.golang.org/grpc v1.79.3 - gopkg.in/ini.v1 v1.67.0 + golang.org/x/crypto v0.53.0 + golang.org/x/oauth2 v0.36.0 + golang.org/x/sync v0.21.0 + golang.org/x/sys v0.46.0 + golang.org/x/term v0.44.0 + golang.org/x/text v0.38.0 + google.golang.org/api v0.267.0 + google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 + google.golang.org/grpc v1.80.0 + gopkg.in/ini.v1 v1.67.3 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.35.1 - k8s.io/apiextensions-apiserver v0.35.1 - k8s.io/apimachinery v0.35.1 - k8s.io/client-go v0.35.1 - k8s.io/code-generator v0.35.1 + k8s.io/api v0.36.2 + k8s.io/apiextensions-apiserver v0.36.0 + k8s.io/apimachinery v0.36.2 + k8s.io/client-go v0.36.0 + k8s.io/code-generator v0.36.0 k8s.io/klog v1.0.0 k8s.io/klog/v2 v2.140.0 k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 libvirt.org/go/libvirtxml v1.10002.0 - sigs.k8s.io/cluster-api v1.12.8 - sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.1-0.20260226000023-67627b2da0df - sigs.k8s.io/cluster-api-provider-azure v1.21.1-0.20250929163617-2c4eaa611a39 - sigs.k8s.io/cluster-api-provider-gcp v1.10.1-0.20251030112604-5c2bfd5aadb3 - sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.2 - sigs.k8s.io/cluster-api-provider-openstack v0.13.0 - sigs.k8s.io/cluster-api-provider-vsphere v1.14.0 - sigs.k8s.io/controller-runtime v0.22.5 + sigs.k8s.io/cluster-api v1.13.4 + sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1 + sigs.k8s.io/cluster-api-provider-azure v1.24.2 + sigs.k8s.io/cluster-api-provider-gcp v1.12.0 + sigs.k8s.io/cluster-api-provider-ibmcloud v0.13.1 + sigs.k8s.io/cluster-api-provider-openstack v0.14.6 + sigs.k8s.io/cluster-api-provider-vsphere v1.15.3 + sigs.k8s.io/controller-runtime v0.24.1 sigs.k8s.io/controller-tools v0.19.0 sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 sigs.k8s.io/yaml v1.6.0 ) require ( - github.com/aws/aws-sdk-go-v2 v1.41.2 + github.com/aws/aws-sdk-go-v2 v1.41.5 github.com/aws/aws-sdk-go-v2/config v1.32.10 github.com/aws/aws-sdk-go-v2/credentials v1.19.10 github.com/aws/aws-sdk-go-v2/service/ec2 v1.292.0 @@ -146,21 +146,21 @@ require ( github.com/aws/aws-sdk-go-v2/service/iam v1.53.3 github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.31.7 github.com/aws/aws-sdk-go-v2/service/route53 v1.62.2 - github.com/aws/aws-sdk-go-v2/service/s3 v1.96.1 + github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 github.com/aws/aws-sdk-go-v2/service/servicequotas v1.34.2 github.com/aws/aws-sdk-go-v2/service/sts v1.41.7 - github.com/aws/smithy-go v1.24.1 + github.com/aws/smithy-go v1.24.2 ) require github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0 -require github.com/k-orc/openstack-resource-controller/v2 v2.3.0 +require github.com/k-orc/openstack-resource-controller/v2 v2.4.0 require ( cel.dev/expr v0.25.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0 // indirect github.com/anchore/go-lzo v0.1.0 // indirect github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4 // indirect github.com/aws/aws-sdk-go-v2/service/signin v1.0.6 // indirect @@ -168,6 +168,7 @@ require ( github.com/djherbis/times v1.6.0 // indirect github.com/envoyproxy/go-control-plane/envoy v1.36.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-openapi/swag/cmdutils v0.25.4 // indirect github.com/go-openapi/swag/conv v0.25.4 // indirect @@ -180,6 +181,7 @@ require ( github.com/go-openapi/swag/stringutils v0.25.4 // indirect github.com/go-openapi/swag/typeutils v0.25.4 // indirect github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/golangci/plugin-module-register v0.1.2 // indirect github.com/klauspost/compress v1.18.0 // indirect github.com/moby/sys/capability v0.4.0 // indirect @@ -187,23 +189,23 @@ require ( github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect - go.opentelemetry.io/otel/sdk v1.40.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect + go.opentelemetry.io/otel/sdk v1.43.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect go.podman.io/storage v1.60.0 // indirect - go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/tools/godoc v0.1.0-deprecated // indirect - sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.4.0 // indirect ) require ( - cloud.google.com/go v0.121.6 // indirect - cloud.google.com/go/auth v0.17.0 // indirect + cloud.google.com/go v0.123.0 // indirect + cloud.google.com/go/auth v0.18.1 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect cloud.google.com/go/iam v1.5.3 // indirect - cloud.google.com/go/longrunning v0.6.7 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect + cloud.google.com/go/longrunning v0.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect @@ -211,24 +213,22 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.2 // indirect github.com/Azure/go-autorest/tracing v0.6.1 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect github.com/BurntSushi/toml v1.5.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/PaesslerAG/gval v1.0.0 // indirect github.com/PaesslerAG/jsonpath v0.1.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.5 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.32.0 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.18 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.18 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.30.11 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.15 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -238,7 +238,7 @@ require ( github.com/chai2010/gettext-go v1.0.2 // indirect github.com/coreos/go-json v0.0.0-20230131223807-18775e0fb4fb // indirect github.com/coreos/go-semver v0.3.1 // indirect - github.com/coreos/go-systemd/v22 v22.6.0 // indirect + github.com/coreos/go-systemd/v22 v22.7.0 // indirect github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect @@ -246,15 +246,15 @@ require ( github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/fatih/color v1.18.0 // indirect + github.com/fatih/color v1.19.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect + github.com/gabriel-vasile/mimetype v1.4.11 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/jsonpointer v0.21.1 // indirect + github.com/go-openapi/jsonpointer v0.22.3 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/loads v0.22.0 // indirect github.com/go-openapi/spec v0.21.0 // indirect @@ -264,19 +264,15 @@ require ( github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gofrs/uuid/v5 v5.3.0 // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect - github.com/golang/mock v1.7.0-rc.1 // indirect github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/s2a-go v0.1.9 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.8 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/itchyny/gojq v0.12.9 // indirect - github.com/itchyny/timefmt-go v0.1.4 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -297,7 +293,6 @@ require ( github.com/microsoft/kiota-serialization-text-go v1.1.2 // indirect github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/sys/mountinfo v0.7.2 // indirect github.com/moby/sys/user v0.4.0 // indirect github.com/moby/term v0.5.2 // indirect @@ -318,45 +313,45 @@ require ( github.com/pkg/xattr v0.4.9 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/procfs v0.19.2 // indirect + github.com/prometheus/procfs v0.20.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.mongodb.org/mongo-driver v1.17.4 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 // indirect - go.opentelemetry.io/otel v1.40.0 // indirect - go.opentelemetry.io/otel/metric v1.40.0 // indirect - go.opentelemetry.io/otel/trace v1.40.0 // indirect + go.opentelemetry.io/otel v1.43.0 // indirect + go.opentelemetry.io/otel/metric v1.43.0 // indirect + go.opentelemetry.io/otel/trace v1.43.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.1 // indirect - golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect - golang.org/x/mod v0.35.0 - golang.org/x/net v0.54.0 // indirect + golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect + golang.org/x/mod v0.36.0 + golang.org/x/net v0.55.0 // indirect golang.org/x/time v0.14.0 // indirect - golang.org/x/tools v0.44.0 // indirect + golang.org/x/tools v0.45.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect - google.golang.org/protobuf v1.36.11 // indirect + google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect + google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/gcfg.v1 v1.2.3 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gorm.io/gorm v1.24.5 // indirect - k8s.io/apiserver v0.35.1 // indirect - k8s.io/cli-runtime v0.35.1 // indirect - k8s.io/cluster-bootstrap v0.34.2 // indirect - k8s.io/component-base v0.35.1 // indirect + k8s.io/apiserver v0.36.0 // indirect + k8s.io/cli-runtime v0.36.0 // indirect + k8s.io/cluster-bootstrap v0.35.5 // indirect + k8s.io/component-base v0.36.0 // indirect k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect k8s.io/kube-openapi v0.0.0-20260519202549-bbf5c5577288 // indirect - k8s.io/kubectl v0.35.1 // indirect - sigs.k8s.io/kustomize/api v0.20.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect + k8s.io/kubectl v0.36.0 // indirect + sigs.k8s.io/kustomize/api v0.21.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect sigs.k8s.io/randfill v1.0.0 // indirect ) @@ -368,24 +363,14 @@ replace ( k8s.io/cloud-provider-vsphere => github.com/openshift/cloud-provider-vsphere v1.19.1-0.20240626105621-6464d0bb4928 ) -replace github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20250922204150-a52b83145bea +replace github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20260722223301-f50c5b20c7e1 -replace github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20250922204150-a52b83145bea +replace github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20260722223301-f50c5b20c7e1 -replace github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20250922204150-a52b83145bea +replace github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20260722223301-f50c5b20c7e1 // https://issues.redhat.com/browse/OCPBUGS-8119 // https://issues.redhat.com/browse/OCPBUGS-27507 replace github.com/containerd/containerd => github.com/containerd/containerd v1.6.26 replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 - -// This is to force capi back for the older provider version -replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.3 - -// Temporary vendoring of upstream providers while they work to update to capi v1.11, which contains breaking changes -// See: https://issues.redhat.com/browse/CORS-4262 -replace ( - github.com/nutanix-cloud-native/cluster-api-provider-nutanix => github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.2-0.20251007022949-442bc2ebe286 - sigs.k8s.io/cluster-api-provider-azure => github.com/mboersma/cluster-api-provider-azure v0.3.1-0.20251030205607-3161b9cc8d3e -) diff --git a/go.sum b/go.sum index f0edf9d094..54aab098c9 100644 --- a/go.sum +++ b/go.sum @@ -5,30 +5,28 @@ cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.121.6 h1:waZiuajrI28iAf40cWgycWNgaXPO06dupuS+sgibK6c= -cloud.google.com/go v0.121.6/go.mod h1:coChdst4Ea5vUpiALcYKXEpR1S9ZgXbhEzzMcMR66vI= -cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4= -cloud.google.com/go/auth v0.17.0/go.mod h1:6wv/t5/6rOPAX4fJiRjKkJCvswLwdet7G8+UGXt7nCQ= +cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE= +cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU= +cloud.google.com/go/auth v0.18.1 h1:IwTEx92GFUo2pJ6Qea0EU3zYvKnTAeRCODxfA/G5UWs= +cloud.google.com/go/auth v0.18.1/go.mod h1:GfTYoS9G3CWpRA3Va9doKN9mjPGRS+v41jmZAhBzbrA= cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc= cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU= -cloud.google.com/go/kms v1.22.0 h1:dBRIj7+GDeeEvatJeTB19oYZNV0aj6wEqSIT/7gLqtk= -cloud.google.com/go/kms v1.22.0/go.mod h1:U7mf8Sva5jpOb4bxYZdtw/9zsbIjrklYwPcvMk34AL8= -cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= -cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA= -cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= -cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= -cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM= -cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U= -cloud.google.com/go/storage v1.57.0 h1:4g7NB7Ta7KetVbOMpCqy89C+Vg5VE8scqlSHUPm7Rds= -cloud.google.com/go/storage v1.57.0/go.mod h1:329cwlpzALLgJuu8beyJ/uvQznDHpa2U5lGjWednkzg= -cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4= -cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI= -dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= -dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= +cloud.google.com/go/kms v1.25.0 h1:gVqvGGUmz0nYCmtoxWmdc1wli2L1apgP8U4fghPGSbQ= +cloud.google.com/go/kms v1.25.0/go.mod h1:XIdHkzfj0bUO3E+LvwPg+oc7s58/Ns8Nd8Sdtljihbk= +cloud.google.com/go/logging v1.13.1 h1:O7LvmO0kGLaHY/gq8cV7T0dyp6zJhYAOtZPX4TF3QtY= +cloud.google.com/go/logging v1.13.1/go.mod h1:XAQkfkMBxQRjQek96WLPNze7vsOmay9H5PqfsNYDqvw= +cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8= +cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk= +cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE= +cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI= +cloud.google.com/go/storage v1.58.0 h1:PflFXlmFJjG/nBeR9B7pKddLQWaFaRWx4uUi/LyNxxo= +cloud.google.com/go/storage v1.58.0/go.mod h1:cMWbtM+anpC74gn6qjLh+exqYcfmB9Hqe5z6adx+CLI= +cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U= +cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s= github.com/4meepo/tagalign v1.4.2 h1:0hcLHPGMjDyM1gHG58cS73aQF8J4TdVR96TZViorO9E= github.com/4meepo/tagalign v1.4.2/go.mod h1:+p4aMyFM+ra7nb41CnFG6aSDXqRxU/w1VQqScKqDARI= github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= @@ -43,14 +41,14 @@ github.com/Antonboom/testifylint v1.5.2 h1:4s3Xhuv5AvdIgbd8wOOEeo0uZG7PbDKQyKY5l github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBgQ4+mhCojwC1P8= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 h1:5YTBM8QDVIBN3sxBil89WfdAAqDZbyJTgh688DSxX5w= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1/go.mod h1:YD5h/ldMsG0XiIw7PdyNhLxaM317eFh5yNLccNfGdyw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0 h1:KpMC6LFL7mqpExyMC9jVOYRiVhLmamjeZfRsUpB7l4s= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0/go.mod h1:J7MUC/wtRpfGVbQ5sIItY5/FuVWmvzlY21WAOfQnq/I= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1 h1:jHb/wfvRikGdxMXYV3QG/SzUOPYN9KEUUuC0Yd0/vC0= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1/go.mod h1:pzBXCYn05zvYIrwLgtK8Ap8QcjRg+0i76tMQdWN6wOk= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1/go.mod h1:IYus9qsFobWIc2YVwe/WPjcnyCkPKtnHAqUYeebc8z0= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 h1:9iefClla7iYpfYWdzPCRDozdmndjTm8DXdpCzPajMgA= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2/go.mod h1:XtLgD3ZD34DAaVIIAyG3objl5DynM3CQ/vMcbBNJZGI= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 h1:fhqpLE3UEXi9lPaBRpQ6XuRW0nU7hgg4zlmZZa+a9q4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0/go.mod h1:7dCRMLwisfRH3dBupKeNCioWYUZ4SS09Z14H+7i8ZoY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2 h1:qiir/pptnHqp6hV8QwV+IExYIf6cPsXBfUDUXQ27t2Y= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3 v3.0.0-beta.2/go.mod h1:jVRrRDLCOuif95HDYC23ADTMlvahB7tMdl519m9Iyjc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0 h1:/Di3vB4sNeQ+7A8efjUVENvyB945Wruvstucqp7ZArg= @@ -85,10 +83,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1. github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1 h1:/Zt+cDPnpC3OVDm/JKLOs7M2DKmLRIIp3XIx9pHHiig= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.8.1/go.mod h1:Ng3urmn6dYe8gnbCMoHHVl5APYz2txho3koEkV2o2HA= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2 h1:FwladfywkNirM+FZYLBR2kBz5C8Tg0fw5w5Y7meRXWI= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.2/go.mod h1:vv5Ad0RrIoT1lJFdWBZwt4mB1+j+V8DUroixmKDTCdk= -github.com/Azure/azure-service-operator/v2 v2.13.0 h1:24xDkuGOjSDKKkthECRo/I76slmlt3u0buYQ4rvX3pQ= -github.com/Azure/azure-service-operator/v2 v2.13.0/go.mod h1:3xfZMZm4yjdcjr3lh1kWqP2dtvZS/nCy7wpNERYDatg= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3 h1:ZJJNFaQ86GVKQ9ehwqyAFE6pIfyicpuJ8IkVaPBc6/4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3/go.mod h1:URuDvhmATVKqHBH9/0nOiNKk0+YcwfQ3WkK5PqHKxc8= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -117,8 +113,8 @@ github.com/Azure/go-autorest/tracing v0.6.1 h1:YUMSrC/CeD1ZnnXcNYU4a/fzsO35u2Fsf github.com/Azure/go-autorest/tracing v0.6.1/go.mod h1:/3EgjbsjraOqiicERAeu3m7/z0x1TzjQGAwDrJrXGkc= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 h1:XkkQbfMyuH2jTSjQjSoihryI8GINRcs4xp8lNawg0FI= -github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs= +github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= @@ -128,38 +124,34 @@ github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rW github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 h1:Sz1JIXEcSfhz7fUi7xHnhpIE0thVASYjvosApmHuD2k= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1/go.mod h1:n/LSCXNuIYqVfBlVXyHfMQkZDdp1/mmxfSjADd3z1Zg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 h1:owcC2UnmsZycprQ5RfRgjydWhuoxg71LUfyiQdijZuM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0/go.mod h1:ZPpqegjbE99EPKsu3iUWV22A04wzGPcAY/ziSIQEEgs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0 h1:4LP6hvB4I5ouTbGgWtixJhgED6xdf67twf9PoY96Tbg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.53.0/go.mod h1:jUZ5LYlw40WMd07qxcQJD5M40aUxrfwqQX1g7zxYnrQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 h1:Ron4zCA/yk6U7WOBXhTJcDpsUBG9npumK6xw2auFltQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0/go.mod h1:cSgYe11MCNYunTnRXrKiR/tHc0eoKjICUuWpNZoVCOo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0 h1:lhhYARPUu3LmHysQ/igznQphfzynnqI3D75oUyw1HXk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.54.0/go.mod h1:l9rva3ApbBpEJxSNYnwT9N4CDLrWgtq3u8736C5hyJw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.54.0 h1:xfK3bbi6F2RDtaZFtUdKO3osOBIhNb+xTs8lFW6yx9o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.54.0/go.mod h1:vB2GH9GAYYJTO3mEn8oYwzEdhlayZIdQz6zdzgUIRvA= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0 h1:s0WlVbf9qpvkh1c/uDAPElam0WrL7fHRIidgZJ7UqZI= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.54.0/go.mod h1:Mf6O40IAyB9zR/1J8nGDDPirZQQPbYJni8Yisy7NTMc= github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16 h1:kSfKKawp3hYDcjV+d+qcadWfFsCNHDCgklOUnVMle+I= github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16/go.mod h1:q0fXFSbum/16D8Mgn1ROSfSyX4BmvBCm/hHdcXz0wCU= -github.com/IBM-Cloud/power-go-client v1.12.0 h1:tF9Mq5GLYHebpzQT6IYB89lIxEST1E9teuchjxSAaw0= -github.com/IBM-Cloud/power-go-client v1.12.0/go.mod h1:SpTK1ttW8bfMNUVQS8qOEuWn2KOkzaCLyzfze8MG1JE= -github.com/IBM/go-sdk-core/v5 v5.21.0 h1:DUnYhvC4SoC8T84rx5omnhY3+xcQg/Whyoa3mDPIMkk= -github.com/IBM/go-sdk-core/v5 v5.21.0/go.mod h1:Q3BYO6iDA2zweQPDGbNTtqft5tDcEpm6RTuqMlPcvbw= -github.com/IBM/ibm-cos-sdk-go v1.12.3 h1:kMIs1nfPY0UXAMcW6bq8O9WOd6KgqiDBnIMd0e/fMqA= -github.com/IBM/ibm-cos-sdk-go v1.12.3/go.mod h1:dt13UIqJRgfGIlSNlnf17JmAXlBXhfTgXLKV3as8ABk= +github.com/IBM-Cloud/power-go-client v1.14.4 h1:XXQp4atVwvCfDps1nF5zyi2FzNbsuHtszz5nBJ9yCYg= +github.com/IBM-Cloud/power-go-client v1.14.4/go.mod h1:TT0jJbptQuDRwB9PPYDcGe0ZwFSl5GiSrNuQeJzJYco= +github.com/IBM/go-sdk-core/v5 v5.21.2 h1:mJ5QbLPOm4g5qhZiVB6wbSllfpeUExftGoyPek2hk4M= +github.com/IBM/go-sdk-core/v5 v5.21.2/go.mod h1:ngpMgwkjur1VNUjqn11LPk3o5eCyOCRbcfg/0YAY7Hc= +github.com/IBM/ibm-cos-sdk-go v1.12.4 h1:XUxGUQoqNH6Cpa/eSItbRhVRdmDIsd9jCTMeTVh1siE= +github.com/IBM/ibm-cos-sdk-go v1.12.4/go.mod h1:s4abN0Kllr83a/aI5KEjNY6fZCQK4apt2w4QjVD0PU0= github.com/IBM/keyprotect-go-client v0.12.2 h1:Cjxcqin9Pl0xz3MnxdiVd4v/eIa79xL3hQpSbwOr/DQ= github.com/IBM/keyprotect-go-client v0.12.2/go.mod h1:yr8h2noNgU8vcbs+vhqoXp3Lmv73PI0zAc6VMgFvWwM= -github.com/IBM/networking-go-sdk v0.51.11 h1:l+yMXcO9GDcb7JU9jl8riUOXjnHTvIKSLnXYFlYlKXo= -github.com/IBM/networking-go-sdk v0.51.11/go.mod h1:TAXWyBUk3C3R7aS1m84EfKdnDcBMZMAClwLfDj/SYZc= -github.com/IBM/platform-services-go-sdk v0.86.1 h1:ngBpaXvUF3gmLvbU1Z4lX1wowOSYgGoKBEBaR/urt30= -github.com/IBM/platform-services-go-sdk v0.86.1/go.mod h1:aGD045m6I8pfcB77wft8w2cHqWOJjcM3YSSV55BX0Js= -github.com/IBM/vpc-go-sdk v0.71.2 h1:VYPiOp1k0/zbN23agxvmr1nfDibjPhIjee0UNhvF2dE= -github.com/IBM/vpc-go-sdk v0.71.2/go.mod h1:K3vVlje72PYE3ZRt1iouE+jSIq+vCyYzT1HiFC06hUA= +github.com/IBM/networking-go-sdk v0.51.15 h1:JEljJvjUYeSL5F091sI3kZzD9wZYDWsnnKJIoR47XNk= +github.com/IBM/networking-go-sdk v0.51.15/go.mod h1:TAXWyBUk3C3R7aS1m84EfKdnDcBMZMAClwLfDj/SYZc= +github.com/IBM/platform-services-go-sdk v0.91.0 h1:5o4XotMmP9UfCg9BKG0cx/pTAMhBh0KzjyFQQyHZTgE= +github.com/IBM/platform-services-go-sdk v0.91.0/go.mod h1:KAnBhxKaYsu9It2aVXV6oCPEj78imvTs2qSG0ScZKpM= +github.com/IBM/vpc-go-sdk v0.76.2 h1:bZ6aHA1X69Ekn9rxd5XyjxuV9dwEneamEPYojDPHZdA= +github.com/IBM/vpc-go-sdk v0.76.2/go.mod h1:hhgE1EQZRq1Cngdh4A6+LLUaA0kKWW/rgfHpISM+AKg= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= -github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= @@ -192,10 +184,6 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23 h1:I+Cy77zrFmVWIHOZaxiNV4L7w9xuVux9LMqAblGzvdE= -github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23/go.mod h1:S7DsXubvw3xBC8rSI+qmzcTNw7xEND0ojHPqglh/whY= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.2.0 h1:/2Lp1bypdmK9wDIq7uWBlDF1iMUpIIS4A+pF6C9IEUU= @@ -203,24 +191,24 @@ github.com/ashanbrown/makezero v1.2.0/go.mod h1:dxlPhHbDMC6N6xICzFBSK+4njQDdK8eu github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab h1:+cdNqtOJWjvepyhxy23G7z7vmpYCoC65AP0nqi1f53s= github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go-v2 v1.41.2 h1:LuT2rzqNQsauaGkPK/7813XxcZ3o3yePY0Iy891T2ls= -github.com/aws/aws-sdk-go-v2 v1.41.2/go.mod h1:IvvlAZQXvTXznUPfRVfryiG1fbzE2NGK6m9u39YQ+S4= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.5 h1:zWFmPmgw4sveAYi1mRqG+E/g0461cJ5M4bJ8/nc6d3Q= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.5/go.mod h1:nVUlMLVV8ycXSb7mSkcNu9e3v/1TJq2RTlrPwhYWr5c= +github.com/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY= +github.com/aws/aws-sdk-go-v2 v1.41.5/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= github.com/aws/aws-sdk-go-v2/config v1.32.10 h1:9DMthfO6XWZYLfzZglAgW5Fyou2nRI5CuV44sTedKBI= github.com/aws/aws-sdk-go-v2/config v1.32.10/go.mod h1:2rUIOnA2JaiqYmSKYmRJlcMWy6qTj1vuRFscppSBMcw= github.com/aws/aws-sdk-go-v2/credentials v1.19.10 h1:EEhmEUFCE1Yhl7vDhNOI5OCL/iKMdkkYFTRpZXNw7m8= github.com/aws/aws-sdk-go-v2/credentials v1.19.10/go.mod h1:RnnlFCAlxQCkN2Q379B67USkBMu1PipEEiibzYN5UTE= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.18 h1:Ii4s+Sq3yDfaMLpjrJsqD6SmG/Wq/P5L/hw2qa78UAY= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.18/go.mod h1:6x81qnY++ovptLE6nWQeWrpXxbnlIex+4H4eYYGcqfc= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.18 h1:F43zk1vemYIqPAwhjTjYIz0irU2EY7sOb/F5eJ3HuyM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.18/go.mod h1:w1jdlZXrGKaJcNoL+Nnrj+k5wlpGXqnNrKoP22HvAug= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.18 h1:xCeWVjj0ki0l3nruoyP2slHsGArMxeiiaoPN5QZH6YQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.18/go.mod h1:r/eLGuGCBw6l36ZRWiw6PaZwPXb6YOj+i/7MizNl5/k= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 h1:Rgg6wvjjtX8bNHcvi9OnXWwcE0a2vGpbwmtICOsvcf4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21/go.mod h1:A/kJFst/nm//cyqonihbdpQZwiUhhzpqTsdbhDdRF9c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 h1:PEgGVtPoB6NTpPrBgqSE5hE/o47Ij9qk/SEZFbUOe9A= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21/go.mod h1:p+hz+PRAYlY3zcpJhPwXlLC4C+kqn70WIHwnzAfs6ps= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.18 h1:eZioDaZGJ0tMM4gzmkNIO2aAoQd+je7Ug7TkvAzlmkU= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.18/go.mod h1:CCXwUKAJdoWr6/NcxZ+zsiPr6oH/Q5aTooRGYieAyj4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 h1:rWyie/PxDRIdhNf4DzRk0lvjVOqFJuNnO8WwaIRVxzQ= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22/go.mod h1:zd/JsJ4P7oGfUhXn1VyLqaRZwPmZwg44Jf2dS84Dm3Y= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4 h1:nM1+AHCnpGbYzOCcWi4Q7IDCH/Hh3LJ+146rcI184nU= github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4/go.mod h1:GM6Olux4KAMUmRw0XgadfpN1cOpm5eWYZ31PAj59JSk= github.com/aws/aws-sdk-go-v2/service/ec2 v1.292.0 h1:c8oOvevYldh01vKkrbb8db09iBA3A60c/FGAkntFAPg= @@ -233,20 +221,20 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.54.7 h1:txeoy+BxL github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.54.7/go.mod h1:tv2v97S1V5kkp/1vneSYad5Cnrbo+4vfiNNAKCWNKIk= github.com/aws/aws-sdk-go-v2/service/iam v1.53.3 h1:boKZv8dNdHznhAA68hb/dqFz5pxoWmRAOJr9LtscVCI= github.com/aws/aws-sdk-go-v2/service/iam v1.53.3/go.mod h1:E0QHh3aEwxYb7xshjvxYDELiOda7KBYJ77e/TvGhpcM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.5 h1:CeY9LUdur+Dxoeldqoun6y4WtJ3RQtzk0JMP2gfUay0= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.5/go.mod h1:AZLZf2fMaahW5s/wMRciu1sYbdsikT/UHwbUjOdEVTc= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.9 h1:IJRzQTvdpjHRPItx9gzNcz7Y1F+xqAR+xiy9rr5ZYl8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.9/go.mod h1:Kzm5e6OmNH8VMkgK9t+ry5jEih4Y8whqs+1hrkxim1I= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.18 h1:LTRCYFlnnKFlKsyIQxKhJuDuA3ZkrDQMRYm6rXiHlLY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.18/go.mod h1:XhwkgGG6bHSd00nO/mexWTcTjgd6PjuvWQMqSn2UaEk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.18 h1:/A/xDuZAVD2BpsS2fftFRo/NoEKQJ8YTnJDEHBy2Gtg= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.18/go.mod h1:hWe9b4f+djUQGmyiGEeOnZv69dtMSgpDRIvNMvuvzvY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 h1:5EniKhLZe4xzL7a+fU3C2tfUN4nWIqlLesfrjkuPFTY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 h1:c31//R3xgIJMSC8S6hEVq+38DcvUlgFY0FM6mSI5oto= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21/go.mod h1:r6+pf23ouCB718FUxaqzZdbpYFyDtehyZcmP5KL9FkA= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.31.7 h1:LCDgcvi3ARfY0IOcyajMcTuxQZR9hIaMh98SUicIR9I= github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.31.7/go.mod h1:E/8k79pXzulHpFgysGxqS2wQvEpgVcbq8G7NJGm8NFA= github.com/aws/aws-sdk-go-v2/service/route53 v1.62.2 h1:zoD/SoiVQi8l8tuQn//VexrXS2yorg/+717JNA4Ble8= github.com/aws/aws-sdk-go-v2/service/route53 v1.62.2/go.mod h1:Ll1DCasPTBFtHK5t/U5WIwGIyRuY3xY+x8/LmqIlqpM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.96.1 h1:giB30dEeoar5bgDnkE0q+z7cFjcHaCjulpmPVmuKR84= -github.com/aws/aws-sdk-go-v2/service/s3 v1.96.1/go.mod h1:071TH4M3botFLWDbzQLfBR7tXYi7Fs2RsXSiH7nlUlY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 h1:HwxWTbTrIHm5qY+CAEur0s/figc3qwvLWsNkF4RPToo= +github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.34.2 h1:sm6NBL6B4zM9NwDukeXb9j6/aYRrBWtMjEwmSpc+Bss= github.com/aws/aws-sdk-go-v2/service/servicequotas v1.34.2/go.mod h1:5X/vFNucNV7Ab1dqsncCnenSs/AbZH8cv8I30feCpdg= github.com/aws/aws-sdk-go-v2/service/signin v1.0.6 h1:MzORe+J94I+hYu2a6XmV5yC9huoTv8NRcCrUNedDypQ= @@ -257,10 +245,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.15 h1:edCcNp9eGIUDUCrzoCu1jWA github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.15/go.mod h1:lyRQKED9xWfgkYC/wmmYfv7iVIM68Z5OQ88ZdcV1QbU= github.com/aws/aws-sdk-go-v2/service/sts v1.41.7 h1:NITQpgo9A5NrDZ57uOWj+abvXSb83BbyggcUBVksN7c= github.com/aws/aws-sdk-go-v2/service/sts v1.41.7/go.mod h1:sks5UWBhEuWYDPdwlnRFn1w7xWdH29Jcpe+/PJQefEs= -github.com/aws/smithy-go v1.24.1 h1:VbyeNfmYkWoxMVpGUAbQumkODcYmfMRfZ8yQiH30SK0= -github.com/aws/smithy-go v1.24.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= -github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= -github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/aws/smithy-go v1.24.2 h1:FzA3bu/nt/vDvmnkg+R8Xl46gmzEDam6mZ1hzmwXFng= +github.com/aws/smithy-go v1.24.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= @@ -308,18 +294,14 @@ github.com/clarketm/json v1.14.1/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w= github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI= -github.com/coredns/caddy v1.1.1 h1:2eYKZT7i6yxIfGP3qLJoJ7HAsDJqYB+X68g4NYjSrE0= -github.com/coredns/caddy v1.1.1/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.32 h1:tlbtXBpt7UzmedEoMqnfqOTnGCvzYfJ/Rrfqf+/W+TY= -github.com/coredns/corefile-migration v1.0.32/go.mod h1:56DPqONc3njpVPsdilEnfijCwNGC3/kTJLl7i7SPavY= github.com/coreos/go-json v0.0.0-20230131223807-18775e0fb4fb h1:rmqyI19j3Z/74bIRhuC59RB442rXUazKNueVpfJPxg4= github.com/coreos/go-json v0.0.0-20230131223807-18775e0fb4fb/go.mod h1:rcFZM3uxVvdyNmsAV2jopgPD1cs5SPWJWU5dOz2LUnw= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= -github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= -github.com/coreos/ignition/v2 v2.24.0 h1:TVcsSWiYvhXihD8Mss3CTRuKaNZM2OIfpoKiudIhrKo= -github.com/coreos/ignition/v2 v2.24.0/go.mod h1:HelGgFZ1WZ4ZPOIDS0a06A2JTdbbdAine5r3AkSYz5s= +github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= +github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= +github.com/coreos/ignition/v2 v2.25.0 h1:4TboIy9z2ofMZmIv5ypyXCFTeKjPNwE5mQNpgkJLdMM= +github.com/coreos/ignition/v2 v2.25.0/go.mod h1:L8tzd8rDzGMKtEvJ22Rk41jW5chE50sDK5Rn/8C1JsE= github.com/coreos/stream-metadata-go v0.4.10-0.20250806142651-4a7d280a6c7b h1:CT6nMx5Ap/K6MT8zMqByrWz+RZV7O6pBGW5LhB/pwvY= github.com/coreos/stream-metadata-go v0.4.10-0.20250806142651-4a7d280a6c7b/go.mod h1:dTE8UEFgyUcrbdUg7vGT3uIP7S8a1IwUlmWLKlOp8G8= github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 h1:uSmlDgJGbUB0bwQBcZomBTottKwEDF5fF8UjSwKSzWM= @@ -345,8 +327,6 @@ github.com/digitalocean/go-libvirt v0.0.0-20240220204746-fcabe97a6eed h1:pDXysiX github.com/digitalocean/go-libvirt v0.0.0-20240220204746-fcabe97a6eed/go.mod h1:isF7ghADfbC01gQx4vZnIOrxXT5RXLG81y+UCb5XSwc= github.com/diskfs/go-diskfs v1.7.1-0.20251217162235-58541aa8f559 h1:rJpHpZwao2igQ9blNiq9xnxwRxExD8tbwhIDaLxydvQ= github.com/diskfs/go-diskfs v1.7.1-0.20251217162235-58541aa8f559/go.mod h1:02SN/PNyJRmOlwuJ8FcE1OkPFcMPvAoFUZCAvsE3Ty4= -github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= -github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/djherbis/times v1.6.0 h1:w2ctJ92J8fBvWPxugmXIv7Nz7Q3iDMKNx9v5ocVH20c= github.com/djherbis/times v1.6.0/go.mod h1:gOHeRAz2h+VJNZ5Gmc/o7iD9k4wW7NMVqieYCY99oc0= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= @@ -383,8 +363,8 @@ github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjT github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= +github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -403,8 +383,8 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/gabriel-vasile/mimetype v1.4.9 h1:5k+WDwEsD9eTLL8Tz3L0VnmVh9QxGjRmjBvAG7U/oYY= -github.com/gabriel-vasile/mimetype v1.4.9/go.mod h1:WnSQhFKJuBlRyLiKohA/2DtIlPFAbguNaG7QCHcyGok= +github.com/gabriel-vasile/mimetype v1.4.11 h1:AQvxbp830wPhHTqc1u7nzoLT+ZFxGY7emj5DR5DYFik= +github.com/gabriel-vasile/mimetype v1.4.11/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghostiam/protogetter v0.3.9 h1:j+zlLLWzqLay22Cz/aYwTHKQ88GE2DQ6GkWSYFOI4lQ= @@ -428,12 +408,12 @@ github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.22.1 h1:kslMRRnK7NCb/CvR1q1VWuEQCEIsBGn5GgKD9e+HYhU= -github.com/go-openapi/errors v0.22.1/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= +github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= +github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= -github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= +github.com/go-openapi/jsonpointer v0.22.3 h1:dKMwfV4fmt6Ah90zloTbUKWMD+0he+12XYAsPotrkn8= +github.com/go-openapi/jsonpointer v0.22.3/go.mod h1:0lBbqeRsQ5lIanv3LHZBrmRGHLHcQoOXQnf88fHlGWo= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= @@ -446,8 +426,8 @@ github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= -github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= @@ -489,8 +469,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0ktULL6FgHdG688= +github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -560,8 +540,6 @@ github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9v github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U= -github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -594,8 +572,8 @@ github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNF github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= -github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -613,8 +591,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= -github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg= +github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -622,14 +600,14 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= -github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= -github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= +github.com/googleapis/enterprise-certificate-proxy v0.3.11 h1:vAe81Msw+8tKUxi2Dqh/NZMz7475yUvmRIkXr4oN2ao= +github.com/googleapis/enterprise-certificate-proxy v0.3.11/go.mod h1:RFV7MUdlb7AgEq2v7FmMCfeSMCllAzWxFgRdusoGks8= +github.com/googleapis/gax-go/v2 v2.17.0 h1:RksgfBpxqff0EZkDWYuz9q/uWsTVz+kf43LsZ1J6SMc= +github.com/googleapis/gax-go/v2 v2.17.0/go.mod h1:mzaqghpQp4JDh3HvADwrat+6M3MOIDp5YKHhb9PAgDY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud/v2 v2.8.0 h1:of2+8tT6+FbEYHfYC8GBu8TXJNsXYSNm9KuvpX7Neqo= -github.com/gophercloud/gophercloud/v2 v2.8.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk= +github.com/gophercloud/gophercloud/v2 v2.10.0 h1:NRadC0aHNvy4iMoFXj5AFiPmut/Sj3hAPAo9B59VMGc= +github.com/gophercloud/gophercloud/v2 v2.10.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk= github.com/gophercloud/utils/v2 v2.0.0-20250212084022-725b94822eeb h1:TQTXVYXL3d0zRAybRUKKboO0z/XAsXEfU6Oax8n00kc= github.com/gophercloud/utils/v2 v2.0.0-20250212084022-725b94822eeb/go.mod h1:tIUw/gFHOB6lFV9LhzNZg5jfCLYMxI2lC1dZUa7NlHM= github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= @@ -644,10 +622,8 @@ github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeY github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c= github.com/h2non/filetype v1.0.12 h1:yHCsIe0y2cvbDARtJhGBTD2ecvqMSTvlIcph9En/Zao= github.com/h2non/filetype v1.0.12/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= @@ -668,8 +644,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= -github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= -github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA= +github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= @@ -679,20 +655,12 @@ github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4Dvx github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= -github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/itchyny/gojq v0.12.9 h1:biKpbKwMxVYhCU1d6mR7qMr3f0Hn9F5k5YykCVb3gmM= -github.com/itchyny/gojq v0.12.9/go.mod h1:T4Ip7AETUXeGpD+436m+UEl3m3tokRgajd5pRfsR5oE= -github.com/itchyny/timefmt-go v0.1.4 h1:hFEfWVdwsEi+CY8xY2FtgWHGQaBaC3JeHd+cve0ynVM= -github.com/itchyny/timefmt-go v0.1.4/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww= github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= -github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHTbnBm4Wc= -github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw= github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.14.0 h1:MBbQK392K3u8NTLbKOCIi3XdI+y+c6yt5oMq0X3xviw= @@ -720,8 +688,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= -github.com/k-orc/openstack-resource-controller/v2 v2.3.0 h1:jLI/GH/yzqy6MVzu54dMcimzFmpprBiWBrfHEc9eots= -github.com/k-orc/openstack-resource-controller/v2 v2.3.0/go.mod h1:3yPrdRJrWHP0qV0IVvLnEWbEQmK7TyWjwUZHiU5dmzA= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0 h1:5sRLIe24eIwICl/210LuH3BgeF3LAMq+MI0qyCaZ7MI= +github.com/k-orc/openstack-resource-controller/v2 v2.4.0/go.mod h1:0ucstXuHmAJXXTYJxcqBgNQ3en7YF7Ffr7FnLuBB15w= github.com/k0kubun/pp/v3 v3.1.0 h1:ifxtqJkRZhw3h554/z/8zm6AAbyO4LLKDlA5eV+9O8Q= github.com/k0kubun/pp/v3 v3.1.0/go.mod h1:vIrP5CF0n78pKHm2Ku6GVerpZBJvscg48WepUYEk2gw= github.com/karamaru-alpha/copyloopvar v1.2.1 h1:wmZaZYIjnJ0b5UoKDjUHrikcV0zuPyyxI4SVplLd2CI= @@ -807,8 +775,6 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= -github.com/mboersma/cluster-api-provider-azure v0.3.1-0.20251030205607-3161b9cc8d3e h1:vjfMVJwnYtZ69rk8j5U4750dWxsSPy0TtyYAw8m8pm0= -github.com/mboersma/cluster-api-provider-azure v0.3.1-0.20251030205607-3161b9cc8d3e/go.mod h1:lowBy4P1sFNQf1d7Fs8JRuuyg5ZC0j3LvUyzoEpLnbE= github.com/mgechev/revive v1.7.0 h1:JyeQ4yO5K8aZhIKf5rec56u0376h8AlKNQEmjfkjKlY= github.com/mgechev/revive v1.7.0/go.mod h1:qZnwcNhoguE58dfi96IJeSTPeZQejNeoMQLUZGi4SW4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= @@ -830,18 +796,12 @@ github.com/microsoftgraph/msgraph-sdk-go v0.59.0 h1:gS/rWZVpQGT3gaR01MWTaH85cISj github.com/microsoftgraph/msgraph-sdk-go v0.59.0/go.mod h1:RBrQLknmiglNeL5QarizkazPxs10ONHY/CUtNK9bzkI= github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 h1:P1wpmn3xxfPMFJHg+PJPcusErfRkl63h6OdAnpDbkS8= github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1/go.mod h1:vFmWQGWyLlhxCESNLv61vlE4qesBU+eWmEVH7DJSESA= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/capability v0.4.0 h1:4D4mI6KlNtWMCM1Z/K0i7RV1FkX+DBDHKVJpCndZoHk= github.com/moby/sys/capability v0.4.0/go.mod h1:4g9IK291rVkms3LKCDOoYlnV8xKwoDTpIrNEE35Wq0I= @@ -877,10 +837,10 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.19.1 h1:mjwbOlDQxZi9Cal+KfbEJTCz327OLNfwNvoZ70NJ+c4= github.com/nunnatsa/ginkgolinter v0.19.1/go.mod h1:jkQ3naZDmxaZMXPWaS9rblH+i+GWXQCaS/JFIWcOH2s= -github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.2-0.20251007022949-442bc2ebe286 h1:gJ97hSUWCPL4wCTBRObtYKC5laktxdiqDNwpblkBVyI= -github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.2-0.20251007022949-442bc2ebe286/go.mod h1:dk4aixfBLxH9L4JHxxrKct6SGWj+tYTKrQT2V6pOf98= -github.com/nutanix-cloud-native/prism-go-client v0.5.0 h1:aSNuKDOK7+q676MQyetYXcySY41IjSvN2UmrDIU3+6s= -github.com/nutanix-cloud-native/prism-go-client v0.5.0/go.mod h1:QhLX+sEep0cStzHVYU6mPgIlnA8U3DySskagrbDprRk= +github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.10.3 h1:OnuhVbc1euRIoOhywpvEWHGvw2m9OV9mjaZzqzPLUCQ= +github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.10.3/go.mod h1:1yxoeIPBB4YPwXR18UGLV/xZ0jj8PkJxTyEbivRCArw= +github.com/nutanix-cloud-native/prism-go-client v0.8.0 h1:CYOxciuvis1xq++eQcyMZrDxVO/LQgPpyvUKzMxEO9A= +github.com/nutanix-cloud-native/prism-go-client v0.8.0/go.mod h1:S5nV4cEuQSGOAv+C+svUuuwAOYX3U/Q/lVwtAIy7tGw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= @@ -903,32 +863,32 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.28.0 h1:Rrf+lVLmtlBIKv6KrIGJCjyY8N36vDVcutbGJkyqjJc= -github.com/onsi/ginkgo/v2 v2.28.0/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/ginkgo/v2 v2.28.3 h1:4JvMdwtFU0imd8fHx25OJXoDMRexnf8v5NHKYSTTji4= +github.com/onsi/ginkgo/v2 v2.28.3/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= -github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= +github.com/onsi/gomega v1.42.0 h1:CJby8u36xb7v34W78F8WKvqTQP7PCMIPB78IVDB73l4= +github.com/onsi/gomega v1.42.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww= github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/openshift/api v0.0.0-20260624092907-2259ae9f1483 h1:HnKxabWRyJq+coz8Ya7hZE7qsrart53Q6xOY3NtvGnw= -github.com/openshift/api v0.0.0-20260624092907-2259ae9f1483/go.mod h1:Jm45pE7O6/G0tYYhiLzNyZykTjmf9BfhsKYuGfLLwTE= +github.com/openshift/api v0.0.0-20260724095150-18550f1a6d13 h1:xDz0RoMp1GYVmA93Hht8CQxN8rFAADif8H6CtKkHEYk= +github.com/openshift/api v0.0.0-20260724095150-18550f1a6d13/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= github.com/openshift/assisted-image-service v0.0.0-20260428115106-2b81dd8e7120 h1:fxnvVDuqfnAz9jCuritFrsb6IK33dxc/MxC9Gtv+nlk= github.com/openshift/assisted-image-service v0.0.0-20260428115106-2b81dd8e7120/go.mod h1:eLxB7EHTDEvuJHobsVZsyMKOFkVATz4aGAwNtSGMdyM= -github.com/openshift/assisted-service/api v0.0.0-20250922204150-a52b83145bea h1:YhJ9iHKKT5ooAdVr8qq3BdudhTxP/WF0XYDT5gzi1ak= -github.com/openshift/assisted-service/api v0.0.0-20250922204150-a52b83145bea/go.mod h1:wA7MaLcf/KoUl7fhB1bHBdhRBLjWPih90sHpxOV6ZLE= -github.com/openshift/assisted-service/client v0.0.0-20250922204150-a52b83145bea h1:nYepkoJZSEjQEadaZ7oZraaeTug0zSV43HISLaHTCF0= -github.com/openshift/assisted-service/client v0.0.0-20250922204150-a52b83145bea/go.mod h1:c9VBjlPBeTbiHKj4gYH8irWdPOfBV8AHxB5f259hMQU= -github.com/openshift/assisted-service/models v0.0.0-20250922204150-a52b83145bea h1:gVNUzhn1mdYD0MJNMnL1cu8sstF34mRo9lQdl/xi8vA= -github.com/openshift/assisted-service/models v0.0.0-20250922204150-a52b83145bea/go.mod h1:5EkIueBSaLnt64HR8drgSewdm+GeuE7W5mr9pa2JXXk= +github.com/openshift/assisted-service/api v0.0.0-20260722223301-f50c5b20c7e1 h1:CQULurVWElnk8kTQflgNZcu82xcw4DQzwvv2PPC33i4= +github.com/openshift/assisted-service/api v0.0.0-20260722223301-f50c5b20c7e1/go.mod h1:0VuKr9kC3L0PYceqyPqXPwLtEUcjo4v6/tblX2tMwHM= +github.com/openshift/assisted-service/client v0.0.0-20260722223301-f50c5b20c7e1 h1:QaI05i0WbJqix3pvqeZIWhcPeDAOLTv5o2tzfWz/drY= +github.com/openshift/assisted-service/client v0.0.0-20260722223301-f50c5b20c7e1/go.mod h1:H9qAvSD6Mm12SKDzf0KTrfgj3+TjG9NMwCxZeFfma3I= +github.com/openshift/assisted-service/models v0.0.0-20260722223301-f50c5b20c7e1 h1:2diIOvtkzsngOtY0I/jr0AKzEe+WodCIU+L6/+0ng9c= +github.com/openshift/assisted-service/models v0.0.0-20260722223301-f50c5b20c7e1/go.mod h1:ZSGBRhDh9gtqjOwZikuU7CRWPEzgbM/rqCJhkMpkGqk= github.com/openshift/baremetal-operator/apis v0.0.0-20231128154154-6736c9b9c6c8 h1:f5nZJ4mB9Rf1epInmKoqDJGdoHyqZwHCiaE/OH4Yx84= github.com/openshift/baremetal-operator/apis v0.0.0-20231128154154-6736c9b9c6c8/go.mod h1:CvKrrnAcvvtrZIc9y9WaqWmJhK0AJ9sWnh+VP4d7jcM= github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20231128154154-6736c9b9c6c8 h1:38vY9w7dXqB7tI9g1GCUnpahNDyBbp9Yylq+BQ154YE= @@ -949,8 +909,8 @@ github.com/openshift/cluster-control-plane-machine-set-operator v0.0.0-202510290 github.com/openshift/cluster-control-plane-machine-set-operator v0.0.0-20251029084908-344babe6a957/go.mod h1:TBlORAAtNZ/Tl86pO7GjNXKsH/g0QAW5GnvYstdOhYI= github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 h1:cHyxR+Y8rAMT6m1jQCaYGRwikqahI0OjjUDhFNf3ySQ= github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= -github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27 h1:9C86viyQl7HE9yg7Gctgx803Oq6DbrCUAberyMVcWDE= -github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27/go.mod h1:RRH8lt09SAiPECNdsbh7Gun0lkcRWi1nYKq6tDp5WxQ= +github.com/openshift/hive/apis v0.0.0-20260415205034-aa1db747a6ba h1:GXPfNjWwWpi65XNnsDKqgVKiQ4EM2A3uuHgXNgtSK/4= +github.com/openshift/hive/apis v0.0.0-20260415205034-aa1db747a6ba/go.mod h1:98U/kA+A9nenhu0mCqaxaKyYJ+C/YEZoAUkPYDT/m+c= github.com/openshift/library-go v0.0.0-20260505113324-de46cb8e2ddc h1:M4YEEQ5lLkEGVjenmFZ6gcLXyfuuC+mIYxiRPLMu9ts= github.com/openshift/library-go v0.0.0-20260505113324-de46cb8e2ddc/go.mod h1:k1tefCr+PAZ7kY8TJjpE6rW6t6Yu4iOmBwO+1+3qD2s= github.com/openshift/machine-api-operator v0.2.1-0.20251110092458-e0af0f3f44b8 h1:ziyYqleO3/DjZsDyo7boSAwAbYXV/VRWB8zyhuHER2Q= @@ -996,10 +956,10 @@ github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UH github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= -github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= -github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= -github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= +github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo= github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= @@ -1019,8 +979,6 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/rotisserie/eris v0.5.4 h1:Il6IvLdAapsMhvuOahHWiBnl1G++Q0/L5UIkI5mARSk= -github.com/rotisserie/eris v0.5.4/go.mod h1:Z/kgYTJiJtocxCbFfvRmO+QejApzG6zpyky9G1A4g9s= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU= @@ -1029,8 +987,6 @@ github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9f github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= -github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew= -github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o= github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= @@ -1041,10 +997,8 @@ github.com/sashamelentyev/usestdlibvars v1.28.0 h1:jZnudE2zKCtYlGzLVreNp5pmCdOxX github.com/sashamelentyev/usestdlibvars v1.28.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/securego/gosec/v2 v2.22.2 h1:IXbuI7cJninj0nRpZSLCUlotsj8jGusohfONMrHoF6g= github.com/securego/gosec/v2 v2.22.2/go.mod h1:UEBGA+dSKb+VqM6TdehR7lnQtIIMorYJ4/9CW1KVQBE= -github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= -github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= -github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0= @@ -1070,8 +1024,8 @@ github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8 github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s= -github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1088,8 +1042,8 @@ github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+ github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5 h1:d3ht4RA1cu00hB+olyK+ppvOEhphHY3oGfSo/BMPlqo= github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5/go.mod h1:Z5KcoM0YLC7INlNhEezeIZ0TZNYf7WSNO0Lvah4DSeQ= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= -github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -1106,6 +1060,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= @@ -1170,34 +1125,34 @@ go-simpler.org/sloglint v0.9.0/go.mod h1:G/OrAF6uxj48sHahCzrbarVMptL2kjWTaUeC8+f go.keploy.io/server v0.8.6 h1:czE9jaliyAkMMJcYnMPNuu6tun7UgwFbokxEG95vLN4= go.keploy.io/server v0.8.6/go.mod h1:t7BPuZQSiC3PNHZ9dbn3e3VB61HNWwiqVmaRujfDFUg= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= -go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/detectors/gcp v1.39.0 h1:kWRNZMsfBHZ+uHjiH4y7Etn2FK26LAGkNFw7RHv1DhE= go.opentelemetry.io/contrib/detectors/gcp v1.39.0/go.mod h1:t/OGqzHBa5v6RHZwrDBJ2OirWc+4q/w2fTbLZwAKjTk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 h1:rbRJ8BBoVMsQShESYZ0FkvcITu8X8QNwJogcLUmDNNw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0/go.mod h1:ru6KHrNtNHxM4nD/vd6QrLVWgKhxPYgblq4VAtNawTQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0 h1:XmiuHzgJt067+a6kwyAzkhXooYVv3/TOw9cM2VfJgUM= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.65.0/go.mod h1:KDgtbWKTQs4bM+VPUr6WlL9m/WXcmkCcBlIzqxPGzmI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= -go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= -go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.37.0 h1:6VjV6Et+1Hd2iLZEPtdV7vie80Yyqf7oikJLjQ/myi0= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.37.0/go.mod h1:u8hcp8ji5gaM/RfcOo8z9NMnf1pVLfVY7lBY2VOGuUU= -go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= -go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= -go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= -go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= -go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= -go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= -go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= -go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= -go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= -go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= +go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 h1:RAE+JPfvEmvy+0LzyUA25/SGawPwIUbZ6u0Wug54sLc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0/go.mod h1:AGmbycVGEsRx9mXMZ75CsOyhSP6MFIcj/6dnG+vhVjk= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0 h1:wm/Q0GAAykXv83wzcKzGGqAnnfLFyFe7RslekZuv+VI= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.38.0/go.mod h1:ra3Pa40+oKjvYh+ZD3EdxFZZB0xdMfuileHAm4nNN7w= +go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= +go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= +go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= +go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= +go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= +go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.podman.io/image/v5 v5.37.0 h1:yzgQybwuWIIeK63hu+mQqna/wOh96XD5cpVc6j8Dg5M= go.podman.io/image/v5 v5.37.0/go.mod h1:+s2Sx5dia/jVeT8tI3r2NAPrARMiDdbEq3QPIQogx3I= go.podman.io/storage v1.60.0 h1:bWNSrR58nxg39VNFDSx3m0AswbvyzPGOo5XsUfomTao= @@ -1212,8 +1167,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= -go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= +go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1226,11 +1181,11 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988= -golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= +golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 h1:fQsdNF2N+/YewlRZiricy4P1iimyPKZ/xwniHj8Q2a0= +golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU= golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac h1:TSSpLIG4v+p0rPv1pNOQtl1I8knsO4S9trOxNMOLVP4= golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1242,8 +1197,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= -golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= +golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= +golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1269,11 +1224,11 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w= -golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= -golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1284,8 +1239,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1326,16 +1281,16 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4= -golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk= +golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= +golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1346,8 +1301,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1366,12 +1321,11 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= -golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= +golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= +golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= @@ -1384,27 +1338,27 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0= gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/api v0.255.0 h1:OaF+IbRwOottVCYV2wZan7KUq7UeNUQn1BcPc4K7lE4= -google.golang.org/api v0.255.0/go.mod h1:d1/EtvCLdtiWEV4rAEHDHGh2bCnqsWhw+M8y2ECN4a8= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/api v0.267.0 h1:w+vfWPMPYeRs8qH1aYYsFX68jMls5acWl/jocfLomwE= +google.golang.org/api v0.267.0/go.mod h1:Jzc0+ZfLnyvXma3UtaTl023TdhZu6OMBP9tJ+0EmFD0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 h1:FGOcxvKlJgRBVbXeugjljCfCgfKWhC42FBoYmTCWVBs= -google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:249YoW4b1INqFTEop2T4aJgiO7UBYJrpejsaLvjWfI8= -google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M= -google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 h1:VQZ/yAbAtjkHgH80teYd2em3xtIkkHd7ZhqfH2N9CsM= +google.golang.org/genproto v0.0.0-20260128011058-8636f8732409/go.mod h1:rxKD3IEILWEu3P44seeNOAwZN4SaoKaQ/2eTg4mM6EM= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 h1:m8qni9SQFH0tJc1X0vmnpw/0t+AImlSvp30sEupozUg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= -google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1417,8 +1371,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= -google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1435,8 +1389,8 @@ gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.3 h1:iM9Lhz5MRSGhHVGGwCuzG9KO8PoirCXj/m/qTmOJJQw= +gopkg.in/ini.v1 v1.67.3/go.mod h1:x/cyOwCgZqOkJoDIJ3c1KNHMo10+nLGAhh+kn3Zizss= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= @@ -1461,26 +1415,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI= honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4= k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= -k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q= -k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM= -k8s.io/apiextensions-apiserver v0.35.1 h1:p5vvALkknlOcAqARwjS20kJffgzHqwyQRM8vHLwgU7w= -k8s.io/apiextensions-apiserver v0.35.1/go.mod h1:2CN4fe1GZ3HMe4wBr25qXyJnJyZaquy4nNlNmb3R7AQ= +k8s.io/api v0.36.2 h1:TF6YDLIzKfccK7cq9YpTcGX8TJmEkHVRv78DM51fRYY= +k8s.io/api v0.36.2/go.mod h1:F4LbMO4brjZYh7yFkXWhynSvtB7YauxV4c+HHkNRGNg= +k8s.io/apiextensions-apiserver v0.36.0 h1:Wt7E8J+VBCbj4FjiBfDTK/neXDDjyJVJc7xfuOHImZ0= +k8s.io/apiextensions-apiserver v0.36.0/go.mod h1:kGDjH0msuiIB3tgsYRV0kS9GqpMYMUsQ3GHv7TApyug= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU= -k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= -k8s.io/apiserver v0.35.1 h1:potxdhhTL4i6AYAa2QCwtlhtB1eCdWQFvJV6fXgJzxs= -k8s.io/apiserver v0.35.1/go.mod h1:BiL6Dd3A2I/0lBnteXfWmCFobHM39vt5+hJQd7Lbpi4= -k8s.io/cli-runtime v0.35.1 h1:uKcXFe8J7AMAM4Gm2JDK4mp198dBEq2nyeYtO+JfGJE= -k8s.io/cli-runtime v0.35.1/go.mod h1:55/hiXIq1C8qIJ3WBrWxEwDLdHQYhBNRdZOz9f7yvTw= -k8s.io/client-go v0.35.1 h1:+eSfZHwuo/I19PaSxqumjqZ9l5XiTEKbIaJ+j1wLcLM= -k8s.io/client-go v0.35.1/go.mod h1:1p1KxDt3a0ruRfc/pG4qT/3oHmUj1AhSHEcxNSGg+OA= -k8s.io/cluster-bootstrap v0.34.2 h1:oKckPeunVCns37BntcsxaOesDul32yzGd3DFLjW2fc8= -k8s.io/cluster-bootstrap v0.34.2/go.mod h1:f21byPR7X5nt12ivZi+J3pb4sG4SH6VySX8KAAJA8BY= +k8s.io/apimachinery v0.36.2 h1:0PE/W/WNy1UX61NLbXY5TMbJ6UwLL6E6lAPkYrKFxbQ= +k8s.io/apimachinery v0.36.2/go.mod h1:fvf/HOLXq9RId0rnDIbN1OEBvHXdQbLMM8nu0LcBUf4= +k8s.io/apiserver v0.36.0 h1:Jg5OFAENUACByUCg15CmhZAYrr5ZyJ+jodyA1mHl3YE= +k8s.io/apiserver v0.36.0/go.mod h1:mHvwdHf+qKEm+1/hYm756SV+oREOKSPnsjagOpx6Vho= +k8s.io/cli-runtime v0.36.0 h1:HNxciQpQMMOKS0/GiUXcKDyA6J2FDILJj9NmP2BZrTg= +k8s.io/cli-runtime v0.36.0/go.mod h1:KObkknK9Ro5LYX+1RdiKc7C8CvGg4aX+V/Zv+E8WPHA= +k8s.io/client-go v0.36.0 h1:pOYi7C4RHChYjMiHpZSpSbIM6ZxVbRXBy7CuiIwqA3c= +k8s.io/client-go v0.36.0/go.mod h1:ZKKcpwF0aLYfkHFCjillCKaTK/yBkEDHTDXCFY6AS9Y= +k8s.io/cluster-bootstrap v0.35.5 h1:Dk0aNTKuqH87hBpzn85qrx1VVv5/CLNZCnCPDKlw5s4= +k8s.io/cluster-bootstrap v0.35.5/go.mod h1:Q9bKIm0xCTW8wMkR/NuUAm7VuRJnepI/6MNqdX6m540= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/code-generator v0.35.1 h1:yLKR2la7Z9cWT5qmk67ayx8xXLM4RRKQMnC8YPvTWRI= -k8s.io/code-generator v0.35.1/go.mod h1:F2Fhm7aA69tC/VkMXLDokdovltXEF026Tb9yfQXQWKg= -k8s.io/component-base v0.35.1 h1:XgvpRf4srp037QWfGBLFsYMUQJkE5yMa94UsJU7pmcE= -k8s.io/component-base v0.35.1/go.mod h1:HI/6jXlwkiOL5zL9bqA3en1Ygv60F03oEpnuU1G56Bs= +k8s.io/code-generator v0.36.0 h1:XWAkrhnArm0VWMmSFO7kyB+wE2LROwep7hEH0GPGkqA= +k8s.io/code-generator v0.36.0/go.mod h1:Tr2UhfBRdlyRoadfob9aPCmmGe8PUs5XPK9MEJ2nx+w= +k8s.io/component-base v0.36.0 h1:hFjEktssxiJhrK1zfybkH4kJOi8iZuF+mIDCqS5+jRo= +k8s.io/component-base v0.36.0/go.mod h1:JZvIfcNHk+uck+8LhJzhSBtydWXaZNQwX2OdL+Mnwsk= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= @@ -1497,8 +1451,8 @@ k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lV k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20260519202549-bbf5c5577288 h1:A7Lby6ekC6nv+6oO38huCMFBRP0Os+tIeq1GkwxOQes= k8s.io/kube-openapi v0.0.0-20260519202549-bbf5c5577288/go.mod h1:V/QaCUYDa+0QpcHhVVc5l99Uz56wEMEXBSj9oCDkNDY= -k8s.io/kubectl v0.35.1 h1:zP3Er8C5i1dcAFUMh9Eva0kVvZHptXIn/+8NtRWMxwg= -k8s.io/kubectl v0.35.1/go.mod h1:cQ2uAPs5IO/kx8R5s5J3Ihv3VCYwrx0obCXum0CvnXo= +k8s.io/kubectl v0.36.0 h1:hEGr8NvIm2Wjqs2Xy48Uzmvo6lpHdGKlLyMvau2gTms= +k8s.io/kubectl v0.36.0/go.mod h1:iDe8aV5BEi45W8k+5n71I2pJ/nwE0PHDu+/2cejzYoo= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= @@ -1509,22 +1463,24 @@ mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.0 h1:XotDXzqvJ8Nx5eiZZueLpTuafJz8SiodgOemI+w87QU= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.12.8 h1:37SLcQRG9EMhmsZJwyEx8pNBkmY1Xhog53slhDy44m4= -sigs.k8s.io/cluster-api v1.12.8/go.mod h1:Xz6YnayDc2+/3OA1i6wlXrhmErV1KKJmyfs7JzMDn+k= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.1-0.20260226000023-67627b2da0df h1:jTXXHQqzCj0qRupZC4tWleQ+yL7JSdqT5WzovG1PlBI= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.10.1-0.20260226000023-67627b2da0df/go.mod h1:vbVa187QP4/y7/03JqhYBmou4xabCRnuRoHwhE2BgE8= -sigs.k8s.io/cluster-api-provider-gcp v1.10.1-0.20251030112604-5c2bfd5aadb3 h1:hX2TCLts4fGf33RAkfMViy5qHZfMLZJfeu2BGYxXQkI= -sigs.k8s.io/cluster-api-provider-gcp v1.10.1-0.20251030112604-5c2bfd5aadb3/go.mod h1:BR9XUljy5o4V6MNTZva4XFh7Gj++4d5G8AnKa6iB6Tc= -sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.2 h1:Kbf8Xb8nMwG59OeVsprvWlBu5KeCSoTQFMM/1Gsep4w= -sigs.k8s.io/cluster-api-provider-ibmcloud v0.12.2/go.mod h1:LNHIM7OAbyxyPVxpdBvajOhPrR5rXkKwxPLtpcRFXP4= -sigs.k8s.io/cluster-api-provider-openstack v0.13.0 h1:iZN/qJhDZas74Mo/zM1tz038niv68e1g5wYCQJ5yczo= -sigs.k8s.io/cluster-api-provider-openstack v0.13.0/go.mod h1:ooipbibCnZS4mJTQJuZtlj0FyaA9MEH5CzxkJoxU4xo= -sigs.k8s.io/cluster-api-provider-vsphere v1.14.0 h1:MR3Ry1DvFeeLHH4ldFi1kChpkkB5HPOWHP0viURbL8c= -sigs.k8s.io/cluster-api-provider-vsphere v1.14.0/go.mod h1:QilGYtsQutBXDmdhSRyMDvJaKiuVaUaAf5LIirlZFZM= -sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= -sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 h1:hSfpvjjTQXQY2Fol2CS0QHMNs/WI1MOSGzCm1KhM5ec= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/cluster-api v1.13.4 h1:27PPEKSqESKeUIf475Ga6hSW1+gKxd5V5sCmMDgeBDo= +sigs.k8s.io/cluster-api v1.13.4/go.mod h1:suV3Ixu7yUMD651EtBULa/RtwHRxU30eojF3wifGe8Y= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1 h1:Qt4c7roIXEpe0wtTocE2tIWgShhcCSuLwQGgIiUFSZo= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.12.1/go.mod h1:kzoAhbiaTDdVSQ9pWOQhDuBwQlkkl8xPbDnDw7M2Hk8= +sigs.k8s.io/cluster-api-provider-azure v1.24.2 h1:LNqS99Gon7Q9GPOO4eP/K9c1GGH09YF/EJSrBC/Tvgo= +sigs.k8s.io/cluster-api-provider-azure v1.24.2/go.mod h1:EDt1UPqLqlaKVWfwC5SzfHKg2joc0plhVyrRRo/bdRc= +sigs.k8s.io/cluster-api-provider-gcp v1.12.0 h1:RFdAxck4j62e320n8uUbFcro4zxdYZnTWj0mAHZ+CFo= +sigs.k8s.io/cluster-api-provider-gcp v1.12.0/go.mod h1:vL6gCBOG9LgszKtWsoPlrO1XFHqm5r0zlpk6V9eSCis= +sigs.k8s.io/cluster-api-provider-ibmcloud v0.13.1 h1:cR7WFEaNJJb6/R67o35zZXd7Vqf9eRAFiZkVDJomPI8= +sigs.k8s.io/cluster-api-provider-ibmcloud v0.13.1/go.mod h1:/B1y/mWZSM7qzdlmnI2OWF+27dPq/VinVkWKkYEdfj4= +sigs.k8s.io/cluster-api-provider-openstack v0.14.6 h1:yOln3Hd6JOFe2mkOGckFdWwFNhJdcNWrlfgwMdxmzto= +sigs.k8s.io/cluster-api-provider-openstack v0.14.6/go.mod h1:A5d/QLwDgQ9vOAD6/z6EKN23+4GXZK4E8vmh7Jlfsm0= +sigs.k8s.io/cluster-api-provider-vsphere v1.15.3 h1:gyz9GFzq7j1stm425PpmGRQDT8e2UWA2GAsski/jB9k= +sigs.k8s.io/cluster-api-provider-vsphere v1.15.3/go.mod h1:7UydsEUb+DKhhb3o5K2RAv3sTi9l/YJPLPVEEGjyNS8= +sigs.k8s.io/controller-runtime v0.24.1 h1:miPEwrmirImAvgME1L9qebGHrOnGJoVmVdtOU9fRfo4= +sigs.k8s.io/controller-runtime v0.24.1/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250911215635-f3b9e4f96392 h1:wmM9gmuERTwUDG+AyUYTDibEENDivB6ZiSn/FbuIW24= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250911215635-f3b9e4f96392/go.mod h1:sWEAaKdjIb8+pUyzfpeClTvbK2vTRdeF39lz/ee4EMU= sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk= @@ -1532,16 +1488,16 @@ sigs.k8s.io/controller-tools v0.19.0/go.mod h1:y5HY/iNDFkmFla2CfQoVb2AQXMsBk4ad8 sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.20.1 h1:iWP1Ydh3/lmldBnH/S5RXgT98vWYMaTUL1ADcr+Sv7I= -sigs.k8s.io/kustomize/api v0.20.1/go.mod h1:t6hUFxO+Ph0VxIk1sKp1WS0dOjbPCtLJ4p8aADLwqjM= -sigs.k8s.io/kustomize/kyaml v0.20.1 h1:PCMnA2mrVbRP3NIB6v9kYCAc38uvFLVs8j/CD567A78= -sigs.k8s.io/kustomize/kyaml v0.20.1/go.mod h1:0EmkQHRUsJxY8Ug9Niig1pUMSCGHxQ5RklbpV/Ri6po= +sigs.k8s.io/kustomize/api v0.21.1 h1:lzqbzvz2CSvsjIUZUBNFKtIMsEw7hVLJp0JeSIVmuJs= +sigs.k8s.io/kustomize/api v0.21.1/go.mod h1:f3wkKByTrgpgltLgySCntrYoq5d3q7aaxveSagwTlwI= +sigs.k8s.io/kustomize/kyaml v0.21.1 h1:IVlbmhC076nf6foyL6Taw4BkrLuEsXUXNpsE+ScX7fI= +sigs.k8s.io/kustomize/kyaml v0.21.1/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0 h1:qmp2e3ZfFi1/jJbDGpD4mt3wyp6PE1NfKHCYLqgNQJo= +sigs.k8s.io/structured-merge-diff/v6 v6.4.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= From 08ea7e6011a75b2334cf41407eafa3e3b141b7be Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Fri, 24 Jul 2026 12:14:51 -0400 Subject: [PATCH 2/8] vendor: k8s bump go mod tidy && go mod vendor --- .../.release-please-manifest-individual.json | 15 +- .../.release-please-manifest-submodules.json | 172 +- .../go/.release-please-manifest.json | 2 +- vendor/cloud.google.com/go/CHANGES.md | 34 + vendor/cloud.google.com/go/README.md | 2 +- vendor/cloud.google.com/go/auth/CHANGES.md | 19 +- .../go/auth/credentials/detect.go | 165 +- .../go/auth/credentials/filetypes.go | 35 +- .../go/auth/grpctransport/grpctransport.go | 34 +- .../go/auth/httptransport/httptransport.go | 9 + .../go/auth/internal/credsfile/credsfile.go | 44 - .../go/auth/internal/credsfile/filetype.go | 1 + .../go/auth/internal/credsfile/parse.go | 7 +- .../go/auth/internal/internal.go | 13 +- .../go/auth/internal/version.go | 4 +- vendor/cloud.google.com/go/go.work | 6 +- vendor/cloud.google.com/go/go.work.sum | 20 +- .../go/internal/.repo-metadata-full.json | 50 +- .../go/kms/apiv1/.repo-metadata.json | 10 + .../go/kms/apiv1/autokey_admin_client.go | 3 +- .../go/kms/apiv1/autokey_client.go | 3 +- .../go/kms/apiv1/auxiliary.go | 288 +- .../go/kms/apiv1/auxiliary_go123.go | 14 +- vendor/cloud.google.com/go/kms/apiv1/doc.go | 2 +- .../go/kms/apiv1/ekm_client.go | 3 +- .../go/kms/apiv1/gapic_metadata.json | 174 + .../cloud.google.com/go/kms/apiv1/helpers.go | 2 +- .../go/kms/apiv1/hsm_management_client.go | 2080 +++++ .../go/kms/apiv1/key_management_client.go | 94 +- .../go/kms/apiv1/kmspb/autokey.pb.go | 179 +- .../go/kms/apiv1/kmspb/autokey_admin.pb.go | 181 +- .../kms/apiv1/kmspb/autokey_admin_grpc.pb.go | 216 + .../go/kms/apiv1/kmspb/autokey_grpc.pb.go | 215 + .../go/kms/apiv1/kmspb/ekm_service.pb.go | 335 +- .../go/kms/apiv1/kmspb/ekm_service_grpc.pb.go | 374 + .../go/kms/apiv1/kmspb/hsm_management.pb.go | 3442 ++++++++ .../kms/apiv1/kmspb/hsm_management_grpc.pb.go | 486 ++ .../go/kms/apiv1/kmspb/resources.pb.go | 924 +- .../go/kms/apiv1/kmspb/service.pb.go | 2999 +++---- .../go/kms/apiv1/kmspb/service_grpc.pb.go | 1428 ++++ .../go/kms/internal/version.go | 6 +- .../go/longrunning/CHANGES.md | 14 + .../longrunning/autogen/.repo-metadata.json | 10 + .../go/longrunning/autogen/helpers.go | 4 + .../autogen/longrunningpb/operations.pb.go | 421 +- .../longrunningpb/operations_grpc.pb.go | 329 + .../longrunning/autogen/operations_client.go | 7 +- .../apiv3/v2/alert_policy_client.go | 2 +- .../go/monitoring/apiv3/v2/group_client.go | 2 +- .../go/monitoring/apiv3/v2/helpers.go | 4 + .../go/monitoring/apiv3/v2/metric_client.go | 2 +- .../apiv3/v2/monitoringpb/alert.pb.go | 7 +- .../apiv3/v2/monitoringpb/alert_service.pb.go | 275 +- .../v2/monitoringpb/alert_service_grpc.pb.go | 310 + .../apiv3/v2/monitoringpb/common.pb.go | 7 +- .../v2/monitoringpb/dropped_labels.pb.go | 7 +- .../apiv3/v2/monitoringpb/group.pb.go | 7 +- .../apiv3/v2/monitoringpb/group_service.pb.go | 285 +- .../v2/monitoringpb/group_service_grpc.pb.go | 321 + .../apiv3/v2/monitoringpb/metric.pb.go | 7 +- .../v2/monitoringpb/metric_service.pb.go | 439 +- .../v2/monitoringpb/metric_service_grpc.pb.go | 480 ++ .../v2/monitoringpb/mutation_record.pb.go | 7 +- .../apiv3/v2/monitoringpb/notification.pb.go | 7 +- .../monitoringpb/notification_service.pb.go | 531 +- .../notification_service_grpc.pb.go | 571 ++ .../apiv3/v2/monitoringpb/query_service.pb.go | 100 +- .../v2/monitoringpb/query_service_grpc.pb.go | 132 + .../apiv3/v2/monitoringpb/service.pb.go | 7 +- .../v2/monitoringpb/service_service.pb.go | 435 +- .../monitoringpb/service_service_grpc.pb.go | 475 + .../apiv3/v2/monitoringpb/snooze.pb.go | 7 +- .../v2/monitoringpb/snooze_service.pb.go | 215 +- .../v2/monitoringpb/snooze_service_grpc.pb.go | 248 + .../apiv3/v2/monitoringpb/span_context.pb.go | 7 +- .../apiv3/v2/monitoringpb/uptime.pb.go | 7 +- .../v2/monitoringpb/uptime_service.pb.go | 295 +- .../v2/monitoringpb/uptime_service_grpc.pb.go | 331 + .../apiv3/v2/notification_channel_client.go | 2 +- .../go/monitoring/apiv3/v2/query_client.go | 2 +- .../apiv3/v2/service_monitoring_client.go | 2 +- .../go/monitoring/apiv3/v2/snooze_client.go | 2 +- .../apiv3/v2/uptime_check_client.go | 2 +- .../go/monitoring/internal/version.go | 2 +- .../go/release-please-config-individual.json | 11 +- ...elease-please-config-yoshi-submodules.json | 12 +- .../go/storage/.repo-metadata.json | 10 + vendor/cloud.google.com/go/storage/CHANGES.md | 34 + vendor/cloud.google.com/go/storage/bucket.go | 29 +- vendor/cloud.google.com/go/storage/client.go | 3 + .../cloud.google.com/go/storage/contexts.go | 115 + vendor/cloud.google.com/go/storage/copy.go | 10 +- .../go/storage/grpc_client.go | 53 +- .../go/storage/grpc_reader.go | 5 +- .../go/storage/grpc_writer.go | 149 +- .../go/storage/http_client.go | 26 +- .../internal/apiv2/.repo-metadata.json | 10 + .../storage/internal/apiv2/storage_client.go | 318 +- .../internal/apiv2/storagepb/storage.pb.go | 6003 +++++-------- .../apiv2/storagepb/storage_grpc.pb.go | 1799 ++++ .../go/storage/internal/version.go | 6 +- vendor/cloud.google.com/go/storage/reader.go | 16 +- vendor/cloud.google.com/go/storage/storage.go | 39 +- vendor/cloud.google.com/go/storage/writer.go | 41 +- .../azure-sdk-for-go/sdk/azcore/CHANGELOG.md | 35 + .../azure-sdk-for-go/sdk/azcore/arm/client.go | 3 - .../azure-sdk-for-go/sdk/azcore/arm/doc.go | 3 - .../internal/resource/resource_identifier.go | 4 +- .../arm/internal/resource/resource_type.go | 3 - .../sdk/azcore/arm/policy/policy.go | 3 - .../sdk/azcore/arm/resource_identifier.go | 3 - .../sdk/azcore/arm/resource_type.go | 3 - .../sdk/azcore/arm/runtime/pipeline.go | 3 - .../azcore/arm/runtime/policy_register_rp.go | 3 - .../arm/runtime/policy_trace_namespace.go | 3 - .../sdk/azcore/arm/runtime/runtime.go | 7 +- .../sdk/azcore/cloud/cloud.go | 3 - .../azure-sdk-for-go/sdk/azcore/cloud/doc.go | 3 - .../Azure/azure-sdk-for-go/sdk/azcore/core.go | 3 - .../Azure/azure-sdk-for-go/sdk/azcore/doc.go | 3 - .../azure-sdk-for-go/sdk/azcore/errors.go | 3 - .../Azure/azure-sdk-for-go/sdk/azcore/etag.go | 3 - .../sdk/azcore/internal/exported/exported.go | 5 +- .../sdk/azcore/internal/exported/pipeline.go | 3 - .../sdk/azcore/internal/exported/request.go | 5 +- .../internal/exported/response_error.go | 5 +- .../sdk/azcore/internal/log/log.go | 3 - .../azcore/internal/pollers/async/async.go | 8 +- .../sdk/azcore/internal/pollers/body/body.go | 3 - .../sdk/azcore/internal/pollers/fake/fake.go | 3 - .../sdk/azcore/internal/pollers/loc/loc.go | 3 - .../sdk/azcore/internal/pollers/op/op.go | 3 - .../sdk/azcore/internal/pollers/poller.go | 3 - .../sdk/azcore/internal/pollers/util.go | 8 +- .../sdk/azcore/internal/shared/constants.go | 5 +- .../sdk/azcore/internal/shared/shared.go | 3 - .../azure-sdk-for-go/sdk/azcore/log/doc.go | 3 - .../azure-sdk-for-go/sdk/azcore/log/log.go | 3 - .../azure-sdk-for-go/sdk/azcore/policy/doc.go | 3 - .../sdk/azcore/policy/policy.go | 3 - .../sdk/azcore/runtime/doc.go | 3 - .../sdk/azcore/runtime/errors.go | 3 - .../sdk/azcore/runtime/pager.go | 14 +- .../sdk/azcore/runtime/pipeline.go | 3 - .../sdk/azcore/runtime/policy_api_version.go | 3 - .../azcore/runtime/policy_body_download.go | 3 - .../sdk/azcore/runtime/policy_http_header.go | 4 +- .../sdk/azcore/runtime/policy_http_trace.go | 14 +- .../azcore/runtime/policy_include_response.go | 4 +- .../sdk/azcore/runtime/policy_logging.go | 26 +- .../sdk/azcore/runtime/policy_request_id.go | 3 - .../sdk/azcore/runtime/policy_retry.go | 9 +- .../sdk/azcore/runtime/policy_telemetry.go | 3 - .../sdk/azcore/runtime/poller.go | 8 +- .../sdk/azcore/runtime/request.go | 11 +- .../sdk/azcore/runtime/response.go | 6 +- .../runtime/transport_default_http_client.go | 3 - .../sdk/azcore/streaming/doc.go | 3 - .../sdk/azcore/streaming/progress.go | 3 - .../azure-sdk-for-go/sdk/azcore/to/doc.go | 3 - .../azure-sdk-for-go/sdk/azcore/to/to.go | 3 - .../sdk/azcore/tracing/constants.go | 3 - .../sdk/azcore/tracing/tracing.go | 3 - .../sdk/azidentity/CHANGELOG.md | 6 + .../azidentity/developer_credential_util.go | 15 +- .../developer_credential_util_nonwindows.go | 17 + .../developer_credential_util_windows.go | 22 + .../sdk/azidentity/version.go | 2 +- .../sdk/internal/diag/diag.go | 5 +- .../azure-sdk-for-go/sdk/internal/diag/doc.go | 3 - .../sdk/internal/errorinfo/doc.go | 3 - .../sdk/internal/errorinfo/errorinfo.go | 3 - .../sdk/internal/exported/exported.go | 13 +- .../azure-sdk-for-go/sdk/internal/log/doc.go | 3 - .../azure-sdk-for-go/sdk/internal/log/log.go | 3 - .../sdk/internal/poller/util.go | 3 - .../sdk/internal/temporal/resource.go | 5 +- .../azure-sdk-for-go/sdk/internal/uuid/doc.go | 3 - .../sdk/internal/uuid/uuid.go | 3 - .../sdk/storage/azblob/CHANGELOG.md | 7 + .../azblob/internal/exported/version.go | 2 +- .../apps/confidential/confidential.go | 103 +- .../apps/internal/base/base.go | 47 +- .../apps/internal/base/storage/items.go | 17 +- .../apps/internal/base/storage/storage.go | 51 +- .../oauth/ops/accesstokens/accesstokens.go | 17 + .../internal/oauth/ops/authority/authority.go | 84 +- .../apps/public/public.go | 4 +- .../exporter/metric/metric.go | 36 +- .../exporter/metric/option.go | 2 +- .../exporter/metric/version.go | 2 +- .../resourcemapping/resourcemapping.go | 2 +- .../instance/ibm-pi-instance-networks.go | 57 + .../clients/instance/ibm-pi-network-peers.go | 132 +- .../clients/instance/ibm-pi-vpmem.go | 77 + .../clients/instance/ibm-pi-workspaces.go | 4 +- .../power-go-client/ibmpisession/session.go | 11 + .../authentication/authentication_client.go | 130 +- .../service_broker_auth_callback_responses.go | 15 +- ..._broker_auth_device_code_post_responses.go | 15 +- ...broker_auth_device_token_post_responses.go | 17 +- ...ervice_broker_auth_info_token_responses.go | 15 +- ...service_broker_auth_info_user_responses.go | 15 +- .../service_broker_auth_login_responses.go | 15 +- .../service_broker_auth_logout_responses.go | 15 +- ...er_auth_registration_callback_responses.go | 15 +- ...vice_broker_auth_registration_responses.go | 15 +- ...ervice_broker_auth_token_post_responses.go | 17 +- .../bluemix_service_instance_get_responses.go | 13 +- .../bluemix_service_instance_put_responses.go | 13 +- .../bluemix_service_instances_client.go | 26 +- .../power/client/catalog/catalog_client.go | 13 +- .../client/catalog/catalog_get_responses.go | 13 +- .../client/datacenters/datacenters_client.go | 52 +- .../v1_datacenters_get_responses.go | 13 +- .../v1_datacenters_getall_responses.go | 13 +- .../v1_datacenters_private_get_responses.go | 13 +- ...v1_datacenters_private_getall_responses.go | 13 +- .../hardware_platforms_client.go | 13 +- ..._broker_hardwareplatforms_get_responses.go | 15 +- .../client/host_groups/host_groups_client.go | 130 +- .../v1_available_hosts_responses.go | 15 +- .../v1_host_groups_get_responses.go | 15 +- .../v1_host_groups_id_get_responses.go | 17 +- .../v1_host_groups_id_put_responses.go | 19 +- .../v1_host_groups_post_responses.go | 19 +- .../host_groups/v1_hosts_get_responses.go | 15 +- .../v1_hosts_id_delete_responses.go | 17 +- .../host_groups/v1_hosts_id_get_responses.go | 17 +- .../host_groups/v1_hosts_id_put_responses.go | 19 +- .../host_groups/v1_hosts_post_responses.go | 17 +- .../iaas_service_broker_client.go | 52 +- .../service_broker_health_head_responses.go | 13 +- .../service_broker_health_responses.go | 13 +- .../service_broker_test_timeout_responses.go | 13 +- .../service_broker_version_responses.go | 13 +- .../internal_capacity_management_client.go | 111 + ...l_v1_capacity_management_put_parameters.go | 153 + ...al_v1_capacity_management_put_responses.go | 411 + ...ernal_operations_dedicated_hosts_client.go | 26 +- ...rations_dedicatedhosts_delete_responses.go | 17 +- ...perations_dedicatedhosts_post_responses.go | 15 +- .../internal_operations_images_client.go | 26 +- ...l_v1_operations_images_delete_responses.go | 17 +- ...nal_v1_operations_images_post_responses.go | 15 +- ...perations_network_address_groups_client.go | 26 +- ...s_networkaddressgroups_delete_responses.go | 17 +- ...ons_networkaddressgroups_post_responses.go | 15 +- ...al_operations_network_interfaces_client.go | 26 +- ...ions_networkinterfaces_delete_responses.go | 17 +- ...ations_networkinterfaces_post_responses.go | 15 +- ...erations_network_security_groups_client.go | 26 +- ..._networksecuritygroups_delete_responses.go | 17 +- ...ns_networksecuritygroups_post_responses.go | 15 +- .../internal_operations_networks_client.go | 26 +- ...v1_operations_networks_delete_responses.go | 17 +- ...l_v1_operations_networks_post_responses.go | 15 +- ...nternal_operations_pvm_instances_client.go | 26 +- ...perations_pvminstances_delete_responses.go | 17 +- ..._operations_pvminstances_post_responses.go | 15 +- ...perations_shared_processor_pools_client.go | 26 +- ...s_sharedprocessorpools_delete_responses.go | 17 +- ...ons_sharedprocessorpools_post_responses.go | 15 +- .../internal_operations_snapshots_client.go | 26 +- ...1_operations_snapshots_delete_responses.go | 17 +- ..._v1_operations_snapshots_post_responses.go | 15 +- ...nternal_operationsvp_mem_volumes_client.go | 157 + ...rations_vpmem_volumes_delete_parameters.go | 217 + ...erations_vpmem_volumes_delete_responses.go | 625 ++ ...perations_vpmem_volumes_post_parameters.go | 219 + ...operations_vpmem_volumes_post_responses.go | 487 ++ .../internal_operations_volumes_client.go | 26 +- ..._v1_operations_volumes_delete_responses.go | 17 +- ...al_v1_operations_volumes_post_responses.go | 15 +- .../internal_powervs_instances_client.go | 13 +- ...rnal_v1_powervs_instances_get_responses.go | 9 +- .../internal_powervs_locations_client.go | 52 +- ...owervs_locations_activate_put_responses.go | 13 +- ..._powervs_locations_tag_delete_responses.go | 11 +- ...v1_powervs_locations_tag_post_responses.go | 11 +- ..._locations_transitgateway_get_responses.go | 9 +- .../internal_storage_regions_client.go | 65 +- ...age_regions_storage_pools_get_responses.go | 13 +- ..._regions_storage_pools_getall_responses.go | 13 +- ...age_regions_storage_pools_put_responses.go | 15 +- ...torage_regions_thresholds_get_responses.go | 13 +- ...torage_regions_thresholds_put_responses.go | 19 +- .../internal_transit_gateway_client.go | 13 +- ...nternal_v1_transitgateway_get_responses.go | 7 +- .../network_address_groups_client.go | 88 +- ...v1_network_address_groups_get_responses.go | 15 +- ...work_address_groups_id_delete_responses.go | 17 +- ...network_address_groups_id_get_responses.go | 15 +- ...network_address_groups_id_put_responses.go | 15 +- ...address_groups_members_delete_responses.go | 17 +- ...k_address_groups_members_post_responses.go | 19 +- ...1_network_address_groups_post_responses.go | 21 +- .../network_peers/network_peers_client.go | 395 +- .../v1_network_peers_getall_parameters.go | 128 + .../v1_network_peers_getall_responses.go | 563 ++ .../v1_network_peers_id_delete_parameters.go | 151 + .../v1_network_peers_id_delete_responses.go | 561 ++ .../v1_network_peers_id_get_parameters.go | 151 + .../v1_network_peers_id_get_responses.go | 563 ++ .../v1_network_peers_id_put_parameters.go | 175 + .../v1_network_peers_id_put_responses.go | 563 ++ ...work_peers_interfaces_getall_parameters.go | 128 + ...twork_peers_interfaces_getall_responses.go | 561 ++ .../v1_network_peers_list_parameters.go | 128 - .../v1_network_peers_list_responses.go | 486 -- .../v1_network_peers_post_parameters.go | 153 + .../v1_network_peers_post_responses.go | 563 ++ ...peers_route_filter_id_delete_parameters.go | 173 + ..._peers_route_filter_id_delete_responses.go | 561 ++ ...rk_peers_route_filter_id_get_parameters.go | 173 + ...ork_peers_route_filter_id_get_responses.go | 563 ++ ...ork_peers_route_filters_post_parameters.go | 175 + ...work_peers_route_filters_post_responses.go | 563 ++ .../network_security_groups_client.go | 150 +- ...k_security_groups_action_post_responses.go | 21 +- ...ork_security_groups_id_delete_responses.go | 17 +- ...etwork_security_groups_id_get_responses.go | 15 +- ...twork_security_groups_id_post_responses.go | 15 +- ...etwork_security_groups_id_put_responses.go | 15 +- ..._network_security_groups_list_responses.go | 15 +- ...ecurity_groups_members_delete_responses.go | 17 +- ..._security_groups_members_post_responses.go | 19 +- ...urity_groups_move_member_post_responses.go | 15 +- ..._network_security_groups_post_responses.go | 21 +- ..._security_groups_rules_delete_responses.go | 17 +- ...rk_security_groups_rules_post_responses.go | 19 +- .../power/client/networks/networks_client.go | 67 +- ...rks_network_interfaces_delete_responses.go | 17 +- ...tworks_network_interfaces_get_responses.go | 15 +- ...rks_network_interfaces_getall_responses.go | 15 +- ...works_network_interfaces_post_responses.go | 19 +- ...tworks_network_interfaces_put_responses.go | 17 +- .../client/open_stacks/open_stacks_client.go | 62 +- ...service_broker_openstacks_get_responses.go | 15 +- ...e_broker_openstacks_hosts_get_responses.go | 11 +- ...oker_openstacks_openstack_get_responses.go | 15 +- ...ervice_broker_openstacks_post_responses.go | 21 +- ...broker_openstacks_servers_get_responses.go | 15 +- .../p_cloud_cloud_connections_client.go | 89 +- ...cloud_cloudconnections_delete_responses.go | 21 +- .../pcloud_cloudconnections_get_responses.go | 17 +- ...cloud_cloudconnections_getall_responses.go | 17 +- ...udconnections_networks_delete_responses.go | 21 +- ...cloudconnections_networks_put_responses.go | 21 +- .../pcloud_cloudconnections_post_responses.go | 31 +- .../pcloud_cloudconnections_put_responses.go | 27 +- ...s_virtualprivateclouds_getall_responses.go | 21 +- .../p_cloud_disaster_recovery_client.go | 26 +- ...ocations_disasterrecovery_get_responses.go | 15 +- ...tions_disasterrecovery_getall_responses.go | 15 +- .../p_cloud_events/p_cloud_events_client.go | 26 +- .../pcloud_events_get_responses.go | 15 +- .../pcloud_events_getquery_responses.go | 15 +- .../p_cloud_images/p_cloud_images_client.go | 166 +- ..._cloudinstances_images_delete_responses.go | 17 +- ...dinstances_images_export_post_responses.go | 17 +- ...oud_cloudinstances_images_get_responses.go | 15 +- ..._cloudinstances_images_getall_responses.go | 15 +- ...ud_cloudinstances_images_post_responses.go | 21 +- ...loudinstances_stockimages_get_responses.go | 15 +- ...dinstances_stockimages_getall_responses.go | 15 +- .../pcloud_images_get_responses.go | 15 +- .../pcloud_images_getall_responses.go | 15 +- ..._cloudinstances_cosimages_get_responses.go | 15 +- ...cloudinstances_cosimages_post_responses.go | 19 +- .../pcloud_v2_images_export_get_responses.go | 15 +- .../pcloud_v2_images_export_post_responses.go | 19 +- .../p_cloud_instances_client.go | 85 +- .../pcloud_cloudinstances_delete_responses.go | 17 +- .../pcloud_cloudinstances_get_responses.go | 15 +- .../pcloud_cloudinstances_put_responses.go | 17 +- ...dinstances_shared_images_put_parameters.go | 175 + ...udinstances_shared_images_put_responses.go | 639 ++ .../p_cloud_jobs/p_cloud_jobs_client.go | 39 +- ...ud_cloudinstances_jobs_delete_responses.go | 17 +- ...cloud_cloudinstances_jobs_get_responses.go | 15 +- ...ud_cloudinstances_jobs_getall_responses.go | 15 +- .../p_cloud_networks_client.go | 127 +- .../pcloud_networks_delete_responses.go | 93 +- .../pcloud_networks_get_responses.go | 15 +- .../pcloud_networks_getall_responses.go | 15 +- .../pcloud_networks_ports_delete_responses.go | 17 +- .../pcloud_networks_ports_get_responses.go | 15 +- .../pcloud_networks_ports_getall_responses.go | 15 +- .../pcloud_networks_ports_post_responses.go | 19 +- .../pcloud_networks_ports_put_responses.go | 17 +- .../pcloud_networks_post_responses.go | 23 +- .../pcloud_networks_put_responses.go | 17 +- .../p_cloudp_vm_instances_client.go | 280 +- ...loud_pvminstances_action_post_responses.go | 17 +- ...oud_pvminstances_capture_post_responses.go | 21 +- ...cloud_pvminstances_clone_post_responses.go | 21 +- ...loud_pvminstances_console_get_responses.go | 15 +- ...oud_pvminstances_console_post_responses.go | 19 +- ...loud_pvminstances_console_put_responses.go | 17 +- .../pcloud_pvminstances_delete_responses.go | 19 +- .../pcloud_pvminstances_get_responses.go | 15 +- .../pcloud_pvminstances_getall_responses.go | 17 +- ..._pvminstances_networks_delete_responses.go | 19 +- ...oud_pvminstances_networks_get_responses.go | 15 +- ..._pvminstances_networks_getall_responses.go | 15 +- ...ud_pvminstances_networks_post_responses.go | 19 +- ..._pvminstances_operations_post_responses.go | 19 +- .../pcloud_pvminstances_post_responses.go | 25 +- .../pcloud_pvminstances_put_responses.go | 19 +- ...pvminstances_snapshots_getall_responses.go | 15 +- ...d_pvminstances_snapshots_post_responses.go | 19 +- ...tances_snapshots_restore_post_responses.go | 17 +- ...d_v2_pvminstances_capture_get_responses.go | 15 +- ..._v2_pvminstances_capture_post_responses.go | 19 +- ...pcloud_v2_pvminstances_getall_responses.go | 17 +- .../p_cloud_placement_groups_client.go | 78 +- ...pcloud_placementgroups_delete_responses.go | 15 +- .../pcloud_placementgroups_get_responses.go | 15 +- ...pcloud_placementgroups_getall_responses.go | 15 +- ...lacementgroups_members_delete_responses.go | 19 +- ..._placementgroups_members_post_responses.go | 19 +- .../pcloud_placementgroups_post_responses.go | 19 +- .../p_cloud_pod_capacity_client.go | 13 +- .../pcloud_podcapacity_get_responses.go | 15 +- .../client/p_cloud_s_a_p/p_cloudsap_client.go | 36 +- .../p_cloud_s_a_p/pcloud_sap_get_responses.go | 15 +- .../pcloud_sap_getall_responses.go | 15 +- .../pcloud_sap_post_responses.go | 23 +- .../p_cloudspp_placement_groups_client.go | 78 +- ...oud_sppplacementgroups_delete_responses.go | 17 +- ...pcloud_sppplacementgroups_get_responses.go | 15 +- ...oud_sppplacementgroups_getall_responses.go | 15 +- ...lacementgroups_members_delete_responses.go | 17 +- ...pplacementgroups_members_post_responses.go | 19 +- ...cloud_sppplacementgroups_post_responses.go | 19 +- .../p_cloud_servicedhcp_client.go | 52 +- .../pcloud_dhcp_delete_responses.go | 15 +- .../pcloud_dhcp_get_responses.go | 15 +- .../pcloud_dhcp_getall_responses.go | 15 +- .../pcloud_dhcp_post_responses.go | 17 +- .../p_cloud_shared_processor_pools_client.go | 65 +- ...d_sharedprocessorpools_delete_responses.go | 17 +- ...loud_sharedprocessorpools_get_responses.go | 15 +- ...d_sharedprocessorpools_getall_responses.go | 15 +- ...oud_sharedprocessorpools_post_responses.go | 19 +- ...loud_sharedprocessorpools_put_responses.go | 15 +- .../p_cloud_snapshots_client.go | 52 +- ...oudinstances_snapshots_delete_responses.go | 17 +- ..._cloudinstances_snapshots_get_responses.go | 15 +- ...oudinstances_snapshots_getall_responses.go | 15 +- ..._cloudinstances_snapshots_put_responses.go | 21 +- .../p_cloud_storage_capacity_client.go | 52 +- ...oud_storagecapacity_pools_get_responses.go | 15 +- ..._storagecapacity_pools_getall_responses.go | 15 +- ...oud_storagecapacity_types_get_responses.go | 15 +- ..._storagecapacity_types_getall_responses.go | 15 +- .../p_cloud_storage_tiers_client.go | 13 +- ...instances_storagetiers_getall_responses.go | 15 +- .../p_cloud_system_pools_client.go | 13 +- .../pcloud_systempools_get_responses.go | 15 +- .../p_cloud_tasks/p_cloud_tasks_client.go | 26 +- .../pcloud_tasks_delete_responses.go | 17 +- .../pcloud_tasks_get_responses.go | 15 +- .../p_cloud_tenants/p_cloud_tenants_client.go | 26 +- .../pcloud_tenants_get_responses.go | 15 +- .../pcloud_tenants_put_responses.go | 17 +- .../p_cloud_tenants_ssh_keys_client.go | 62 +- ...pcloud_tenants_sshkeys_delete_responses.go | 17 +- .../pcloud_tenants_sshkeys_get_responses.go | 15 +- ...pcloud_tenants_sshkeys_getall_responses.go | 15 +- .../pcloud_tenants_sshkeys_post_responses.go | 21 +- .../pcloud_tenants_sshkeys_put_responses.go | 17 +- .../p_cloudvp_mem_volumes_client.go | 253 + ...stances_vpmem_volumes_delete_parameters.go | 195 + ...nstances_vpmem_volumes_delete_responses.go | 561 ++ ...minstances_vpmem_volumes_get_parameters.go | 195 + ...vminstances_vpmem_volumes_get_responses.go | 487 ++ ...stances_vpmem_volumes_getall_parameters.go | 173 + ...nstances_vpmem_volumes_getall_responses.go | 487 ++ ...instances_vpmem_volumes_post_parameters.go | 197 + ...minstances_vpmem_volumes_post_responses.go | 639 ++ .../p_cloudvpn_connections_client.go | 143 +- .../pcloud_vpnconnections_delete_responses.go | 15 +- .../pcloud_vpnconnections_get_responses.go | 17 +- .../pcloud_vpnconnections_getall_responses.go | 15 +- ...pnconnections_networks_delete_responses.go | 17 +- ...d_vpnconnections_networks_get_responses.go | 15 +- ...d_vpnconnections_networks_put_responses.go | 17 +- ...onnections_peersubnets_delete_responses.go | 17 +- ...pnconnections_peersubnets_get_responses.go | 15 +- ...pnconnections_peersubnets_put_responses.go | 17 +- .../pcloud_vpnconnections_post_responses.go | 21 +- .../pcloud_vpnconnections_put_responses.go | 17 +- .../p_cloudvpn_policies_client.go | 130 +- .../pcloud_ikepolicies_delete_responses.go | 15 +- .../pcloud_ikepolicies_get_responses.go | 17 +- .../pcloud_ikepolicies_getall_responses.go | 15 +- .../pcloud_ikepolicies_post_responses.go | 17 +- .../pcloud_ikepolicies_put_responses.go | 17 +- .../pcloud_ipsecpolicies_delete_responses.go | 15 +- .../pcloud_ipsecpolicies_get_responses.go | 17 +- .../pcloud_ipsecpolicies_getall_responses.go | 15 +- .../pcloud_ipsecpolicies_post_responses.go | 19 +- .../pcloud_ipsecpolicies_put_responses.go | 19 +- ...virtual_serial_number_getall_parameters.go | 151 - ..._virtual_serial_number_getall_responses.go | 484 -- ...es_virtualserialnumber_delete_responses.go | 17 +- ...ances_virtualserialnumber_get_responses.go | 15 +- ...nces_virtualserialnumber_post_responses.go | 19 +- ...ances_virtualserialnumber_put_responses.go | 19 +- ...ud_virtualserialnumber_delete_responses.go | 17 +- ...cloud_virtualserialnumber_get_responses.go | 15 +- ...ud_virtualserialnumber_getall_responses.go | 15 +- ...cloud_virtualserialnumber_put_responses.go | 17 +- ...alnumber_softwaretiers_getall_responses.go | 13 +- .../p_cloud_volume_groups_client.go | 127 +- ...loud_volumegroups_action_post_responses.go | 17 +- .../pcloud_volumegroups_delete_responses.go | 15 +- ...loud_volumegroups_get_details_responses.go | 15 +- .../pcloud_volumegroups_get_responses.go | 15 +- ...d_volumegroups_getall_details_responses.go | 15 +- .../pcloud_volumegroups_getall_responses.go | 15 +- .../pcloud_volumegroups_post_responses.go | 23 +- .../pcloud_volumegroups_put_responses.go | 19 +- ...remote_copy_relationships_get_responses.go | 17 +- ...umegroups_storage_details_get_responses.go | 17 +- .../p_cloud_volume_onboarding_client.go | 39 +- .../pcloud_volume_onboarding_get_responses.go | 15 +- ...loud_volume_onboarding_getall_responses.go | 15 +- ...pcloud_volume_onboarding_post_responses.go | 17 +- .../p_cloud_volumes/p_cloud_volumes_client.go | 374 +- ...instances_volumes_action_post_responses.go | 17 +- ...cloudinstances_volumes_delete_responses.go | 17 +- ...lumes_flash_copy_mappings_get_responses.go | 17 +- ...ud_cloudinstances_volumes_get_responses.go | 15 +- ...cloudinstances_volumes_getall_responses.go | 15 +- ...d_cloudinstances_volumes_post_responses.go | 19 +- ...ud_cloudinstances_volumes_put_responses.go | 19 +- ..._remote_copy_relationship_get_responses.go | 17 +- ...d_pvminstances_volumes_delete_responses.go | 19 +- ...loud_pvminstances_volumes_get_responses.go | 15 +- ...d_pvminstances_volumes_getall_responses.go | 15 +- ...oud_pvminstances_volumes_post_responses.go | 17 +- ...loud_pvminstances_volumes_put_responses.go | 17 +- ...instances_volumes_setboot_put_responses.go | 17 +- ...2_pvminstances_volumes_delete_responses.go | 17 +- ..._v2_pvminstances_volumes_post_responses.go | 17 +- .../pcloud_v2_volumes_clone_post_responses.go | 17 +- ...oud_v2_volumes_clonetasks_get_responses.go | 17 +- .../pcloud_v2_volumes_delete_responses.go | 19 +- .../pcloud_v2_volumes_getall_responses.go | 15 +- .../pcloud_v2_volumes_post_responses.go | 19 +- ...d_v2_volumesclone_cancel_post_responses.go | 15 +- ...pcloud_v2_volumesclone_delete_responses.go | 15 +- ..._v2_volumesclone_execute_post_responses.go | 15 +- .../pcloud_v2_volumesclone_get_responses.go | 15 +- ...pcloud_v2_volumesclone_getall_responses.go | 15 +- .../pcloud_v2_volumesclone_post_responses.go | 17 +- ...ud_v2_volumesclone_start_post_responses.go | 15 +- .../pcloud_volumes_clone_post_responses.go | 17 +- .../power_edge_router_client.go | 13 +- ...1_poweredgerouter_action_post_responses.go | 17 +- .../power/client/power_iaas_api_client.go | 15 + .../power/client/routes/routes_client.go | 78 +- .../routes/v1_routes_delete_responses.go | 17 +- .../client/routes/v1_routes_get_responses.go | 15 +- .../routes/v1_routes_getall_responses.go | 15 +- .../client/routes/v1_routes_post_responses.go | 19 +- .../client/routes/v1_routes_put_responses.go | 17 +- .../routes/v1_routes_report_get_responses.go | 15 +- .../service_binding_binding_responses.go | 21 +- .../service_binding_get_responses.go | 13 +- ...ce_binding_last_operation_get_responses.go | 15 +- .../service_binding_unbinding_responses.go | 17 +- .../service_bindings_client.go | 46 +- .../service_instance_deprovision_responses.go | 19 +- .../service_instance_get_responses.go | 13 +- ...e_instance_last_operation_get_responses.go | 15 +- .../service_instance_provision_responses.go | 21 +- .../service_instance_update_responses.go | 17 +- .../service_instances_client.go | 56 +- .../client/snapshots/snapshots_client.go | 52 +- .../snapshots/v1_snapshots_get_responses.go | 17 +- .../v1_snapshots_getall_responses.go | 15 +- .../v1_volume_snapshots_get_responses.go | 17 +- .../v1_volume_snapshots_getall_responses.go | 15 +- .../power/client/ssh_keys/ssh_keys_client.go | 65 +- .../ssh_keys/v1_sshkeys_delete_responses.go | 17 +- .../ssh_keys/v1_sshkeys_get_responses.go | 15 +- .../ssh_keys/v1_sshkeys_getall_responses.go | 15 +- .../ssh_keys/v1_sshkeys_post_responses.go | 19 +- .../ssh_keys/v1_sshkeys_put_responses.go | 19 +- ...rvice_broker_storagetypes_get_responses.go | 17 +- .../storage_types/storage_types_client.go | 13 +- .../service_broker_swaggerspec_responses.go | 13 +- .../swagger_spec/swagger_spec_client.go | 13 +- .../workspaces/v1_workspaces_get_responses.go | 17 +- .../v1_workspaces_getall_parameters.go | 36 + .../v1_workspaces_getall_responses.go | 13 +- .../client/workspaces/workspaces_client.go | 26 +- .../power/models/access_config.go | 4 +- .../power/models/access_role.go | 17 +- .../power-go-client/power/models/add_host.go | 32 +- .../auxiliary_volumes_for_onboarding.go | 17 +- .../power/models/available_host.go | 17 +- .../power/models/available_host_capacity.go | 33 +- .../power/models/available_host_list.go | 9 +- .../power/models/available_stock_images.go | 17 +- .../power/models/capabilities_details.go | 33 +- .../power-go-client/power/models/catalog.go | 17 +- .../power/models/clone_task_status.go | 19 +- .../power/models/cloned_volume_detail.go | 33 +- .../power/models/cloud_connection.go | 49 +- .../power/models/cloud_connection_create.go | 35 +- .../cloud_connection_create_response.go | 17 +- .../cloud_connection_endpoint_classic.go | 17 +- ...loud_connection_endpoint_classic_update.go | 17 +- .../models/cloud_connection_endpoint_v_p_c.go | 17 +- .../power/models/cloud_connection_update.go | 35 +- ...cloud_connection_virtual_private_clouds.go | 17 +- .../power/models/cloud_connections.go | 17 +- .../power/models/cloud_initialization.go | 2 +- .../power/models/cloud_instance.go | 49 +- .../power/models/cloud_instance_reference.go | 17 +- .../models/cloud_instance_shared_images.go | 50 + .../power/models/console_languages.go | 17 +- .../power-go-client/power/models/context.go | 2 +- .../models/create_cos_image_import_job.go | 53 +- .../power/models/create_data_volume.go | 19 +- .../power/models/create_image.go | 37 +- .../create_server_virtual_serial_number.go | 17 +- .../power/models/create_workspace_ssh_key.go | 2 +- .../power/models/d_h_c_p_server.go | 17 +- .../power/models/d_h_c_p_server_detail.go | 33 +- .../power/models/d_h_c_p_servers.go | 17 +- .../power/models/datacenter.go | 37 +- .../power/models/datacenters.go | 17 +- .../power/models/dead_peer_detection.go | 2 +- .../power/models/deployment_target.go | 2 +- .../power/models/disaster_recovery.go | 33 +- .../models/disaster_recovery_location.go | 17 +- .../models/disaster_recovery_locations.go | 17 +- .../power-go-client/power/models/event.go | 21 +- .../power-go-client/power/models/events.go | 17 +- .../power/models/flash_copy_mappings.go | 17 +- .../get_server_virtual_serial_number.go | 17 +- .../power/models/hardware_platform.go | 17 +- .../power/models/hardware_platforms.go | 9 +- .../power/models/host_capacity.go | 33 +- .../power/models/host_create.go | 17 +- .../power/models/host_group.go | 19 +- .../power/models/host_group_create.go | 33 +- .../power/models/host_group_list.go | 17 +- .../power/models/host_group_share_op.go | 17 +- .../power-go-client/power/models/host_info.go | 49 +- .../power-go-client/power/models/host_list.go | 17 +- .../power/models/host_p_vm_instance.go | 17 +- .../power-go-client/power/models/host_put.go | 15 + .../power/models/i_k_e_policies.go | 17 +- .../power/models/i_k_e_policy.go | 39 +- .../models/i_k_e_policy_authentication.go | 2 +- .../power/models/i_k_e_policy_create.go | 39 +- .../power/models/i_k_e_policy_update.go | 45 +- .../power-go-client/power/models/image.go | 81 +- .../power/models/image_import_details.go | 6 +- .../power/models/image_reference.go | 33 +- .../power/models/image_specifications.go | 3 + .../power-go-client/power/models/images.go | 17 +- .../power/models/instance_capabilities.go | 9 +- .../internal_capacity_management_request.go | 141 + .../internal_capacity_management_response.go | 74 + .../models/internal_operations_response.go | 17 +- .../models/ip_s_e_c_policy_authentication.go | 2 +- .../power/models/ip_sec_policies.go | 17 +- .../power/models/ip_sec_policy.go | 37 +- .../power/models/ip_sec_policy_create.go | 37 +- .../power/models/ip_sec_policy_update.go | 43 +- .../power-go-client/power/models/job.go | 33 +- .../power-go-client/power/models/jobs.go | 17 +- .../power/models/json_schema_object.go | 2 +- .../power/models/last_operation_resource.go | 4 +- .../power-go-client/power/models/metadata.go | 2 +- .../power/models/multi_volumes_create.go | 19 +- .../power-go-client/power/models/network.go | 211 +- .../power/models/network_address_group.go | 68 +- .../models/network_address_group_create.go | 59 +- .../power/models/network_address_groups.go | 17 +- .../models/network_address_translation.go | 2 +- .../power/models/network_create.go | 2 +- .../power/models/network_create_peer.go | 52 +- .../power/models/network_interface.go | 68 +- .../power/models/network_interfaces.go | 17 +- .../power/models/network_peer.go | 520 +- .../power/models/network_peer_create.go | 339 + .../power/models/network_peer_type.go | 2 +- .../power/models/network_peer_update.go | 241 + .../power/models/network_peers.go | 17 +- .../power/models/network_port.go | 17 +- .../power/models/network_port_create.go | 17 +- .../power/models/network_ports.go | 17 +- .../power/models/network_reference.go | 2 +- .../power/models/network_security_group.go | 84 +- .../network_security_group_add_member.go | 2 +- .../models/network_security_group_add_rule.go | 99 +- .../models/network_security_group_create.go | 59 +- .../models/network_security_group_member.go | 2 +- .../models/network_security_group_rule.go | 67 +- .../network_security_group_rule_protocol.go | 21 +- ...k_security_group_rule_protocol_tcp_flag.go | 2 +- .../network_security_group_rule_remote.go | 2 +- .../power/models/network_security_groups.go | 17 +- .../models/network_security_groups_action.go | 2 +- .../power/models/network_update.go | 24 +- .../power-go-client/power/models/networks.go | 17 +- .../power-go-client/power/models/object.go | 2 +- .../power/models/open_stack_info.go | 17 +- .../power/models/open_stacks.go | 17 +- .../power/models/operations.go | 28 +- .../power/models/owner_info.go | 17 +- .../power/models/p_vm_instance.go | 271 +- .../power/models/p_vm_instance_action.go | 31 +- .../power/models/p_vm_instance_capture.go | 19 +- .../power/models/p_vm_instance_clone.go | 35 +- .../models/p_vm_instance_configuration.go | 65 +- .../power/models/p_vm_instance_create.go | 212 +- .../power/models/p_vm_instance_list.go | 17 +- .../models/p_vm_instance_multi_create.go | 4 +- .../power/models/p_vm_instance_networks.go | 17 +- .../power/models/p_vm_instance_operation.go | 19 +- .../power/models/p_vm_instance_reference.go | 255 +- .../models/p_vm_instance_reference_v2.go | 263 +- .../power/models/p_vm_instance_update.go | 70 +- .../models/p_vm_instance_update_response.go | 38 +- .../models/p_vm_instance_v2_network_port.go | 4 +- .../power/models/p_vm_instances.go | 17 +- .../power/models/p_vm_instances_v2.go | 17 +- .../power/models/peer_interface.go | 180 + .../power/models/peer_interfaces.go | 87 + .../power/models/pin_policy.go | 2 +- .../power/models/placement_group.go | 35 +- .../power/models/placement_group_create.go | 19 +- .../power/models/placement_groups.go | 17 +- .../power-go-client/power/models/plan.go | 17 +- .../power/models/pod_capacity.go | 49 +- .../power/models/power_edge_router_action.go | 2 +- .../power/models/power_v_s_instance.go | 17 +- .../power/models/power_v_s_instances.go | 17 +- .../power/models/pvm_instance_deployment.go | 2 +- .../power/models/region_storage_tiers.go | 17 +- .../power/models/region_storage_types.go | 17 +- .../power/models/replication_service.go | 17 +- .../power/models/replication_sites.go | 17 +- .../models/replication_target_location.go | 2 +- .../power/models/resource_access.go | 9 +- .../power-go-client/power/models/route.go | 27 +- .../power/models/route_create.go | 25 +- .../power/models/route_filter.go | 367 + .../power/models/route_filter_create.go | 261 + .../power/models/route_report.go | 17 +- .../power/models/route_report_route.go | 2 +- .../power-go-client/power/models/routes.go | 17 +- .../power/models/s_a_p_create.go | 172 +- .../power/models/s_a_p_profile.go | 111 +- .../power/models/s_a_p_profiles.go | 17 +- .../power/models/s_p_p_placement_group.go | 33 +- .../models/s_p_p_placement_group_create.go | 19 +- .../power/models/s_p_p_placement_groups.go | 17 +- .../power/models/schemas_object.go | 33 +- .../power-go-client/power/models/service.go | 35 +- .../models/service_authentication_info.go | 33 +- .../power/models/service_binding.go | 17 +- .../power/models/service_binding_request.go | 17 +- .../power/models/service_binding_resource.go | 17 +- .../models/service_binding_schema_object.go | 17 +- .../models/service_binding_volume_mount.go | 21 +- .../service_instance_async_operation.go | 2 +- .../models/service_instance_schema_object.go | 33 +- .../power/models/service_instance_update.go | 2 +- .../models/service_instance_update_request.go | 17 +- .../power/models/shared_processor_pool.go | 20 + .../models/shared_processor_pool_create.go | 17 +- .../models/shared_processor_pool_detail.go | 33 +- .../power/models/shared_processor_pools.go | 17 +- .../power-go-client/power/models/site.go | 17 +- .../power-go-client/power/models/snapshot.go | 19 +- .../power/models/snapshot_create.go | 34 +- .../power/models/snapshot_create_response.go | 33 +- .../power/models/snapshot_list.go | 17 +- .../power/models/snapshot_update.go | 27 +- .../power/models/snapshot_v1.go | 17 +- .../power-go-client/power/models/snapshots.go | 17 +- .../power/models/software_tier.go | 2 +- .../power-go-client/power/models/ssh_keys.go | 17 +- .../power/models/status_description.go | 17 +- .../power/models/stock_images.go | 17 +- .../power/models/storage_affinity.go | 2 +- .../power/models/storage_controller.go | 9 +- .../power/models/storage_controllers.go | 9 +- .../power/models/storage_pool.go | 19 +- .../power/models/storage_pools.go | 17 +- .../power/models/storage_pools_capacity.go | 33 +- .../power/models/storage_tier.go | 2 +- .../power/models/storage_type.go | 2 +- .../power/models/storage_type_capacity.go | 33 +- .../power/models/storage_types.go | 17 +- .../power/models/storage_types_capacity.go | 33 +- .../power/models/supported_software_tier.go | 17 +- .../models/supported_software_tier_list.go | 17 +- .../power/models/system_pool.go | 97 +- .../power/models/system_pool_capacity.go | 17 +- .../power/models/system_pools.go | 9 +- .../power/models/system_pools_capacity.go | 9 +- .../power-go-client/power/models/tenant.go | 49 +- .../power/models/tenant_update.go | 17 +- .../power/models/thresholds.go | 81 +- .../power/models/token_extra.go | 17 +- .../power/models/token_request.go | 2 +- .../models/transit_connection_error_item.go | 17 +- .../power/models/transit_gateway_instance.go | 17 +- .../power/models/transit_gateway_location.go | 2 +- .../power/models/transit_gateway_locations.go | 17 +- .../update_server_virtual_serial_number.go | 17 +- .../power/models/update_storage_pool.go | 19 +- .../power/models/update_workspace_ssh_key.go | 2 +- .../power/models/user_authentication_info.go | 49 +- .../power/models/v_p_mem_volume_attach.go | 183 + .../power/models/v_p_mem_volume_create.go | 108 + .../power/models/v_p_mem_volume_reference.go | 264 + .../power/models/v_p_mem_volumes.go | 133 + .../power/models/v_p_n_connection.go | 69 +- .../power/models/v_p_n_connection_create.go | 19 +- .../v_p_n_connection_create_response.go | 17 +- .../power/models/v_p_n_connection_update.go | 23 +- .../power/models/v_p_n_connections.go | 17 +- .../power/models/virtual_serial_number.go | 17 +- .../models/virtual_serial_number_list.go | 17 +- .../power-go-client/power/models/volume.go | 38 +- .../power/models/volume_group.go | 17 +- .../power/models/volume_group_action.go | 55 +- .../power/models/volume_group_action_reset.go | 2 +- .../power/models/volume_group_action_start.go | 2 +- .../power/models/volume_group_create.go | 3 + .../power/models/volume_group_details.go | 20 +- .../volume_group_remote_copy_relationships.go | 17 +- .../power/models/volume_group_update.go | 3 + .../power/models/volume_groups.go | 17 +- .../power/models/volume_groups_details.go | 17 +- .../power/models/volume_info.go | 17 +- .../power/models/volume_onboarding.go | 33 +- .../power/models/volume_onboarding_create.go | 33 +- .../power/models/volume_onboardings.go | 17 +- .../power/models/volume_reference.go | 38 +- .../power/models/volume_snapshot_list.go | 17 +- .../power-go-client/power/models/volumes.go | 17 +- .../models/volumes_clone_async_request.go | 17 +- .../power/models/volumes_clone_detail.go | 17 +- .../power/models/volumes_clone_execute.go | 17 +- .../power/models/volumes_clone_response.go | 2 +- .../power/models/volumes_clones.go | 17 +- .../power-go-client/power/models/workspace.go | 35 +- .../power/models/workspace_details.go | 33 +- ...rkspace_network_security_groups_details.go | 2 +- .../workspace_power_edge_router_details.go | 6 +- .../power/models/workspace_ssh_keys.go | 17 +- .../power/models/workspaces.go | 17 +- .../IBM/go-sdk-core/v5/core/version.go | 2 +- .../ibm-cos-sdk-go/aws/endpoints/defaults.go | 8 +- .../IBM/ibm-cos-sdk-go/aws/version.go | 2 +- .../IBM/ibm-cos-sdk-go/service/s3/api.go | 528 ++ .../transit_gateway_apis_v1.go | 992 ++- .../common/version.go | 2 +- .../globalsearchv2/global_search_v2.go | 62 +- .../iamidentityv1/iam_identity_v1.go | 1183 +-- .../iam_policy_management_v1.go | 5757 ++++++++++--- .../IBM/vpc-go-sdk/common/version.go | 2 +- .../github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go | 7616 +++++++++++++++-- .../asaskevich/govalidator/.gitignore | 15 - .../asaskevich/govalidator/.travis.yml | 12 - .../asaskevich/govalidator/CODE_OF_CONDUCT.md | 43 - .../asaskevich/govalidator/CONTRIBUTING.md | 63 - .../github.com/asaskevich/govalidator/LICENSE | 21 - .../asaskevich/govalidator/README.md | 622 -- .../asaskevich/govalidator/arrays.go | 87 - .../asaskevich/govalidator/converter.go | 81 - .../github.com/asaskevich/govalidator/doc.go | 3 - .../asaskevich/govalidator/error.go | 47 - .../asaskevich/govalidator/numerics.go | 100 - .../asaskevich/govalidator/patterns.go | 113 - .../asaskevich/govalidator/types.go | 656 -- .../asaskevich/govalidator/utils.go | 270 - .../asaskevich/govalidator/v11/.gitignore | 15 - .../asaskevich/govalidator/v11/.travis.yml | 12 - .../govalidator/v11/CODE_OF_CONDUCT.md | 43 - .../govalidator/v11/CONTRIBUTING.md | 63 - .../asaskevich/govalidator/v11/LICENSE | 21 - .../asaskevich/govalidator/v11/README.md | 624 -- .../asaskevich/govalidator/v11/arrays.go | 87 - .../asaskevich/govalidator/v11/converter.go | 81 - .../asaskevich/govalidator/v11/doc.go | 3 - .../asaskevich/govalidator/v11/error.go | 47 - .../asaskevich/govalidator/v11/numerics.go | 100 - .../asaskevich/govalidator/v11/patterns.go | 113 - .../asaskevich/govalidator/v11/types.go | 657 -- .../asaskevich/govalidator/v11/utils.go | 270 - .../asaskevich/govalidator/v11/validator.go | 1775 ---- .../asaskevich/govalidator/v11/wercker.yml | 15 - .../asaskevich/govalidator/validator.go | 1768 ---- .../asaskevich/govalidator/wercker.yml | 15 - .../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +- .../aws/protocol/eventstream/CHANGELOG.md | 13 + .../aws/protocol/eventstream/debug.go | 10 +- .../aws/protocol/eventstream/encode.go | 2 +- .../aws/protocol/eventstream/error.go | 2 +- .../eventstream/go_module_metadata.go | 2 +- .../aws/protocol/eventstream/header.go | 4 +- .../aws/protocol/eventstream/header_value.go | 22 +- .../aws/protocol/query/middleware.go | 4 +- .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 24 +- .../aws/transport/http/client.go | 11 + .../internal/configsources/CHANGELOG.md | 14 + .../internal/configsources/config.go | 6 +- .../internal/configsources/endpoints.go | 4 +- .../configsources/go_module_metadata.go | 2 +- .../internal/endpoints/v2/CHANGELOG.md | 14 + .../internal/endpoints/v2/endpoints.go | 6 +- .../endpoints/v2/go_module_metadata.go | 2 +- .../internal/middleware/middleware.go | 20 +- .../aws-sdk-go-v2/internal/v4a/CHANGELOG.md | 18 + .../internal/v4a/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/internal/v4a/smithy.go | 2 +- .../aws/aws-sdk-go-v2/internal/v4a/v4a.go | 2 +- .../internal/accept-encoding/CHANGELOG.md | 8 + .../accept-encoding/go_module_metadata.go | 2 +- .../service/internal/checksum/CHANGELOG.md | 19 + .../internal/checksum/go_module_metadata.go | 2 +- .../internal/checksum/middleware_add.go | 6 +- .../middleware_compute_input_checksum.go | 40 +- .../checksum/middleware_setup_context.go | 6 +- .../internal/presigned-url/CHANGELOG.md | 14 + .../presigned-url/go_module_metadata.go | 2 +- .../internal/presigned-url/middleware.go | 12 +- .../service/internal/s3shared/CHANGELOG.md | 14 + .../service/internal/s3shared/arn_lookup.go | 2 +- .../internal/s3shared/go_module_metadata.go | 2 +- .../internal/s3shared/response_error.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/CHANGELOG.md | 32 + .../aws-sdk-go-v2/service/s3/api_client.go | 24 +- .../service/s3/api_op_AbortMultipartUpload.go | 5 +- .../s3/api_op_CompleteMultipartUpload.go | 5 +- .../service/s3/api_op_CopyObject.go | 13 +- .../service/s3/api_op_CreateBucket.go | 39 +- ...pi_op_CreateBucketMetadataConfiguration.go | 5 +- ..._CreateBucketMetadataTableConfiguration.go | 5 +- .../s3/api_op_CreateMultipartUpload.go | 5 +- .../service/s3/api_op_CreateSession.go | 19 +- .../service/s3/api_op_DeleteBucket.go | 5 +- ...i_op_DeleteBucketAnalyticsConfiguration.go | 5 +- .../service/s3/api_op_DeleteBucketCors.go | 5 +- .../s3/api_op_DeleteBucketEncryption.go | 5 +- ...teBucketIntelligentTieringConfiguration.go | 5 +- ...i_op_DeleteBucketInventoryConfiguration.go | 5 +- .../s3/api_op_DeleteBucketLifecycle.go | 5 +- ...pi_op_DeleteBucketMetadataConfiguration.go | 5 +- ..._DeleteBucketMetadataTableConfiguration.go | 5 +- ...api_op_DeleteBucketMetricsConfiguration.go | 5 +- .../api_op_DeleteBucketOwnershipControls.go | 5 +- .../service/s3/api_op_DeleteBucketPolicy.go | 5 +- .../s3/api_op_DeleteBucketReplication.go | 5 +- .../service/s3/api_op_DeleteBucketTagging.go | 8 +- .../service/s3/api_op_DeleteBucketWebsite.go | 5 +- .../service/s3/api_op_DeleteObject.go | 5 +- .../service/s3/api_op_DeleteObjectTagging.go | 5 +- .../service/s3/api_op_DeleteObjects.go | 5 +- .../s3/api_op_DeletePublicAccessBlock.go | 5 +- .../service/s3/api_op_GetBucketAbac.go | 5 +- ...api_op_GetBucketAccelerateConfiguration.go | 5 +- .../service/s3/api_op_GetBucketAcl.go | 5 +- .../api_op_GetBucketAnalyticsConfiguration.go | 5 +- .../service/s3/api_op_GetBucketCors.go | 5 +- .../service/s3/api_op_GetBucketEncryption.go | 5 +- ...etBucketIntelligentTieringConfiguration.go | 5 +- .../api_op_GetBucketInventoryConfiguration.go | 5 +- .../api_op_GetBucketLifecycleConfiguration.go | 5 +- .../service/s3/api_op_GetBucketLocation.go | 5 +- .../service/s3/api_op_GetBucketLogging.go | 5 +- .../api_op_GetBucketMetadataConfiguration.go | 5 +- ..._op_GetBucketMetadataTableConfiguration.go | 5 +- .../api_op_GetBucketMetricsConfiguration.go | 5 +- ...i_op_GetBucketNotificationConfiguration.go | 5 +- .../s3/api_op_GetBucketOwnershipControls.go | 5 +- .../service/s3/api_op_GetBucketPolicy.go | 5 +- .../s3/api_op_GetBucketPolicyStatus.go | 5 +- .../service/s3/api_op_GetBucketReplication.go | 5 +- .../s3/api_op_GetBucketRequestPayment.go | 5 +- .../service/s3/api_op_GetBucketTagging.go | 10 +- .../service/s3/api_op_GetBucketVersioning.go | 5 +- .../service/s3/api_op_GetBucketWebsite.go | 5 +- .../service/s3/api_op_GetObject.go | 5 +- .../service/s3/api_op_GetObjectAcl.go | 5 +- .../service/s3/api_op_GetObjectAttributes.go | 5 +- .../service/s3/api_op_GetObjectLegalHold.go | 5 +- .../s3/api_op_GetObjectLockConfiguration.go | 5 +- .../service/s3/api_op_GetObjectRetention.go | 5 +- .../service/s3/api_op_GetObjectTagging.go | 5 +- .../service/s3/api_op_GetObjectTorrent.go | 5 +- .../service/s3/api_op_GetPublicAccessBlock.go | 5 +- .../service/s3/api_op_HeadBucket.go | 13 +- .../service/s3/api_op_HeadObject.go | 5 +- ...pi_op_ListBucketAnalyticsConfigurations.go | 5 +- ...tBucketIntelligentTieringConfigurations.go | 5 +- ...pi_op_ListBucketInventoryConfigurations.go | 5 +- .../api_op_ListBucketMetricsConfigurations.go | 5 +- .../service/s3/api_op_ListBuckets.go | 5 +- .../service/s3/api_op_ListDirectoryBuckets.go | 5 +- .../service/s3/api_op_ListMultipartUploads.go | 5 +- .../service/s3/api_op_ListObjectVersions.go | 5 +- .../service/s3/api_op_ListObjects.go | 5 +- .../service/s3/api_op_ListObjectsV2.go | 5 +- .../service/s3/api_op_ListParts.go | 5 +- .../service/s3/api_op_PutBucketAbac.go | 5 +- ...api_op_PutBucketAccelerateConfiguration.go | 5 +- .../service/s3/api_op_PutBucketAcl.go | 5 +- .../api_op_PutBucketAnalyticsConfiguration.go | 5 +- .../service/s3/api_op_PutBucketCors.go | 5 +- .../service/s3/api_op_PutBucketEncryption.go | 5 +- ...utBucketIntelligentTieringConfiguration.go | 5 +- .../api_op_PutBucketInventoryConfiguration.go | 5 +- .../api_op_PutBucketLifecycleConfiguration.go | 5 +- .../service/s3/api_op_PutBucketLogging.go | 5 +- .../api_op_PutBucketMetricsConfiguration.go | 5 +- ...i_op_PutBucketNotificationConfiguration.go | 5 +- .../s3/api_op_PutBucketOwnershipControls.go | 5 +- .../service/s3/api_op_PutBucketPolicy.go | 5 +- .../service/s3/api_op_PutBucketReplication.go | 5 +- .../s3/api_op_PutBucketRequestPayment.go | 5 +- .../service/s3/api_op_PutBucketTagging.go | 5 +- .../service/s3/api_op_PutBucketVersioning.go | 5 +- .../service/s3/api_op_PutBucketWebsite.go | 5 +- .../service/s3/api_op_PutObject.go | 5 +- .../service/s3/api_op_PutObjectAcl.go | 5 +- .../service/s3/api_op_PutObjectLegalHold.go | 5 +- .../s3/api_op_PutObjectLockConfiguration.go | 5 +- .../service/s3/api_op_PutObjectRetention.go | 5 +- .../service/s3/api_op_PutObjectTagging.go | 5 +- .../service/s3/api_op_PutPublicAccessBlock.go | 5 +- .../service/s3/api_op_RenameObject.go | 5 +- .../service/s3/api_op_RestoreObject.go | 5 +- .../service/s3/api_op_SelectObjectContent.go | 5 +- ...cketMetadataInventoryTableConfiguration.go | 5 +- ...BucketMetadataJournalTableConfiguration.go | 5 +- .../s3/api_op_UpdateObjectEncryption.go | 5 +- .../service/s3/api_op_UploadPart.go | 5 +- .../service/s3/api_op_UploadPartCopy.go | 13 +- .../s3/api_op_WriteGetObjectResponse.go | 5 +- .../service/s3/bucket_context.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/bucketer.go | 2 +- .../service/s3/express_default.go | 2 +- .../aws-sdk-go-v2/service/s3/generated.json | 3 +- .../service/s3/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/options.go | 3 +- .../aws-sdk-go-v2/service/s3/presign_post.go | 24 +- .../aws-sdk-go-v2/service/s3/serializers.go | 5 + .../aws-sdk-go-v2/service/s3/types/enums.go | 19 + vendor/github.com/aws/smithy-go/CHANGELOG.md | 9 + vendor/github.com/aws/smithy-go/README.md | 4 +- .../aws/smithy-go/go_module_metadata.go | 2 +- .../coreos/go-systemd/v22/unit/deserialize.go | 7 +- .../coreos/go-systemd/v22/unit/escape.go | 2 +- vendor/github.com/fatih/color/color.go | 112 +- .../github.com/fatih/color/color_windows.go | 3 + .../github.com/fsnotify/fsnotify/.cirrus.yml | 14 + .../github.com/fsnotify/fsnotify/.gitignore | 10 + vendor/github.com/fsnotify/fsnotify/.mailmap | 2 + .../github.com/fsnotify/fsnotify/CHANGELOG.md | 602 ++ .../fsnotify/fsnotify/CONTRIBUTING.md | 145 + vendor/github.com/fsnotify/fsnotify/LICENSE | 25 + vendor/github.com/fsnotify/fsnotify/README.md | 182 + .../fsnotify/fsnotify/backend_fen.go | 467 + .../fsnotify/fsnotify/backend_inotify.go | 583 ++ .../fsnotify/fsnotify/backend_kqueue.go | 705 ++ .../fsnotify/fsnotify/backend_other.go | 22 + .../fsnotify/fsnotify/backend_windows.go | 680 ++ .../github.com/fsnotify/fsnotify/fsnotify.go | 496 ++ .../fsnotify/fsnotify/internal/darwin.go | 39 + .../fsnotify/internal/debug_darwin.go | 57 + .../fsnotify/internal/debug_dragonfly.go | 33 + .../fsnotify/internal/debug_freebsd.go | 42 + .../fsnotify/internal/debug_kqueue.go | 32 + .../fsnotify/fsnotify/internal/debug_linux.go | 56 + .../fsnotify/internal/debug_netbsd.go | 25 + .../fsnotify/internal/debug_openbsd.go | 28 + .../fsnotify/internal/debug_solaris.go | 45 + .../fsnotify/internal/debug_windows.go | 40 + .../fsnotify/fsnotify/internal/freebsd.go | 31 + .../fsnotify/fsnotify/internal/internal.go | 2 + .../fsnotify/fsnotify/internal/unix.go | 31 + .../fsnotify/fsnotify/internal/unix2.go | 7 + .../fsnotify/fsnotify/internal/windows.go | 41 + vendor/github.com/fsnotify/fsnotify/shared.go | 64 + .../fsnotify/fsnotify/staticcheck.conf | 3 + .../fsnotify/fsnotify/system_bsd.go | 7 + .../fsnotify/fsnotify/system_darwin.go | 8 + .../mimetype/.git-blame-ignore-revs | 9 + .../mimetype/CODE_OF_CONDUCT.md | 76 - .../gabriel-vasile/mimetype/CONTRIBUTING.md | 12 - .../gabriel-vasile/mimetype/README.md | 37 +- .../mimetype/internal/charset/charset.go | 230 +- .../mimetype/internal/csv/parser.go | 125 + .../mimetype/internal/json/parser.go | 33 +- .../mimetype/internal/magic/archive.go | 108 +- .../mimetype/internal/magic/audio.go | 64 +- .../mimetype/internal/magic/binary.go | 72 +- .../mimetype/internal/magic/database.go | 24 +- .../mimetype/internal/magic/document.go | 78 +- .../mimetype/internal/magic/font.go | 22 +- .../mimetype/internal/magic/ftyp.go | 103 +- .../mimetype/internal/magic/image.go | 194 +- .../mimetype/internal/magic/magic.go | 199 +- .../mimetype/internal/magic/ms_office.go | 53 +- .../mimetype/internal/magic/netpbm.go | 111 + .../mimetype/internal/magic/text.go | 387 +- .../mimetype/internal/magic/text_csv.go | 80 +- .../mimetype/internal/magic/video.go | 22 +- .../mimetype/internal/magic/zip.go | 271 +- .../mimetype/internal/markup/markup.go | 105 + .../mimetype/internal/scan/bytes.go | 262 + .../gabriel-vasile/mimetype/mime.go | 53 +- .../gabriel-vasile/mimetype/mimetype.go | 13 +- .../mimetype/supported_mimes.md | 377 +- .../gabriel-vasile/mimetype/tree.go | 65 +- .../go-openapi/errors/.golangci.yml | 114 +- vendor/github.com/go-openapi/errors/README.md | 4 + vendor/github.com/go-openapi/errors/api.go | 29 +- vendor/github.com/go-openapi/errors/auth.go | 15 +- vendor/github.com/go-openapi/errors/doc.go | 15 +- .../github.com/go-openapi/errors/headers.go | 25 +- .../go-openapi/errors/middleware.go | 19 +- .../github.com/go-openapi/errors/parsing.go | 53 +- vendor/github.com/go-openapi/errors/schema.go | 51 +- .../go-openapi/jsonpointer/.cliff.toml | 181 + .../go-openapi/jsonpointer/.gitignore | 5 +- .../go-openapi/jsonpointer/.golangci.yml | 106 +- .../go-openapi/jsonpointer/CONTRIBUTORS.md | 24 + .../github.com/go-openapi/jsonpointer/LICENSE | 1 - .../github.com/go-openapi/jsonpointer/NOTICE | 39 + .../go-openapi/jsonpointer/README.md | 141 +- .../go-openapi/jsonpointer/SECURITY.md | 19 + .../go-openapi/jsonpointer/errors.go | 23 +- .../go-openapi/jsonpointer/pointer.go | 607 +- .../go-openapi/strfmt/.golangci.yml | 120 +- vendor/github.com/go-openapi/strfmt/README.md | 13 +- vendor/github.com/go-openapi/strfmt/bson.go | 62 +- vendor/github.com/go-openapi/strfmt/date.go | 44 +- .../github.com/go-openapi/strfmt/default.go | 1041 +-- vendor/github.com/go-openapi/strfmt/doc.go | 15 +- .../github.com/go-openapi/strfmt/duration.go | 87 +- vendor/github.com/go-openapi/strfmt/errors.go | 13 + vendor/github.com/go-openapi/strfmt/format.go | 80 +- vendor/github.com/go-openapi/strfmt/ifaces.go | 32 + vendor/github.com/go-openapi/strfmt/mongo.go | 646 ++ vendor/github.com/go-openapi/strfmt/time.go | 135 +- vendor/github.com/go-openapi/strfmt/ulid.go | 38 +- .../go-playground/validator/v10/README.md | 7 +- .../go-playground/validator/v10/baked_in.go | 39 + .../go-playground/validator/v10/doc.go | 13 + .../go-playground/validator/v10/regexes.go | 2 + .../validator/v10/validator_instance.go | 60 +- .../go-viper/mapstructure/v2/.editorconfig | 21 + .../go-viper/mapstructure/v2/.envrc | 4 + .../go-viper/mapstructure/v2/.gitignore | 6 + .../go-viper/mapstructure/v2/.golangci.yaml | 48 + .../mapstructure/v2}/CHANGELOG.md | 8 + .../mapstructure/v2}/LICENSE | 0 .../go-viper/mapstructure/v2/README.md | 81 + .../go-viper/mapstructure/v2/decode_hooks.go | 714 ++ .../go-viper/mapstructure/v2/errors.go | 244 + .../go-viper/mapstructure/v2/flake.lock | 294 + .../go-viper/mapstructure/v2/flake.nix | 46 + .../mapstructure/v2/internal/errors/errors.go | 11 + .../mapstructure/v2/internal/errors/join.go | 9 + .../v2/internal/errors/join_go1_19.go | 61 + .../mapstructure/v2}/mapstructure.go | 594 +- .../mapstructure/v2/reflect_go1_19.go | 44 + .../mapstructure/v2/reflect_go1_20.go | 10 + .../googleapis/gax-go/v2/CHANGES.md | 14 +- .../googleapis/gax-go/v2/feature.go | 75 + .../googleapis/gax-go/v2/internal/version.go | 39 +- .../github.com/googleapis/gax-go/v2/invoke.go | 21 +- .../gophercloud/gophercloud/v2/CHANGELOG.md | 32 + .../blockstorage/v3/volumetypes/requests.go | 4 + .../openstack/compute/v2/servers/requests.go | 29 +- .../openstack/compute/v2/servers/results.go | 57 +- .../identity/v3/ec2tokens/requests.go | 6 +- .../v2/openstack/image/v2/images/results.go | 10 +- .../v2/openstack/image/v2/images/types.go | 6 +- .../networking/v2/extensions/quotas/doc.go | 10 + .../v2/extensions/quotas/requests.go | 6 + .../v2/extensions/quotas/results.go | 6 + .../networking/v2/extensions/quotas/urls.go | 4 + .../openstack/networking/v2/ports/requests.go | 1 + .../gophercloud/v2/provider_client.go | 15 +- .../gophercloud/gophercloud/v2/util.go | 3 - .../gregjones/httpcache/.travis.yml | 18 - .../github.com/gregjones/httpcache/README.md | 29 - .../hashicorp/go-version/CHANGELOG.md | 38 + .../github.com/hashicorp/go-version/README.md | 26 + .../hashicorp/go-version/version.go | 54 +- vendor/github.com/itchyny/gojq/.dockerignore | 9 - vendor/github.com/itchyny/gojq/.gitattributes | 2 - vendor/github.com/itchyny/gojq/.gitignore | 8 - vendor/github.com/itchyny/gojq/CHANGELOG.md | 319 - vendor/github.com/itchyny/gojq/Dockerfile | 12 - vendor/github.com/itchyny/gojq/LICENSE | 21 - vendor/github.com/itchyny/gojq/Makefile | 110 - vendor/github.com/itchyny/gojq/README.md | 152 - vendor/github.com/itchyny/gojq/_gojq | 32 - vendor/github.com/itchyny/gojq/builtin.go | 70 - vendor/github.com/itchyny/gojq/builtin.jq | 164 - vendor/github.com/itchyny/gojq/code.go | 108 - vendor/github.com/itchyny/gojq/compare.go | 100 - vendor/github.com/itchyny/gojq/compiler.go | 1509 ---- vendor/github.com/itchyny/gojq/debug.go | 210 - vendor/github.com/itchyny/gojq/encoder.go | 193 - vendor/github.com/itchyny/gojq/env.go | 48 - vendor/github.com/itchyny/gojq/error.go | 340 - vendor/github.com/itchyny/gojq/execute.go | 453 - vendor/github.com/itchyny/gojq/func.go | 1979 ----- vendor/github.com/itchyny/gojq/go.dev.mod | 8 - vendor/github.com/itchyny/gojq/go.dev.sum | 4 - vendor/github.com/itchyny/gojq/gojq.go | 5 - vendor/github.com/itchyny/gojq/iter.go | 49 - vendor/github.com/itchyny/gojq/lexer.go | 573 -- .../github.com/itchyny/gojq/module_loader.go | 190 - vendor/github.com/itchyny/gojq/normalize.go | 84 - vendor/github.com/itchyny/gojq/operator.go | 555 -- vendor/github.com/itchyny/gojq/option.go | 99 - vendor/github.com/itchyny/gojq/parser.go | 1739 ---- vendor/github.com/itchyny/gojq/parser.go.y | 693 -- vendor/github.com/itchyny/gojq/preview.go | 77 - vendor/github.com/itchyny/gojq/query.go | 1171 --- vendor/github.com/itchyny/gojq/release.go | 16 - vendor/github.com/itchyny/gojq/scope_stack.go | 52 - vendor/github.com/itchyny/gojq/stack.go | 56 - vendor/github.com/itchyny/gojq/term_type.go | 77 - vendor/github.com/itchyny/gojq/type.go | 30 - .../itchyny/timefmt-go/CHANGELOG.md | 18 - vendor/github.com/itchyny/timefmt-go/LICENSE | 21 - vendor/github.com/itchyny/timefmt-go/Makefile | 20 - .../github.com/itchyny/timefmt-go/README.md | 69 - .../github.com/itchyny/timefmt-go/format.go | 537 -- vendor/github.com/itchyny/timefmt-go/parse.go | 392 - .../v2/api/v1alpha1/common_types.go | 4 + .../v2/api/v1alpha1/domain_types.go | 67 + .../v2/api/v1alpha1/group_types.go | 66 + .../v2/api/v1alpha1/keypair_types.go | 68 + .../v2/api/v1alpha1/project_types.go | 4 - .../v2/api/v1alpha1/role_types.go | 66 + .../v2/api/v1alpha1/server_types.go | 6 + .../v2/api/v1alpha1/service_types.go | 78 + .../v2/api/v1alpha1/volume_types.go | 11 + .../v2/api/v1alpha1/zz_generated.deepcopy.go | 1312 ++- .../v1alpha1/zz_generated.domain-resource.go | 177 + .../v1alpha1/zz_generated.group-resource.go | 177 + .../v1alpha1/zz_generated.keypair-resource.go | 177 + .../v1alpha1/zz_generated.role-resource.go | 177 + .../v1alpha1/zz_generated.service-resource.go | 177 + .../mitchellh/mapstructure/README.md | 46 - .../mitchellh/mapstructure/decode_hooks.go | 279 - .../mitchellh/mapstructure/error.go | 50 - .../api/v1beta1/conditions.go | 85 +- .../api/v1beta1/nutanixcluster_types.go | 31 + .../api/v1beta1/nutanixfailuredomain_types.go | 39 +- .../api/v1beta1/nutanixmachine_types.go | 41 +- .../v1beta1/nutanixmachinetemplate_types.go | 18 +- .../v1beta1/nutanixmachinetemplate_webhook.go | 119 + .../api/v1beta1/nutanixmetro_types.go | 90 + .../api/v1beta1/nutanixmetrosite_types.go | 97 + .../v1beta1/nutanixvirtualhadomain_types.go | 139 + .../api/v1beta1/zz_generated.deepcopy.go | 460 +- .../pkg/feature/feature.go | 56 + .../pkg/feature/gates.go | 40 + .../prism-go-client/.gitignore | 2 +- .../prism-go-client/.golangci.yaml | 5 +- .../prism-go-client/CHANGELOG.md | 46 +- .../prism-go-client/DEVELOPMENT.md | 4 +- .../prism-go-client/Makefile | 104 +- .../prism-go-client/README.md | 5 +- .../prism-go-client/devbox.json | 15 +- .../prism-go-client/devbox.lock | 290 +- .../environment/credentials/parsecreds.go | 53 +- .../environment/credentials/types.go | 17 + .../environment/types/cache.go | 52 + .../environment/types/types.go | 33 +- .../prism-go-client/internal/client.go | 59 +- .../prism-go-client/structs.go | 4 +- .../prism-go-client/utils/flatmap.go | 152 - .../prism-go-client/utils/pointers.go | 442 - .../prism-go-client/utils/utils.go | 103 - .../prism-go-client/v3/cache.go | 78 +- .../prism-go-client/v3/cluster.go | 39 + .../prism-go-client/v3/models/address.go | 145 + .../prism-go-client/v3/models/api_version.go | 40 + .../models/availability_zone_information.go | 142 + .../v3/models/availability_zone_reference.go | 148 + .../prism-go-client/v3/models/build_info.go | 151 + .../prism-go-client/v3/models/ca_cert.go | 91 + .../v3/models/category_filter.go | 79 + .../v3/models/certification_signing_info.go | 77 + .../models/citrix_connector_config_details.go | 183 + .../citrix_connector_config_details_spec.go | 218 + .../v3/models/citrix_resource_location.go | 55 + .../models/citrix_resource_location_spec.go | 96 + .../prism-go-client/v3/models/client_auth.go | 129 + .../prism-go-client/v3/models/cluster.go | 263 + .../v3/models/cluster_analysis.go | 70 + .../v3/models/cluster_config.go | 776 ++ .../v3/models/cluster_config_spec.go | 457 + .../v3/models/cluster_def_status.go | 445 + .../v3/models/cluster_domain_server.go | 136 + .../v3/models/cluster_management_server.go | 105 + .../v3/models/cluster_network.go | 461 + .../v3/models/cluster_network_entity.go | 171 + .../v3/models/cluster_nodes.go | 129 + .../v3/models/cluster_operation_mode.go | 37 + .../v3/models/cluster_service_list.go | 38 + .../v3/models/cluster_software.go | 134 + .../prism-go-client/v3/models/credentials.go | 76 + .../prism-go-client/v3/models/dhcp_options.go | 118 + .../v3/models/encryption_status.go | 29 + .../v3/models/external_configurations.go | 111 + .../v3/models/external_configurations_spec.go | 111 + .../v3/models/http_proxy_whitelist.go | 97 + .../v3/models/hypervisor_server.go | 84 + .../models/idempotence_identifiers_input.go | 111 + .../idempotence_identifiers_metadata.go | 367 + .../idempotence_identifiers_response.go | 122 + .../models/idempotence_identifiers_status.go | 227 + .../prism-go-client/v3/models/ip_config.go | 269 + .../prism-go-client/v3/models/ip_pool.go | 77 + .../v3/models/ip_usage_stats.go | 132 + .../v3/models/message_resource.go | 108 + .../network_function_chain_reference.go | 148 + .../prism-go-client/v3/models/pool_stats.go | 83 + .../v3/models/project_reference.go | 148 + .../prism-go-client/v3/models/public_key.go | 95 + .../v3/models/recover_entities.go | 667 ++ .../v3/models/recovery_plan.go | 152 + .../recovery_plan_data_service_ip_config.go | 172 + .../v3/models/recovery_plan_def_status.go | 540 ++ .../recovery_plan_floating_ip_config.go | 81 + .../v3/models/recovery_plan_intent_input.go | 205 + .../models/recovery_plan_intent_resource.go | 258 + .../models/recovery_plan_intent_response.go | 256 + .../models/recovery_plan_l2_stretch_config.go | 245 + .../recovery_plan_list_intent_response.go | 217 + .../recovery_plan_list_metadata_output.go | 124 + .../v3/models/recovery_plan_metadata.go | 367 + .../v3/models/recovery_plan_network.go | 252 + .../v3/models/recovery_plan_resources.go | 1676 ++++ .../v3/models/recovery_plan_script_config.go | 103 + .../v3/models/recovery_plan_stage.go | 247 + .../v3/models/recovery_plan_subnet_config.go | 232 + .../recovery_plan_subnet_range_config.go | 102 + .../models/recovery_plan_vm_ip_assignment.go | 238 + ...ecovery_plan_volume_group_recovery_info.go | 354 + .../prism-go-client/v3/models/reference.go | 122 + .../prism-go-client/v3/models/smtp_server.go | 130 + .../v3/models/software_type.go | 29 + .../prism-go-client/v3/models/sort_order.go | 29 + .../prism-go-client/v3/models/ssl_key.go | 188 + .../prism-go-client/v3/models/ssl_key_type.go | 30 + .../prism-go-client/v3/models/subnet.go | 254 + .../v3/models/subnet_def_status.go | 298 + .../v3/models/subnet_resources.go | 445 + .../v3/models/subnet_resources_def_status.go | 451 + .../v3/models/user_reference.go | 148 + .../v3/models/virtual_network_reference.go | 148 + .../prism-go-client/v3/models/vm_reference.go | 148 + .../v3/models/volume_group_reference.go | 148 + .../v3/models/vpc_reference.go | 148 + .../v3/models/vswitch_config.go | 90 + .../v3/models/vtep_gateway_reference.go | 148 + .../v3/models/witness_configuration.go | 81 + .../prism-go-client/v3/v3.go | 28 +- .../prism-go-client/v3/v3_service.go | 337 +- .../prism-go-client/v3/v3_structs.go | 487 +- vendor/github.com/onsi/gomega/CHANGELOG.md | 22 + vendor/github.com/onsi/gomega/README.md | 13 + .../github.com/onsi/gomega/format/format.go | 37 +- vendor/github.com/onsi/gomega/gomega_dsl.go | 2 +- vendor/github.com/onsi/gomega/matchers.go | 12 + .../gomega/matchers/be_a_slice_matcher.go | 28 + .../gomega/matchers/be_an_array_matcher.go | 28 + vendor/github.com/onsi/gomega/types/types.go | 12 + .../openshift/api/config/v1/register.go | 2 + .../types_crio_credential_provider_config.go | 186 + .../api/config/v1/types_infrastructure.go | 47 +- .../openshift/api/config/v1/types_ingress.go | 36 + .../api/config/v1/types_kmsencryption.go | 49 +- .../openshift/api/config/v1/types_network.go | 3 + .../api/config/v1/zz_generated.deepcopy.go | 120 +- ..._generated.featuregated-crd-manifests.yaml | 29 +- .../api/config/v1/zz_generated.model_name.go | 20 + .../v1/zz_generated.swagger_doc_generated.go | 67 +- .../v1alpha1/types_cluster_monitoring.go | 66 +- .../config/v1alpha1/zz_generated.deepcopy.go | 7 +- .../zz_generated.swagger_doc_generated.go | 15 +- .../openshift/api/features/features.go | 77 +- .../api/machineconfiguration/v1/register.go | 2 + .../api/machineconfiguration/v1/types.go | 13 + .../v1/types_internalreleaseimage.go | 159 + .../v1/zz_generated.deepcopy.go | 151 + ..._generated.featuregated-crd-manifests.yaml | 27 +- .../v1/zz_generated.model_name.go | 30 + .../v1/zz_generated.swagger_doc_generated.go | 60 + .../api/operator/v1/types_authentication.go | 88 + .../operator/v1/types_csi_cluster_driver.go | 175 +- .../operator/v1/types_ingresscontroller.go | 98 + .../api/operator/v1/types_kmsencryption.go | 70 + .../api/operator/v1/zz_generated.deepcopy.go | 190 + ..._generated.featuregated-crd-manifests.yaml | 2 + .../operator/v1/zz_generated.model_name.go | 50 + .../v1/zz_generated.swagger_doc_generated.go | 127 +- .../api/operator/v1alpha1/types_clusterapi.go | 15 +- .../v1beta1/agentclusterinstall_types.go | 30 +- .../v1beta1/groupversion_info.go | 17 +- .../v1beta1/zz_generated.deepcopy.go | 2 +- .../api/v1beta1/agent_types.go | 96 +- .../api/v1beta1/agent_webhook.go | 88 - .../api/v1beta1/agentclassification_types.go | 2 +- .../v1beta1/agentclassification_webhook.go | 98 - .../api/v1beta1/agentserviceconfig_types.go | 12 +- .../api/v1beta1/groupversion_info.go | 17 +- .../hypershiftagentserviceconfig_types.go | 2 +- .../api/v1beta1/infraenv_types.go | 68 +- .../api/v1beta1/infraenv_webhook.go | 73 - .../api/v1beta1/nmstate_config_types.go | 2 +- .../api/v1beta1/zz_generated.deepcopy.go | 45 + .../client/installer/installer_client.go | 9 +- .../v2_download_infra_env_files_parameters.go | 2 +- .../installer/v2_upload_logs_responses.go | 69 + .../client/operators/operators_client.go | 12 +- .../operators/v2_get_bundle_parameters.go | 48 +- .../operators/v2_get_bundle_responses.go | 69 + .../operators/v2_list_bundles_parameters.go | 198 +- .../operators/v2_list_bundles_responses.go | 69 + .../assisted-service/models/api_vip.go | 2 +- .../assisted-service/models/bundle.go | 5 +- .../models/bundle_create_params.go | 74 + .../assisted-service/models/cluster.go | 83 +- .../models/cluster_create_params.go | 90 +- .../models/cluster_network.go | 2 +- .../models/cluster_validation_id.go | 11 +- .../assisted-service/models/custom.go | 151 + .../models/feature_support_level_id.go | 26 +- .../assisted-service/models/host_stage.go | 5 +- .../models/host_validation_id.go | 14 +- .../assisted-service/models/infra_env.go | 46 + .../models/infra_env_create_params.go | 46 + .../models/infra_env_update_params.go | 46 + .../assisted-service/models/ingress_vip.go | 2 +- .../assisted-service/models/inventory.go | 140 + .../models/mac_interface_map.go | 8 +- .../models/machine_network.go | 2 +- .../models/monitored_operator.go | 3 + .../models/service_network.go | 2 +- .../models/v2_cluster_update_params.go | 90 +- .../assisted-service/models/verified_vip.go | 2 +- .../assisted-service/models/verify_vip.go | 2 +- ...ioned_cluster_host_requirements_details.go | 65 + .../models/versioned_host_requirements.go | 62 +- .../openshift/hive/apis/hive/v1/agent/doc.go | 3 +- .../hive/apis/hive/v1/alibabacloud/doc.go | 4 - .../apis/hive/v1/alibabacloud/machinepool.go | 41 - .../apis/hive/v1/alibabacloud/platform.go | 16 - .../v1/alibabacloud/zz_generated.deepcopy.go | 44 - .../openshift/hive/apis/hive/v1/aws/doc.go | 2 +- .../hive/apis/hive/v1/aws/machinepool.go | 9 +- .../hive/apis/hive/v1/aws/metadata.go | 2 + .../apis/hive/v1/aws/zz_generated.deepcopy.go | 7 + .../openshift/hive/apis/hive/v1/azure/doc.go | 3 +- .../hive/apis/hive/v1/azure/machinepool.go | 43 + .../hive/apis/hive/v1/azure/metadata.go | 2 + .../hive/apis/hive/v1/baremetal/doc.go | 3 +- .../apis/hive/v1/clusterdeployment_types.go | 54 +- .../clusterdeploymentcustomization_types.go | 82 +- .../apis/hive/v1/clusterdeprovision_types.go | 54 +- .../hive/apis/hive/v1/clusterpool_types.go | 12 + .../openshift/hive/apis/hive/v1/doc.go | 4 +- .../openshift/hive/apis/hive/v1/gcp/doc.go | 3 +- .../hive/apis/hive/v1/gcp/machinepools.go | 55 +- .../hive/apis/hive/v1/gcp/metadata.go | 2 + .../hive/apis/hive/v1/gcp/platform.go | 95 +- .../apis/hive/v1/gcp/zz_generated.deepcopy.go | 152 + .../hive/apis/hive/v1/hiveconfig_types.go | 90 + .../hive/apis/hive/v1/ibmcloud/doc.go | 3 +- .../hive/apis/hive/v1/machinepool_types.go | 50 +- .../hive/apis/hive/v1/metricsconfig/doc.go | 3 +- .../openshift/hive/apis/hive/v1/none/doc.go | 3 +- .../hive/apis/hive/v1/nutanix/doc.go | 3 + .../hive/apis/hive/v1/nutanix/machinepools.go | 78 + .../hive/apis/hive/v1/nutanix/platform.go | 95 + .../hive/v1/nutanix/zz_generated.deepcopy.go | 179 + .../hive/apis/hive/v1/openstack/doc.go | 3 +- .../apis/hive/v1/openstack/machinepools.go | 6 + .../v1/openstack/zz_generated.deepcopy.go | 5 + .../openshift/hive/apis/hive/v1/ovirt/doc.go | 4 - .../hive/apis/hive/v1/ovirt/machinepool.go | 61 - .../hive/apis/hive/v1/ovirt/platform.go | 22 - .../hive/v1/ovirt/zz_generated.deepcopy.go | 82 - .../hive/v1/syncidentityprovider_types.go | 8 +- .../hive/apis/hive/v1/syncset_types.go | 33 +- .../hive/apis/hive/v1/vsphere/doc.go | 2 +- .../hive/apis/hive/v1/vsphere/machinepools.go | 4 + .../hive/v1/vsphere/zz_generated.deepcopy.go | 5 + .../apis/hive/v1/zz_generated.deepcopy.go | 318 +- .../apis/hive/v1/zz_generated.defaults.go | 17 + .../prometheus/common/expfmt/expfmt.go | 1 + .../prometheus/common/expfmt/fuzz.go | 1 - .../prometheus/procfs/.golangci.yml | 8 + .../prometheus/procfs/Makefile.common | 247 +- .../github.com/prometheus/procfs/cpuinfo.go | 3 +- .../prometheus/procfs/cpuinfo_armx.go | 2 - .../prometheus/procfs/cpuinfo_loong64.go | 1 - .../prometheus/procfs/cpuinfo_mipsx.go | 2 - .../prometheus/procfs/cpuinfo_others.go | 1 - .../prometheus/procfs/cpuinfo_ppcx.go | 2 - .../prometheus/procfs/cpuinfo_riscvx.go | 2 - .../prometheus/procfs/cpuinfo_s390x.go | 1 - .../prometheus/procfs/cpuinfo_x86.go | 2 - .../prometheus/procfs/fs_statfs_notype.go | 1 - .../prometheus/procfs/fs_statfs_type.go | 1 - .../procfs/internal/util/sysreadfile.go | 2 - .../internal/util/sysreadfile_compat.go | 1 - .../prometheus/procfs/kernel_hung.go | 1 - .../prometheus/procfs/kernel_random.go | 1 - .../github.com/prometheus/procfs/net_tcp.go | 4 + .../prometheus/procfs/proc_interrupts.go | 2 +- .../github.com/prometheus/procfs/proc_maps.go | 2 - .../prometheus/procfs/proc_smaps.go | 1 - .../prometheus/procfs/proc_statm.go | 1 + .../prometheus/procfs/proc_status.go | 43 + vendor/github.com/prometheus/procfs/vm.go | 1 - .../github.com/prometheus/procfs/zoneinfo.go | 1 - vendor/github.com/spf13/cobra/.golangci.yml | 7 + vendor/github.com/spf13/cobra/command.go | 12 +- .../google.golang.org/grpc/otelgrpc/LICENSE | 30 + .../google.golang.org/grpc/otelgrpc/config.go | 202 +- .../grpc/otelgrpc/interceptor.go | 203 +- .../grpc/otelgrpc/internal/parse.go | 18 +- .../grpc/otelgrpc/metadata_supplier.go | 51 +- .../grpc/otelgrpc/stats_handler.go | 128 +- .../grpc/otelgrpc/version.go | 5 +- vendor/go.opentelemetry.io/otel/.golangci.yml | 12 + vendor/go.opentelemetry.io/otel/CHANGELOG.md | 90 +- .../go.opentelemetry.io/otel/CONTRIBUTING.md | 6 +- vendor/go.opentelemetry.io/otel/Makefile | 15 +- vendor/go.opentelemetry.io/otel/README.md | 14 +- vendor/go.opentelemetry.io/otel/RELEASING.md | 41 +- .../otel/attribute/encoder.go | 4 +- .../otel/attribute/hash.go | 4 +- .../otel/attribute/internal/attribute.go | 103 +- .../go.opentelemetry.io/otel/attribute/kv.go | 2 +- .../otel/attribute/type_string.go | 6 +- .../otel/attribute/value.go | 61 +- .../otel/baggage/baggage.go | 109 +- .../otel/dependencies.Dockerfile | 2 +- .../internal/errorhandler/errorhandler.go | 96 + .../otel/internal/global/handler.go | 34 +- .../otel/internal/global/state.go | 36 +- .../otel/metric/asyncfloat64.go | 3 + .../otel/metric/asyncint64.go | 3 + .../go.opentelemetry.io/otel/metric/meter.go | 54 +- .../otel/metric/syncfloat64.go | 24 + .../otel/metric/syncint64.go | 24 + .../otel/propagation/baggage.go | 24 +- .../otel/propagation/trace_context.go | 13 +- .../go.opentelemetry.io/otel/requirements.txt | 2 +- .../otel/sdk/internal/x/features.go | 15 + .../otel/sdk/metric/config.go | 4 +- .../aggregate/exponential_histogram.go | 151 +- .../metric/internal/aggregate/histogram.go | 16 +- .../metric/internal/aggregate/lastvalue.go | 26 +- .../otel/sdk/metric/internal/aggregate/sum.go | 22 +- .../metric/internal/observ/instrumentation.go | 4 +- .../otel/sdk/metric/manual_reader.go | 27 +- .../otel/sdk/metric/periodic_reader.go | 38 +- .../otel/sdk/metric/pipeline.go | 20 +- .../otel/sdk/metric/reader.go | 58 + .../otel/sdk/metric/version.go | 2 +- .../otel/sdk/resource/builtin.go | 2 +- .../otel/sdk/resource/config.go | 8 + .../otel/sdk/resource/container.go | 2 +- .../otel/sdk/resource/env.go | 2 +- .../otel/sdk/resource/host_id.go | 12 +- .../otel/sdk/resource/host_id_readfile.go | 2 +- .../otel/sdk/resource/os.go | 2 +- .../otel/sdk/resource/process.go | 2 +- .../otel/sdk/resource/resource.go | 19 +- .../go.opentelemetry.io/otel/sdk/version.go | 2 +- .../otel/semconv/v1.24.0/README.md | 3 - .../otel/semconv/v1.24.0/attribute_group.go | 4387 ---------- .../otel/semconv/v1.24.0/doc.go | 9 - .../otel/semconv/v1.24.0/event.go | 200 - .../otel/semconv/v1.24.0/exception.go | 9 - .../otel/semconv/v1.24.0/metric.go | 1071 --- .../otel/semconv/v1.24.0/resource.go | 2545 ------ .../otel/semconv/v1.24.0/trace.go | 1323 --- .../otel/semconv/v1.34.0/MIGRATION.md | 4 - .../otel/semconv/v1.34.0/README.md | 3 - .../otel/semconv/v1.34.0/error_type.go | 31 - .../otel/semconv/v1.34.0/rpcconv/metric.go | 716 -- .../otel/semconv/v1.34.0/schema.go | 9 - .../otel/semconv/v1.39.0/httpconv/metric.go | 54 +- .../otel/semconv/v1.39.0/rpcconv/metric.go | 1143 +++ .../otel/semconv/v1.40.0/MIGRATION.md | 27 + .../otel/semconv/v1.40.0/README.md | 3 + .../{v1.34.0 => v1.40.0}/attribute_group.go | 4486 ++++++++-- .../otel/semconv/{v1.34.0 => v1.40.0}/doc.go | 4 +- .../otel/semconv/v1.40.0/error_type.go | 66 + .../semconv/{v1.34.0 => v1.40.0}/exception.go | 2 +- .../{v1.39.0 => v1.40.0}/otelconv/metric.go | 0 .../semconv/{v1.24.0 => v1.40.0}/schema.go | 4 +- vendor/go.opentelemetry.io/otel/trace/auto.go | 2 +- .../go.opentelemetry.io/otel/trace/trace.go | 24 + .../otel/trace/tracestate.go | 9 +- vendor/go.opentelemetry.io/otel/version.go | 2 +- vendor/go.opentelemetry.io/otel/versions.yaml | 11 +- vendor/golang.org/x/crypto/pkcs12/crypto.go | 4 + vendor/golang.org/x/crypto/pkcs12/mac.go | 8 + .../golang.org/x/crypto/ssh/agent/client.go | 229 +- .../golang.org/x/crypto/ssh/agent/server.go | 30 +- vendor/golang.org/x/crypto/ssh/channel.go | 5 +- vendor/golang.org/x/crypto/ssh/client.go | 85 + vendor/golang.org/x/crypto/ssh/client_auth.go | 64 +- vendor/golang.org/x/crypto/ssh/connection.go | 10 +- vendor/golang.org/x/crypto/ssh/control.go | 155 + vendor/golang.org/x/crypto/ssh/kex.go | 75 +- vendor/golang.org/x/crypto/ssh/keys.go | 41 +- .../x/crypto/ssh/knownhosts/knownhosts.go | 24 +- vendor/golang.org/x/crypto/ssh/mux.go | 5 +- vendor/golang.org/x/crypto/ssh/server.go | 38 +- vendor/golang.org/x/crypto/ssh/session.go | 3 + vendor/golang.org/x/exp/maps/maps.go | 86 - vendor/golang.org/x/net/html/parse.go | 38 +- vendor/golang.org/x/net/html/render.go | 35 +- vendor/golang.org/x/net/html/token.go | 13 +- vendor/golang.org/x/net/http2/server.go | 21 - .../golang.org/x/net/http2/server_common.go | 22 + vendor/golang.org/x/net/http2/server_wrap.go | 40 + vendor/golang.org/x/net/http2/transport.go | 34 - .../x/net/http2/transport_common.go | 34 + .../x/net/http2/writesched_common.go | 41 + .../net/http2/writesched_priority_rfc7540.go | 41 - vendor/golang.org/x/oauth2/google/default.go | 131 +- vendor/golang.org/x/oauth2/google/google.go | 3 +- vendor/golang.org/x/sync/errgroup/errgroup.go | 2 +- .../golang.org/x/sync/semaphore/semaphore.go | 10 +- vendor/golang.org/x/sys/unix/ztypes_linux.go | 76 + .../golang.org/x/sys/unix/ztypes_linux_386.go | 4 + .../x/sys/unix/ztypes_linux_amd64.go | 4 + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 4 + .../x/sys/unix/ztypes_linux_arm64.go | 4 + .../x/sys/unix/ztypes_linux_loong64.go | 4 + .../x/sys/unix/ztypes_linux_mips.go | 4 + .../x/sys/unix/ztypes_linux_mips64.go | 4 + .../x/sys/unix/ztypes_linux_mips64le.go | 4 + .../x/sys/unix/ztypes_linux_mipsle.go | 4 + .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 4 + .../x/sys/unix/ztypes_linux_ppc64.go | 4 + .../x/sys/unix/ztypes_linux_ppc64le.go | 4 + .../x/sys/unix/ztypes_linux_riscv64.go | 4 + .../x/sys/unix/ztypes_linux_s390x.go | 4 + .../x/sys/unix/ztypes_linux_sparc64.go | 4 + vendor/golang.org/x/tools/go/ast/edge/edge.go | 24 +- .../golang.org/x/tools/go/packages/golist.go | 17 +- .../x/tools/go/packages/packages.go | 16 +- .../x/tools/go/types/objectpath/objectpath.go | 563 +- .../x/tools/internal/gcimporter/ureader.go | 42 +- .../x/tools/internal/gocommand/version.go | 5 +- .../x/tools/internal/imports/fix.go | 6 +- .../x/tools/internal/imports/mod.go | 6 +- .../v3/cloudresourcemanager-api.json | 28 +- .../v3/cloudresourcemanager-gen.go | 54 +- .../api/compute/v1/compute-api.json | 5654 +++++++++--- .../api/compute/v1/compute-gen.go | 5474 ++++++++---- .../api/compute/v1/compute2-gen.go | 734 +- .../api/compute/v1/compute3-gen.go | 1948 ++++- .../google.golang.org/api/dns/v1/dns-api.json | 6 +- .../google.golang.org/api/dns/v1/dns-gen.go | 14 +- .../api/file/v1/file-api.json | 108 +- .../google.golang.org/api/file/v1/file-gen.go | 280 +- .../api/googleapi/googleapi.go | 15 + .../google.golang.org/api/iam/v1/iam-api.json | 173 +- .../google.golang.org/api/iam/v1/iam-gen.go | 328 +- .../iamcredentials/v1/iamcredentials-api.json | 144 +- .../iamcredentials/v1/iamcredentials-gen.go | 473 +- .../credentialstype/credentialstype.go | 113 + .../google.golang.org/api/internal/creds.go | 26 +- .../api/internal/gensupport/buffer.go | 13 + .../api/internal/gensupport/media.go | 21 +- .../api/internal/gensupport/resumable.go | 19 + .../api/internal/settings.go | 74 +- .../google.golang.org/api/internal/version.go | 2 +- .../option/internaloption/internaloption.go | 22 +- vendor/google.golang.org/api/option/option.go | 141 +- .../v1beta1/serviceusage-api.json | 104 +- .../serviceusage/v1beta1/serviceusage-gen.go | 146 +- .../api/storage/v1/storage-api.json | 68 +- .../api/storage/v1/storage-gen.go | 158 +- .../api/transport/grpc/dial.go | 31 +- .../api/transport/http/dial.go | 7 +- .../googleapis/api/annotations/client.pb.go | 926 +- .../api/annotations/field_behavior.pb.go | 2 +- .../api/annotations/field_info.pb.go | 2 +- .../googleapis/api/annotations/http.pb.go | 2 +- .../googleapis/api/annotations/resource.pb.go | 2 +- .../googleapis/api/annotations/routing.pb.go | 12 +- .../api/distribution/distribution.pb.go | 2 +- .../genproto/googleapis/api/label/label.pb.go | 2 +- .../googleapis/api/launch_stage.pb.go | 2 +- .../googleapis/api/metric/metric.pb.go | 2 +- .../api/monitoredres/monitored_resource.pb.go | 2 +- .../genproto/googleapis/rpc/code/code.pb.go | 2 +- .../rpc/errdetails/error_details.pb.go | 10 +- .../googleapis/rpc/status/status.pb.go | 7 +- .../grpc/attributes/attributes.go | 77 +- .../grpc/balancer/balancer.go | 32 +- .../grpc/balancer/base/balancer.go | 6 +- .../endpointsharding/endpointsharding.go | 11 +- .../grpclb/grpc_lb_v1/load_balancer.pb.go | 2 +- .../grpc_lb_v1/load_balancer_grpc.pb.go | 2 +- .../balancer/leastrequest/leastrequest.go | 2 +- .../grpc/balancer/pickfirst/pickfirst.go | 12 +- .../grpc/balancer/ringhash/ringhash.go | 12 +- .../grpc/balancer/rls/config.go | 2 +- .../balancer/weightedroundrobin/balancer.go | 4 +- .../grpc_binarylog_v1/binarylog.pb.go | 2 +- .../credentials/alts/internal/conn/record.go | 40 +- .../internal/proto/grpc_gcp/altscontext.pb.go | 2 +- .../internal/proto/grpc_gcp/handshaker.pb.go | 2 +- .../proto/grpc_gcp/handshaker_grpc.pb.go | 2 +- .../grpc_gcp/transport_security_common.pb.go | 2 +- .../google.golang.org/grpc/credentials/tls.go | 18 +- vendor/google.golang.org/grpc/dialoptions.go | 9 +- .../internal/balancergroup/balancergroup.go | 68 +- .../grpc/internal/envconfig/envconfig.go | 38 +- .../grpc/internal/mem/buffer_pool.go | 338 + .../internal/proto/grpc_lookup_v1/rls.pb.go | 2 +- .../proto/grpc_lookup_v1/rls_config.pb.go | 2 +- .../proto/grpc_lookup_v1/rls_grpc.pb.go | 2 +- .../grpc/internal/transport/defaults.go | 1 + .../grpc/internal/transport/http2_client.go | 6 +- .../grpc/internal/transport/http2_server.go | 6 +- .../grpc/internal/xds/balancer/balancer.go | 1 - .../xds/balancer/cdsbalancer/cdsbalancer.go | 626 +- .../balancer/cdsbalancer/cluster_watcher.go | 56 - .../configbuilder.go | 138 +- .../configbuilder_childname.go | 63 +- .../xds/balancer/clusterimpl/clusterimpl.go | 83 +- .../xds/balancer/clusterimpl/config.go | 13 +- .../balancer/clustermanager/clustermanager.go | 2 +- .../clusterresolver/clusterresolver.go | 410 - .../xds/balancer/clusterresolver/config.go | 160 - .../xds/balancer/clusterresolver/logging.go | 34 - .../clusterresolver/resource_resolver.go | 322 - .../clusterresolver/resource_resolver_dns.go | 172 - .../clusterresolver/resource_resolver_eds.go | 124 - .../xds/balancer/outlierdetection/balancer.go | 12 +- .../xds/balancer/priority/balancer.go | 7 +- .../xds/balancer/priority/balancer_child.go | 8 +- .../balancer/priority/balancer_priority.go | 2 +- .../xds/clients/xdsclient/authority.go | 2 +- .../internal/xds/clients/xdsclient/channel.go | 12 +- .../grpc/internal/xds/rbac/matchers.go | 36 +- .../internal/xds/resolver/serviceconfig.go | 57 +- .../internal/xds/resolver/xds_resolver.go | 114 +- .../grpc/internal/xds/server/conn_wrapper.go | 15 +- .../xds/server/filter_chain_manager.go | 414 + .../internal/xds/server/listener_wrapper.go | 63 +- .../grpc/internal/xds/server/routing.go | 198 + .../xdslbregistry/converter/converter.go | 2 +- .../xds/xdsclient/xdsresource/filter_chain.go | 827 +- .../xdsresource/listener_resource_type.go | 30 +- .../xds/xdsclient/xdsresource/matcher.go | 28 - .../xds/xdsclient/xdsresource/metadata.go | 11 +- .../xds/xdsclient/xdsresource/type_lds.go | 24 +- .../xdsclient/xdsresource/unmarshal_eds.go | 9 +- .../xdsclient/xdsresource/unmarshal_lds.go | 342 +- .../xds/xdsdepmgr/xds_dependency_manager.go | 286 +- .../google.golang.org/grpc/mem/buffer_pool.go | 167 +- .../google.golang.org/grpc/picker_wrapper.go | 4 +- vendor/google.golang.org/grpc/resolver/map.go | 34 + vendor/google.golang.org/grpc/rpc_util.go | 22 +- vendor/google.golang.org/grpc/server.go | 1 + vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/xds/server.go | 78 +- .../encoding/protodelim/protodelim.go | 9 +- .../protobuf/encoding/protojson/decode.go | 12 + .../encoding/protojson/well_known_types.go | 5 +- .../protobuf/encoding/prototext/decode.go | 18 + .../protobuf/internal/descfmt/stringer.go | 269 +- .../protobuf/internal/version/version.go | 2 +- vendor/gopkg.in/ini.v1/.golangci.yml | 46 +- vendor/gopkg.in/ini.v1/README.md | 10 +- vendor/gopkg.in/ini.v1/data_source.go | 5 +- vendor/gopkg.in/ini.v1/file.go | 3 +- vendor/gopkg.in/ini.v1/key.go | 53 +- vendor/gopkg.in/ini.v1/parser.go | 14 +- vendor/gopkg.in/ini.v1/struct.go | 38 +- .../k8s.io/api/admission/v1/generated.proto | 7 + vendor/k8s.io/api/admission/v1/types.go | 7 + .../api/admission/v1beta1/generated.proto | 7 + .../v1beta1/generated.protomessage.pb.go | 28 - vendor/k8s.io/api/admission/v1beta1/types.go | 7 + .../admissionregistration/v1/generated.pb.go | 4760 ++++++++--- .../admissionregistration/v1/generated.proto | 450 +- .../v1/generated.protomessage.pb.go | 76 - .../api/admissionregistration/v1/register.go | 4 + .../api/admissionregistration/v1/types.go | 478 +- .../v1/types_swagger_doc_generated.go | 239 +- .../v1/zz_generated.deepcopy.go | 252 + .../v1/zz_generated.model_name.go | 45 + .../v1/zz_generated.prerelease-lifecycle.go | 24 + .../v1alpha1/generated.proto | 89 +- .../v1alpha1/generated.protomessage.pb.go | 74 - .../admissionregistration/v1alpha1/types.go | 85 +- .../v1alpha1/types_swagger_doc_generated.go | 80 +- .../v1beta1/generated.proto | 155 +- .../v1beta1/generated.protomessage.pb.go | 90 - .../admissionregistration/v1beta1/types.go | 159 +- .../v1beta1/types_swagger_doc_generated.go | 148 +- .../zz_generated.prerelease-lifecycle.go | 24 + .../api/apidiscovery/v2/generated.proto | 2 +- .../v2/generated.protomessage.pb.go | 32 - vendor/k8s.io/api/apidiscovery/v2/types.go | 2 +- .../api/apidiscovery/v2beta1/generated.proto | 2 +- .../v2beta1/generated.protomessage.pb.go | 32 - .../k8s.io/api/apidiscovery/v2beta1/types.go | 2 +- .../v1alpha1/generated.proto | 41 +- .../v1alpha1/generated.protomessage.pb.go | 34 - .../api/apiserverinternal/v1alpha1/types.go | 41 +- .../v1alpha1/types_swagger_doc_generated.go | 32 +- .../api/apps/v1/generated.protomessage.pb.go | 82 - .../k8s.io/api/apps/v1beta1/generated.proto | 4 +- .../apps/v1beta1/generated.protomessage.pb.go | 68 - vendor/k8s.io/api/apps/v1beta1/types.go | 6 +- .../k8s.io/api/apps/v1beta2/generated.proto | 4 +- .../apps/v1beta2/generated.protomessage.pb.go | 88 - vendor/k8s.io/api/apps/v1beta2/types.go | 6 +- .../api/authentication/v1/generated.proto | 64 +- .../v1/generated.protomessage.pb.go | 44 - vendor/k8s.io/api/authentication/v1/types.go | 64 +- .../v1/types_swagger_doc_generated.go | 56 +- .../authentication/v1alpha1/generated.proto | 7 +- .../v1alpha1/generated.protomessage.pb.go | 26 - .../api/authentication/v1alpha1/types.go | 7 +- .../v1alpha1/types_swagger_doc_generated.go | 6 +- .../authentication/v1beta1/generated.proto | 36 +- .../v1beta1/generated.protomessage.pb.go | 36 - .../api/authentication/v1beta1/types.go | 36 +- .../v1beta1/types_swagger_doc_generated.go | 32 +- .../api/authorization/v1/generated.proto | 96 +- .../v1/generated.protomessage.pb.go | 54 - vendor/k8s.io/api/authorization/v1/types.go | 96 +- .../v1/types_swagger_doc_generated.go | 92 +- .../api/authorization/v1beta1/generated.proto | 96 +- .../v1beta1/generated.protomessage.pb.go | 50 - .../k8s.io/api/authorization/v1beta1/types.go | 96 +- .../v1beta1/types_swagger_doc_generated.go | 92 +- .../k8s.io/api/autoscaling/v1/generated.proto | 12 +- .../v1/generated.protomessage.pb.go | 64 - vendor/k8s.io/api/autoscaling/v1/types.go | 16 +- .../k8s.io/api/autoscaling/v2/generated.proto | 8 +- .../v2/generated.protomessage.pb.go | 70 - vendor/k8s.io/api/autoscaling/v2/types.go | 10 +- vendor/k8s.io/api/autoscaling/v2beta1/doc.go | 23 - .../api/autoscaling/v2beta1/generated.pb.go | 5106 ----------- .../api/autoscaling/v2beta1/generated.proto | 474 - .../v2beta1/generated.protomessage.pb.go | 58 - .../api/autoscaling/v2beta1/register.go | 52 - .../k8s.io/api/autoscaling/v2beta1/types.go | 486 -- .../v2beta1/types_swagger_doc_generated.go | 247 - .../v2beta1/zz_generated.deepcopy.go | 525 -- .../v2beta1/zz_generated.model_name.go | 112 - .../zz_generated.prerelease-lifecycle.go | 74 - vendor/k8s.io/api/autoscaling/v2beta2/doc.go | 23 - .../api/autoscaling/v2beta2/generated.pb.go | 5817 ------------- .../api/autoscaling/v2beta2/generated.proto | 493 -- .../v2beta2/generated.protomessage.pb.go | 70 - .../api/autoscaling/v2beta2/register.go | 50 - .../k8s.io/api/autoscaling/v2beta2/types.go | 578 -- .../v2beta2/types_swagger_doc_generated.go | 297 - .../v2beta2/zz_generated.deepcopy.go | 610 -- .../v2beta2/zz_generated.model_name.go | 142 - .../zz_generated.prerelease-lifecycle.go | 68 - vendor/k8s.io/api/batch/v1/generated.proto | 4 +- .../api/batch/v1/generated.protomessage.pb.go | 56 - vendor/k8s.io/api/batch/v1/types.go | 4 +- .../k8s.io/api/batch/v1beta1/generated.proto | 4 +- .../v1beta1/generated.protomessage.pb.go | 32 - vendor/k8s.io/api/batch/v1beta1/types.go | 4 +- .../api/certificates/v1/generated.proto | 16 +- .../v1/generated.protomessage.pb.go | 34 - vendor/k8s.io/api/certificates/v1/types.go | 16 +- .../v1alpha1/generated.protomessage.pb.go | 28 - .../api/certificates/v1beta1/generated.pb.go | 46 + .../api/certificates/v1beta1/generated.proto | 60 +- .../v1beta1/generated.protomessage.pb.go | 48 - .../k8s.io/api/certificates/v1beta1/types.go | 62 +- .../v1beta1/types_swagger_doc_generated.go | 5 +- .../v1beta1/zz_generated.deepcopy.go | 5 + .../zz_generated.prerelease-lifecycle.go | 8 +- .../v1/generated.protomessage.pb.go | 28 - .../api/coordination/v1alpha2/generated.proto | 2 +- .../v1alpha2/generated.protomessage.pb.go | 28 - .../k8s.io/api/coordination/v1alpha2/types.go | 2 +- .../api/coordination/v1beta1/generated.proto | 2 +- .../v1beta1/generated.protomessage.pb.go | 34 - .../k8s.io/api/coordination/v1beta1/types.go | 2 +- vendor/k8s.io/api/core/v1/generated.pb.go | 1697 ++-- vendor/k8s.io/api/core/v1/generated.proto | 179 +- .../api/core/v1/generated.protomessage.pb.go | 498 -- vendor/k8s.io/api/core/v1/types.go | 189 +- .../core/v1/types_swagger_doc_generated.go | 114 +- .../api/core/v1/zz_generated.deepcopy.go | 132 +- .../api/core/v1/zz_generated.model_name.go | 25 +- .../k8s.io/api/discovery/v1/generated.proto | 8 + .../discovery/v1/generated.protomessage.pb.go | 38 - vendor/k8s.io/api/discovery/v1/types.go | 9 + .../api/discovery/v1beta1/generated.proto | 7 + .../v1beta1/generated.protomessage.pb.go | 38 - vendor/k8s.io/api/discovery/v1beta1/types.go | 9 + .../events/v1/generated.protomessage.pb.go | 28 - .../v1beta1/generated.protomessage.pb.go | 28 - .../api/extensions/v1beta1/generated.proto | 11 +- .../v1beta1/generated.protomessage.pb.go | 112 - vendor/k8s.io/api/extensions/v1beta1/types.go | 13 +- .../v1beta1/zz_generated.validations.go | 193 +- .../k8s.io/api/flowcontrol/v1/generated.proto | 13 + .../v1/generated.protomessage.pb.go | 68 - vendor/k8s.io/api/flowcontrol/v1/types.go | 13 + .../api/flowcontrol/v1beta1/generated.proto | 13 + .../v1beta1/generated.protomessage.pb.go | 68 - .../k8s.io/api/flowcontrol/v1beta1/types.go | 13 + .../api/flowcontrol/v1beta2/generated.proto | 13 + .../v1beta2/generated.protomessage.pb.go | 68 - .../k8s.io/api/flowcontrol/v1beta2/types.go | 13 + .../api/flowcontrol/v1beta3/generated.proto | 13 + .../v1beta3/generated.protomessage.pb.go | 68 - .../k8s.io/api/flowcontrol/v1beta3/types.go | 13 + .../api/imagepolicy/v1alpha1/generated.proto | 2 + .../v1alpha1/generated.protomessage.pb.go | 30 - .../k8s.io/api/imagepolicy/v1alpha1/types.go | 2 + .../k8s.io/api/networking/v1/generated.proto | 18 +- .../v1/generated.protomessage.pb.go | 92 - vendor/k8s.io/api/networking/v1/types.go | 18 +- .../api/networking/v1beta1/generated.proto | 11 +- .../v1beta1/generated.protomessage.pb.go | 72 - vendor/k8s.io/api/networking/v1beta1/types.go | 11 +- vendor/k8s.io/api/node/v1/generated.proto | 4 + .../api/node/v1/generated.protomessage.pb.go | 30 - vendor/k8s.io/api/node/v1/types.go | 4 + .../k8s.io/api/node/v1alpha1/generated.proto | 5 + .../v1alpha1/generated.protomessage.pb.go | 32 - vendor/k8s.io/api/node/v1alpha1/types.go | 5 + .../k8s.io/api/node/v1beta1/generated.proto | 4 + .../node/v1beta1/generated.protomessage.pb.go | 30 - vendor/k8s.io/api/node/v1beta1/types.go | 4 + vendor/k8s.io/api/policy/v1/generated.proto | 4 + .../policy/v1/generated.protomessage.pb.go | 32 - vendor/k8s.io/api/policy/v1/types.go | 4 + .../k8s.io/api/policy/v1beta1/generated.proto | 4 + .../v1beta1/generated.protomessage.pb.go | 32 - vendor/k8s.io/api/policy/v1beta1/types.go | 4 + vendor/k8s.io/api/rbac/v1/generated.proto | 15 +- .../api/rbac/v1/generated.protomessage.pb.go | 46 - vendor/k8s.io/api/rbac/v1/types.go | 15 +- .../k8s.io/api/rbac/v1alpha1/generated.proto | 15 +- .../v1alpha1/generated.protomessage.pb.go | 46 - vendor/k8s.io/api/rbac/v1alpha1/types.go | 15 +- .../k8s.io/api/rbac/v1beta1/generated.proto | 15 +- .../rbac/v1beta1/generated.protomessage.pb.go | 46 - vendor/k8s.io/api/rbac/v1beta1/types.go | 15 +- vendor/k8s.io/api/resource/v1/generated.pb.go | 641 ++ vendor/k8s.io/api/resource/v1/generated.proto | 405 +- .../resource/v1/generated.protomessage.pb.go | 108 - vendor/k8s.io/api/resource/v1/types.go | 450 +- .../v1/types_swagger_doc_generated.go | 89 +- .../api/resource/v1/zz_generated.deepcopy.go | 53 + .../resource/v1/zz_generated.model_name.go | 5 + .../api/resource/v1alpha3/generated.pb.go | 1762 +++- .../api/resource/v1alpha3/generated.proto | 220 +- .../v1alpha3/generated.protomessage.pb.go | 38 - .../k8s.io/api/resource/v1alpha3/register.go | 2 + vendor/k8s.io/api/resource/v1alpha3/types.go | 244 +- .../v1alpha3/types_swagger_doc_generated.go | 63 +- .../v1alpha3/zz_generated.deepcopy.go | 177 + .../v1alpha3/zz_generated.model_name.go | 25 + .../zz_generated.prerelease-lifecycle.go | 36 + .../api/resource/v1beta1/generated.pb.go | 641 ++ .../api/resource/v1beta1/generated.proto | 384 +- .../v1beta1/generated.protomessage.pb.go | 108 - vendor/k8s.io/api/resource/v1beta1/types.go | 411 +- .../v1beta1/types_swagger_doc_generated.go | 75 +- .../resource/v1beta1/zz_generated.deepcopy.go | 53 + .../v1beta1/zz_generated.model_name.go | 5 + .../api/resource/v1beta2/generated.pb.go | 2038 ++++- .../api/resource/v1beta2/generated.proto | 496 +- .../v1beta2/generated.protomessage.pb.go | 108 - .../k8s.io/api/resource/v1beta2/register.go | 2 + vendor/k8s.io/api/resource/v1beta2/types.go | 564 +- .../v1beta2/types_swagger_doc_generated.go | 128 +- .../resource/v1beta2/zz_generated.deepcopy.go | 190 + .../v1beta2/zz_generated.model_name.go | 30 + .../zz_generated.prerelease-lifecycle.go | 36 + .../k8s.io/api/scheduling/v1/generated.proto | 1 + .../v1/generated.protomessage.pb.go | 26 - vendor/k8s.io/api/scheduling/v1/types.go | 1 + .../api/scheduling/v1alpha1/generated.pb.go | 2010 ----- .../api/scheduling/v1alpha1/generated.proto | 190 - .../v1alpha1/generated.protomessage.pb.go | 42 - .../k8s.io/api/scheduling/v1alpha1/types.go | 201 - .../v1alpha1/types_swagger_doc_generated.go | 131 - .../v1alpha1/zz_generated.deepcopy.go | 270 - .../v1alpha1/zz_generated.model_name.go | 72 - .../scheduling/{v1alpha1 => v1alpha2}/doc.go | 6 +- .../api/scheduling/v1alpha2/generated.pb.go | 3828 +++++++++ .../api/scheduling/v1alpha2/generated.proto | 550 ++ .../{v1alpha1 => v1alpha2}/register.go | 13 +- .../k8s.io/api/scheduling/v1alpha2/types.go | 601 ++ .../v1alpha2/types_swagger_doc_generated.go | 217 + .../v1alpha2/zz_generated.deepcopy.go | 484 ++ .../v1alpha2/zz_generated.model_name.go | 112 + .../api/scheduling/v1beta1/generated.proto | 1 + vendor/k8s.io/api/scheduling/v1beta1/types.go | 1 + vendor/k8s.io/api/storage/v1/generated.pb.go | 35 + vendor/k8s.io/api/storage/v1/generated.proto | 40 +- .../storage/v1/generated.protomessage.pb.go | 64 - vendor/k8s.io/api/storage/v1/types.go | 41 +- .../storage/v1/types_swagger_doc_generated.go | 5 +- .../api/storage/v1/zz_generated.deepcopy.go | 5 + .../api/storage/v1alpha1/generated.proto | 6 + .../v1alpha1/generated.protomessage.pb.go | 42 - vendor/k8s.io/api/storage/v1alpha1/types.go | 7 + .../api/storage/v1beta1/generated.pb.go | 35 + .../api/storage/v1beta1/generated.proto | 36 +- .../v1beta1/generated.protomessage.pb.go | 64 - vendor/k8s.io/api/storage/v1beta1/types.go | 37 +- .../v1beta1/types_swagger_doc_generated.go | 1 + .../storage/v1beta1/zz_generated.deepcopy.go | 5 + .../v1beta1/generated.protomessage.pb.go | 30 - .../v1/generated.protomessage.pb.go | 76 - .../pkg/apis/apiextensions/v1/types.go | 3 + .../v1beta1/generated.protomessage.pb.go | 74 - .../apimachinery/pkg/api/equality/semantic.go | 3 + .../api/resource/generated.protomessage.pb.go | 26 - .../pkg/api/validate/content/errors.go | 6 + .../pkg/api/validate/content/path.go | 63 + .../pkg/api/validate/discriminator.go | 71 + .../apimachinery/pkg/api/validate/limits.go | 85 +- .../apimachinery/pkg/api/validate/strfmt.go | 17 + .../apimachinery/pkg/api/validate/union.go | 19 +- .../pkg/api/validation/objectmeta.go | 2 +- .../apis/meta/internalversion/conversion.go} | 20 +- .../pkg/apis/meta/internalversion/types.go | 5 + .../zz_generated.conversion.go | 16 +- .../apimachinery/pkg/apis/meta/v1/fieldsv1.go | 170 + .../pkg/apis/meta/v1/fieldsv1_byte.go | 105 + .../pkg/apis/meta/v1/fieldsv1_string.go | 113 + .../pkg/apis/meta/v1/generated.pb.go | 353 +- .../pkg/apis/meta/v1/generated.proto | 56 + .../apis/meta/v1/generated.protomessage.pb.go | 112 - .../apimachinery/pkg/apis/meta/v1/helpers.go | 27 +- .../apimachinery/pkg/apis/meta/v1/meta.go | 9 + .../pkg/apis/meta/v1/micro_time_fuzz.go | 1 - .../pkg/apis/meta/v1/time_fuzz.go | 1 - .../apimachinery/pkg/apis/meta/v1/types.go | 73 +- .../meta/v1/types_swagger_doc_generated.go | 19 +- .../apis/meta/v1/zz_generated.conversion.go | 7 + .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 45 +- .../apis/meta/v1/zz_generated.model_name.go | 5 + .../pkg/runtime/generated.protomessage.pb.go | 28 - .../schema/generated.protomessage.pb.go | 22 - .../serializer/cbor/internal/modes/decode.go | 18 +- .../pkg/runtime/serializer/cbor/raw.go | 4 +- .../k8s.io/apimachinery/pkg/util/diff/diff.go | 5 +- .../apimachinery/pkg/util/diff/legacy_diff.go | 2 +- .../util/intstr/generated.protomessage.pb.go | 24 - .../pkg/util/intstr/instr_fuzz.go | 1 - .../pkg/util/managedfields/extract.go | 3 +- .../pkg/util/managedfields/internal/fields.go | 7 +- .../apimachinery/pkg/util/mergepatch/util.go | 2 +- .../k8s.io/apimachinery/pkg/util/net/http.go | 5 + .../apimachinery/pkg/util/net/interface.go | 112 +- .../apimachinery/pkg/util/runtime/runtime.go | 33 +- .../pkg/util/strategicpatch/patch.go | 8 +- .../util/validation/field/error_matcher.go | 40 +- .../pkg/util/validation/field/errors.go | 232 +- .../apimachinery/pkg/util/validation/ip.go | 4 +- .../forked/golang/reflect/deep_equal.go | 4 +- .../k8s.io/cli-runtime/pkg/printers/kyaml.go | 2 + .../cli-runtime/pkg/resource/visitor.go | 1 - .../v1/applyconfiguration.go | 81 + .../v1/expressionwarning.go | 4 +- .../admissionregistration/v1/jsonpatch.go | 105 + .../v1/matchcondition.go | 4 +- .../v1/matchresources.go | 8 +- .../v1/mutatingadmissionpolicy.go | 274 + .../v1/mutatingadmissionpolicybinding.go | 284 + .../v1/mutatingadmissionpolicybindingspec.go | 75 + .../v1/mutatingadmissionpolicyspec.go | 172 + .../v1/mutatingwebhook.go | 20 +- .../v1/mutatingwebhookconfiguration.go | 4 +- .../admissionregistration/v1/mutation.go | 72 + .../v1/namedrulewithoperations.go | 2 +- .../admissionregistration/v1/paramkind.go | 4 +- .../admissionregistration/v1/paramref.go | 2 +- .../admissionregistration/v1/rule.go | 6 +- .../v1/rulewithoperations.go | 2 +- .../v1/servicereference.go | 8 +- .../admissionregistration/v1/typechecking.go | 2 +- .../v1/validatingadmissionpolicy.go | 6 +- .../v1/validatingadmissionpolicybinding.go | 4 +- .../validatingadmissionpolicybindingspec.go | 4 +- .../v1/validatingadmissionpolicyspec.go | 10 +- .../v1/validatingadmissionpolicystatus.go | 6 +- .../v1/validatingwebhook.go | 20 +- .../v1/validatingwebhookconfiguration.go | 4 +- .../admissionregistration/v1/validation.go | 6 +- .../admissionregistration/v1/variable.go | 4 +- .../v1/webhookclientconfig.go | 6 +- .../v1alpha1/expressionwarning.go | 4 +- .../v1alpha1/matchcondition.go | 4 +- .../v1alpha1/matchresources.go | 8 +- .../v1alpha1/mutatingadmissionpolicy.go | 4 +- .../mutatingadmissionpolicybinding.go | 4 +- .../v1alpha1/namedrulewithoperations.go | 2 +- .../v1alpha1/paramkind.go | 4 +- .../v1alpha1/paramref.go | 4 +- .../v1alpha1/typechecking.go | 2 +- .../v1alpha1/validatingadmissionpolicy.go | 6 +- .../validatingadmissionpolicybinding.go | 4 +- .../validatingadmissionpolicybindingspec.go | 4 +- .../v1alpha1/validatingadmissionpolicyspec.go | 10 +- .../validatingadmissionpolicystatus.go | 6 +- .../v1alpha1/validation.go | 6 +- .../v1alpha1/variable.go | 4 +- .../v1beta1/expressionwarning.go | 4 +- .../v1beta1/matchcondition.go | 4 +- .../v1beta1/matchresources.go | 8 +- .../v1beta1/mutatingadmissionpolicy.go | 4 +- .../v1beta1/mutatingadmissionpolicybinding.go | 4 +- .../v1beta1/mutatingwebhook.go | 20 +- .../v1beta1/mutatingwebhookconfiguration.go | 4 +- .../v1beta1/namedrulewithoperations.go | 2 +- .../v1beta1/paramkind.go | 4 +- .../admissionregistration/v1beta1/paramref.go | 2 +- .../v1beta1/servicereference.go | 10 +- .../v1beta1/typechecking.go | 2 +- .../v1beta1/validatingadmissionpolicy.go | 6 +- .../validatingadmissionpolicybinding.go | 4 +- .../validatingadmissionpolicybindingspec.go | 4 +- .../v1beta1/validatingadmissionpolicyspec.go | 10 +- .../validatingadmissionpolicystatus.go | 6 +- .../v1beta1/validatingwebhook.go | 20 +- .../v1beta1/validatingwebhookconfiguration.go | 4 +- .../v1beta1/validation.go | 6 +- .../admissionregistration/v1beta1/variable.go | 4 +- .../v1beta1/webhookclientconfig.go | 6 +- .../v1alpha1/serverstorageversion.go | 7 +- .../v1alpha1/storageversion.go | 5 +- .../v1alpha1/storageversioncondition.go | 12 +- .../v1alpha1/storageversionstatus.go | 9 +- .../v2beta1/containerresourcemetricsource.go | 87 - .../v2beta1/containerresourcemetricstatus.go | 88 - .../v2beta1/crossversionobjectreference.go | 62 - .../v2beta1/externalmetricsource.go | 83 - .../v2beta1/externalmetricstatus.go | 80 - .../horizontalpodautoscalercondition.go | 91 - .../v2beta1/horizontalpodautoscalerspec.go | 89 - .../v2beta1/horizontalpodautoscalerstatus.go | 110 - .../autoscaling/v2beta1/metricspec.go | 113 - .../autoscaling/v2beta1/metricstatus.go | 112 - .../autoscaling/v2beta1/objectmetricsource.go | 91 - .../autoscaling/v2beta1/objectmetricstatus.go | 91 - .../autoscaling/v2beta1/podsmetricsource.go | 73 - .../autoscaling/v2beta1/podsmetricstatus.go | 71 - .../v2beta1/resourcemetricsource.go | 77 - .../v2beta1/resourcemetricstatus.go | 78 - .../v2beta2/containerresourcemetricsource.go | 72 - .../v2beta2/containerresourcemetricstatus.go | 70 - .../v2beta2/crossversionobjectreference.go | 62 - .../v2beta2/externalmetricsource.go | 54 - .../v2beta2/externalmetricstatus.go | 53 - .../horizontalpodautoscalerbehavior.go | 60 - .../horizontalpodautoscalercondition.go | 91 - .../v2beta2/horizontalpodautoscalerspec.go | 102 - .../v2beta2/horizontalpodautoscalerstatus.go | 110 - .../autoscaling/v2beta2/hpascalingpolicy.go | 68 - .../autoscaling/v2beta2/hpascalingrules.go | 83 - .../autoscaling/v2beta2/metricidentifier.go | 58 - .../autoscaling/v2beta2/metricspec.go | 113 - .../autoscaling/v2beta2/metricstatus.go | 112 - .../autoscaling/v2beta2/metrictarget.go | 81 - .../autoscaling/v2beta2/metricvaluestatus.go | 69 - .../autoscaling/v2beta2/objectmetricsource.go | 62 - .../autoscaling/v2beta2/objectmetricstatus.go | 62 - .../autoscaling/v2beta2/podsmetricsource.go | 55 - .../autoscaling/v2beta2/podsmetricstatus.go | 53 - .../v2beta2/resourcemetricsource.go | 62 - .../v2beta2/resourcemetricstatus.go | 60 - .../v1beta1/podcertificaterequestspec.go | 48 +- .../core/v1/imagevolumestatus.go | 44 + .../v1/nodeallocatableresourceclaimstatus.go | 75 + .../core/v1/persistentvolumesource.go | 3 +- .../core/v1/podcondition.go | 1 - .../core/v1/podresourceclaim.go | 18 + .../core/v1/podresourceclaimstatus.go | 13 +- .../core/v1/podschedulinggroup.go | 46 + .../applyconfigurations/core/v1/podspec.go | 28 +- .../applyconfigurations/core/v1/podstatus.go | 19 + .../core/v1/resourcehealth.go | 11 + .../core/v1/securitycontext.go | 1 - .../core/v1/volumemountstatus.go | 11 + .../core/v1/volumesource.go | 5 +- .../core/v1/volumestatus.go | 43 + .../core/v1/workloadreference.go | 74 - .../applyconfigurations/internal/internal.go | 1498 ++-- .../resource/v1/allocationresult.go | 2 +- .../resource/v1/celdeviceselector.go | 8 + .../applyconfigurations/resource/v1/device.go | 35 +- .../resource/v1/deviceattribute.go | 56 + .../resource/v1/deviceclass.go | 3 - .../resource/v1/deviceclassspec.go | 2 +- .../resource/v1/deviceconstraint.go | 10 + .../v1/devicerequestallocationresult.go | 9 +- .../resource/v1/devicesubrequest.go | 2 +- .../resource/v1/devicetaint.go | 11 +- .../resource/v1/exactdevicerequest.go | 5 +- .../resource/v1/networkdevicedata.go | 4 +- .../v1/nodeallocatableresourcemapping.go | 84 + .../resource/v1/resourceclaim.go | 3 - .../resource/v1/resourceclaimtemplate.go | 3 - .../resource/v1/resourceslice.go | 3 - .../resource/v1alpha3/devicetaint.go | 11 +- .../resource/v1alpha3/poolstatus.go | 152 + .../v1alpha3/resourcepoolstatusrequest.go} | 165 +- .../v1alpha3/resourcepoolstatusrequestspec.go | 73 + .../resourcepoolstatusrequeststatus.go | 87 + .../resource/v1beta1/allocationresult.go | 2 +- .../resource/v1beta1/basicdevice.go | 35 +- .../resource/v1beta1/celdeviceselector.go | 8 + .../resource/v1beta1/deviceattribute.go | 56 + .../resource/v1beta1/deviceclassspec.go | 2 +- .../resource/v1beta1/deviceconstraint.go | 10 + .../resource/v1beta1/devicerequest.go | 2 +- .../v1beta1/devicerequestallocationresult.go | 6 +- .../resource/v1beta1/devicesubrequest.go | 2 +- .../resource/v1beta1/devicetaint.go | 11 +- .../resource/v1beta1/networkdevicedata.go | 4 +- .../v1beta1/nodeallocatableresourcemapping.go | 84 + .../resource/v1beta2/allocationresult.go | 2 +- .../resource/v1beta2/celdeviceselector.go | 8 + .../resource/v1beta2/device.go | 35 +- .../resource/v1beta2/deviceattribute.go | 56 + .../resource/v1beta2/deviceclassspec.go | 2 +- .../resource/v1beta2/deviceconstraint.go | 10 + .../v1beta2/devicerequestallocationresult.go | 6 +- .../resource/v1beta2/devicesubrequest.go | 2 +- .../resource/v1beta2/devicetaint.go | 11 +- .../v1beta2/devicetaintrule.go} | 128 +- .../resource/v1beta2/devicetaintrulespec.go | 55 + .../resource/v1beta2/devicetaintrulestatus.go | 70 + .../resource/v1beta2/devicetaintselector.go | 76 + .../resource/v1beta2/exactdevicerequest.go | 2 +- .../resource/v1beta2/networkdevicedata.go | 4 +- .../v1beta2/nodeallocatableresourcemapping.go | 84 + .../scheduling/v1alpha1/podgroup.go | 53 - .../gangschedulingpolicy.go | 2 +- .../v1alpha2/podgroup.go} | 126 +- .../v1alpha2/podgroupresourceclaim.go | 89 + .../v1alpha2/podgroupresourceclaimstatus.go | 59 + .../v1alpha2/podgroupschedulingconstraints.go | 48 + .../podgroupschedulingpolicy.go} | 23 +- .../scheduling/v1alpha2/podgroupspec.go | 145 + .../scheduling/v1alpha2/podgroupstatus.go | 81 + .../scheduling/v1alpha2/podgrouptemplate.go | 136 + .../v1alpha2/podgrouptemplatereference.go | 44 + .../scheduling/v1alpha2/topologyconstraint.go | 45 + .../typedlocalobjectreference.go | 2 +- .../{v1alpha1 => v1alpha2}/workload.go | 19 +- .../workloadpodgrouptemplatereference.go | 52 + .../{v1alpha1 => v1alpha2}/workloadspec.go | 20 +- .../storage/v1/csidriverspec.go | 28 +- .../storage/v1/volumeerror.go | 2 +- .../storage/v1beta1/csidriverspec.go | 26 + .../client-go/applyconfigurations/utils.go | 184 +- .../discovery/cached/disk/round_tripper.go | 4 +- vendor/k8s.io/client-go/features/envvar.go | 35 +- vendor/k8s.io/client-go/features/features.go | 6 +- .../client-go/features/known_features.go | 40 + .../admissionregistration/v1/interface.go | 14 + .../v1/mutatingadmissionpolicy.go | 115 + .../v1/mutatingadmissionpolicybinding.go | 115 + .../v1/mutatingwebhookconfiguration.go | 48 +- .../v1/validatingadmissionpolicy.go | 48 +- .../v1/validatingadmissionpolicybinding.go | 48 +- .../v1/validatingwebhookconfiguration.go | 48 +- .../v1alpha1/mutatingadmissionpolicy.go | 48 +- .../mutatingadmissionpolicybinding.go | 48 +- .../v1alpha1/validatingadmissionpolicy.go | 48 +- .../validatingadmissionpolicybinding.go | 48 +- .../v1beta1/mutatingadmissionpolicy.go | 48 +- .../v1beta1/mutatingadmissionpolicybinding.go | 48 +- .../v1beta1/mutatingwebhookconfiguration.go | 48 +- .../v1beta1/validatingadmissionpolicy.go | 48 +- .../validatingadmissionpolicybinding.go | 48 +- .../v1beta1/validatingwebhookconfiguration.go | 48 +- .../v1alpha1/storageversion.go | 48 +- .../informers/apps/v1/controllerrevision.go | 48 +- .../client-go/informers/apps/v1/daemonset.go | 48 +- .../client-go/informers/apps/v1/deployment.go | 48 +- .../client-go/informers/apps/v1/replicaset.go | 48 +- .../informers/apps/v1/statefulset.go | 48 +- .../apps/v1beta1/controllerrevision.go | 48 +- .../informers/apps/v1beta1/deployment.go | 48 +- .../informers/apps/v1beta1/statefulset.go | 48 +- .../apps/v1beta2/controllerrevision.go | 48 +- .../informers/apps/v1beta2/daemonset.go | 48 +- .../informers/apps/v1beta2/deployment.go | 48 +- .../informers/apps/v1beta2/replicaset.go | 48 +- .../informers/apps/v1beta2/statefulset.go | 48 +- .../informers/autoscaling/interface.go | 16 - .../autoscaling/v1/horizontalpodautoscaler.go | 48 +- .../autoscaling/v2/horizontalpodautoscaler.go | 48 +- .../v2beta1/horizontalpodautoscaler.go | 102 - .../autoscaling/v2beta1/interface.go | 45 - .../v2beta2/horizontalpodautoscaler.go | 102 - .../autoscaling/v2beta2/interface.go | 45 - .../client-go/informers/batch/v1/cronjob.go | 48 +- .../client-go/informers/batch/v1/job.go | 48 +- .../informers/batch/v1beta1/cronjob.go | 48 +- .../v1/certificatesigningrequest.go | 48 +- .../v1alpha1/clustertrustbundle.go | 48 +- .../v1beta1/certificatesigningrequest.go | 48 +- .../v1beta1/clustertrustbundle.go | 48 +- .../v1beta1/podcertificaterequest.go | 48 +- .../informers/coordination/v1/lease.go | 48 +- .../coordination/v1alpha2/leasecandidate.go | 48 +- .../informers/coordination/v1beta1/lease.go | 48 +- .../coordination/v1beta1/leasecandidate.go | 48 +- .../informers/core/v1/componentstatus.go | 48 +- .../client-go/informers/core/v1/configmap.go | 48 +- .../client-go/informers/core/v1/endpoints.go | 48 +- .../client-go/informers/core/v1/event.go | 48 +- .../client-go/informers/core/v1/limitrange.go | 48 +- .../client-go/informers/core/v1/namespace.go | 48 +- .../client-go/informers/core/v1/node.go | 48 +- .../informers/core/v1/persistentvolume.go | 48 +- .../core/v1/persistentvolumeclaim.go | 48 +- .../k8s.io/client-go/informers/core/v1/pod.go | 48 +- .../informers/core/v1/podtemplate.go | 48 +- .../core/v1/replicationcontroller.go | 48 +- .../informers/core/v1/resourcequota.go | 48 +- .../client-go/informers/core/v1/secret.go | 48 +- .../client-go/informers/core/v1/service.go | 48 +- .../informers/core/v1/serviceaccount.go | 48 +- .../informers/discovery/v1/endpointslice.go | 48 +- .../discovery/v1beta1/endpointslice.go | 48 +- .../client-go/informers/events/v1/event.go | 48 +- .../informers/events/v1beta1/event.go | 48 +- .../informers/extensions/v1beta1/daemonset.go | 48 +- .../extensions/v1beta1/deployment.go | 48 +- .../informers/extensions/v1beta1/ingress.go | 48 +- .../extensions/v1beta1/networkpolicy.go | 48 +- .../extensions/v1beta1/replicaset.go | 48 +- vendor/k8s.io/client-go/informers/factory.go | 110 +- .../informers/flowcontrol/v1/flowschema.go | 48 +- .../v1/prioritylevelconfiguration.go | 48 +- .../flowcontrol/v1beta1/flowschema.go | 48 +- .../v1beta1/prioritylevelconfiguration.go | 48 +- .../flowcontrol/v1beta2/flowschema.go | 48 +- .../v1beta2/prioritylevelconfiguration.go | 48 +- .../flowcontrol/v1beta3/flowschema.go | 48 +- .../v1beta3/prioritylevelconfiguration.go | 48 +- vendor/k8s.io/client-go/informers/generic.go | 30 +- .../internalinterfaces/factory_interfaces.go | 19 + .../informers/networking/v1/ingress.go | 48 +- .../informers/networking/v1/ingressclass.go | 48 +- .../informers/networking/v1/ipaddress.go | 48 +- .../informers/networking/v1/networkpolicy.go | 48 +- .../informers/networking/v1/servicecidr.go | 48 +- .../informers/networking/v1beta1/ingress.go | 48 +- .../networking/v1beta1/ingressclass.go | 48 +- .../informers/networking/v1beta1/ipaddress.go | 48 +- .../networking/v1beta1/servicecidr.go | 48 +- .../informers/node/v1/runtimeclass.go | 48 +- .../informers/node/v1alpha1/runtimeclass.go | 48 +- .../informers/node/v1beta1/runtimeclass.go | 48 +- .../policy/v1/poddisruptionbudget.go | 48 +- .../policy/v1beta1/poddisruptionbudget.go | 48 +- .../informers/rbac/v1/clusterrole.go | 48 +- .../informers/rbac/v1/clusterrolebinding.go | 48 +- .../client-go/informers/rbac/v1/role.go | 48 +- .../informers/rbac/v1/rolebinding.go | 48 +- .../informers/rbac/v1alpha1/clusterrole.go | 48 +- .../rbac/v1alpha1/clusterrolebinding.go | 48 +- .../client-go/informers/rbac/v1alpha1/role.go | 48 +- .../informers/rbac/v1alpha1/rolebinding.go | 48 +- .../informers/rbac/v1beta1/clusterrole.go | 48 +- .../rbac/v1beta1/clusterrolebinding.go | 48 +- .../client-go/informers/rbac/v1beta1/role.go | 48 +- .../informers/rbac/v1beta1/rolebinding.go | 48 +- .../informers/resource/v1/deviceclass.go | 48 +- .../informers/resource/v1/resourceclaim.go | 48 +- .../resource/v1/resourceclaimtemplate.go | 48 +- .../informers/resource/v1/resourceslice.go | 48 +- .../resource/v1alpha3/devicetaintrule.go | 48 +- .../informers/resource/v1alpha3/interface.go | 7 + .../v1alpha3/resourcepoolstatusrequest.go | 115 + .../informers/resource/v1beta1/deviceclass.go | 48 +- .../resource/v1beta1/resourceclaim.go | 48 +- .../resource/v1beta1/resourceclaimtemplate.go | 48 +- .../resource/v1beta1/resourceslice.go | 48 +- .../informers/resource/v1beta2/deviceclass.go | 48 +- .../resource/v1beta2/devicetaintrule.go | 115 + .../informers/resource/v1beta2/interface.go | 7 + .../resource/v1beta2/resourceclaim.go | 48 +- .../resource/v1beta2/resourceclaimtemplate.go | 48 +- .../resource/v1beta2/resourceslice.go | 48 +- .../informers/scheduling/interface.go | 12 +- .../informers/scheduling/v1/priorityclass.go | 48 +- .../scheduling/v1alpha1/priorityclass.go | 101 - .../informers/scheduling/v1alpha1/workload.go | 102 - .../{v1alpha1 => v1alpha2}/interface.go | 12 +- .../informers/scheduling/v1alpha2/podgroup.go | 116 + .../informers/scheduling/v1alpha2/workload.go | 116 + .../scheduling/v1beta1/priorityclass.go | 48 +- .../informers/storage/v1/csidriver.go | 48 +- .../client-go/informers/storage/v1/csinode.go | 48 +- .../storage/v1/csistoragecapacity.go | 48 +- .../informers/storage/v1/storageclass.go | 48 +- .../informers/storage/v1/volumeattachment.go | 48 +- .../storage/v1/volumeattributesclass.go | 48 +- .../storage/v1alpha1/csistoragecapacity.go | 48 +- .../storage/v1alpha1/volumeattachment.go | 48 +- .../storage/v1alpha1/volumeattributesclass.go | 48 +- .../informers/storage/v1beta1/csidriver.go | 48 +- .../informers/storage/v1beta1/csinode.go | 48 +- .../storage/v1beta1/csistoragecapacity.go | 48 +- .../informers/storage/v1beta1/storageclass.go | 48 +- .../storage/v1beta1/volumeattachment.go | 48 +- .../storage/v1beta1/volumeattributesclass.go | 48 +- .../v1beta1/storageversionmigration.go | 48 +- .../k8s.io/client-go/kubernetes/clientset.go | 42 +- .../kubernetes/fake/clientset_generated.go | 34 +- .../client-go/kubernetes/fake/register.go | 8 +- .../client-go/kubernetes/scheme/register.go | 8 +- .../v1/admissionregistration_client.go | 10 + .../fake/fake_admissionregistration_client.go | 8 + .../v1/fake/fake_mutatingadmissionpolicy.go | 53 + .../fake_mutatingadmissionpolicybinding.go | 53 + .../v1/generated_expansion.go | 4 + .../v1/mutatingadmissionpolicy.go | 75 + .../v1/mutatingadmissionpolicybinding.go | 75 + .../autoscaling/v2beta1/autoscaling_client.go | 101 - .../v2beta1/fake/fake_autoscaling_client.go | 40 - .../fake/fake_horizontalpodautoscaler.go | 53 - .../v2beta1/generated_expansion.go | 21 - .../v2beta1/horizontalpodautoscaler.go | 79 - .../autoscaling/v2beta2/autoscaling_client.go | 101 - .../v2beta2/fake/fake_autoscaling_client.go | 40 - .../fake/fake_horizontalpodautoscaler.go | 53 - .../v2beta2/generated_expansion.go | 21 - .../v2beta2/horizontalpodautoscaler.go | 79 - .../typed/core/v1/fake/fake_pod_expansion.go | 21 +- .../v1alpha3/fake/fake_resource_client.go | 4 + .../fake/fake_resourcepoolstatusrequest.go | 53 + .../resource/v1alpha3/generated_expansion.go | 2 + .../resource/v1alpha3/resource_client.go | 5 + .../v1alpha3/resourcepoolstatusrequest.go | 79 + .../typed/resource/v1beta2/devicetaintrule.go | 75 + .../v1beta2/fake/fake_devicetaintrule.go | 53 + .../v1beta2/fake/fake_resource_client.go | 4 + .../resource/v1beta2/generated_expansion.go | 2 + .../typed/resource/v1beta2/resource_client.go | 5 + .../typed/scheduling/v1alpha1/doc.go | 20 - .../typed/scheduling/v1alpha1/fake/doc.go | 20 - .../v1alpha1/fake/fake_priorityclass.go | 53 - .../scheduling/v1alpha1/fake/fake_workload.go | 51 - .../scheduling/v1alpha1/priorityclass.go | 71 - .../v2beta2 => scheduling/v1alpha2}/doc.go | 2 +- .../v1alpha2}/fake/doc.go | 0 .../scheduling/v1alpha2/fake/fake_podgroup.go | 51 + .../fake/fake_scheduling_client.go | 12 +- .../scheduling/v1alpha2/fake/fake_workload.go | 51 + .../generated_expansion.go | 4 +- .../typed/scheduling/v1alpha2/podgroup.go | 75 + .../scheduling_client.go | 42 +- .../{v1alpha1 => v1alpha2}/workload.go | 30 +- .../v1/expansion_generated.go | 8 + .../v1/mutatingadmissionpolicy.go | 48 + .../v1/mutatingadmissionpolicybinding.go | 48 + .../v2beta1/expansion_generated.go | 27 - .../v2beta1/horizontalpodautoscaler.go | 70 - .../v2beta2/expansion_generated.go | 27 - .../v2beta2/horizontalpodautoscaler.go | 70 - .../resource/v1alpha3/expansion_generated.go | 4 + .../v1alpha3/resourcepoolstatusrequest.go | 48 + .../v1beta2/devicetaintrule.go} | 30 +- .../resource/v1beta2/expansion_generated.go | 4 + .../expansion_generated.go | 12 +- .../listers/scheduling/v1alpha2/podgroup.go | 70 + .../{v1alpha1 => v1alpha2}/workload.go | 18 +- .../plugin/pkg/client/auth/exec/exec.go | 20 +- vendor/k8s.io/client-go/testing/doc.go | 70 + vendor/k8s.io/client-go/testing/fixture.go | 122 +- .../third_party/forked/httpcache/LICENSE} | 0 .../forked}/httpcache/httpcache.go | 9 +- vendor/k8s.io/client-go/tools/cache/OWNERS | 1 + .../client-go/tools/cache/controller.go | 171 +- .../client-go/tools/cache/delta_fifo.go | 95 +- .../tools/cache/event_handler_name.go | 121 + .../client-go/tools/cache/expiration_cache.go | 12 +- vendor/k8s.io/client-go/tools/cache/fifo.go | 79 +- .../client-go/tools/cache/fifo_metrics.go | 122 + .../k8s.io/client-go/tools/cache/identity.go | 217 + .../k8s.io/client-go/tools/cache/reflector.go | 199 +- .../tools/cache/reflector_metrics.go | 6 + .../client-go/tools/cache/shared_informer.go | 350 +- vendor/k8s.io/client-go/tools/cache/store.go | 54 +- .../tools/cache/synctrack/synctrack.go | 132 +- .../client-go/tools/cache/the_real_fifo.go | 459 +- .../tools/cache/thread_safe_store.go | 128 +- .../client-go/tools/clientcmd/api/types.go | 6 +- .../tools/clientcmd/client_config.go | 2 + .../client-go/tools/clientcmd/config.go | 1 + .../client-go/tools/clientcmd/loader.go | 2 + .../tools/clientcmd/merged_client_builder.go | 2 + vendor/k8s.io/client-go/tools/events/OWNERS | 10 + .../v2beta2/fake => tools/events}/doc.go | 9 +- .../tools/events/event_broadcaster.go | 457 + .../client-go/tools/events/event_recorder.go | 113 + vendor/k8s.io/client-go/tools/events/fake.go | 52 + .../k8s.io/client-go/tools/events/helper.go | 64 + .../client-go/tools/events/interfaces.go | 92 + .../tools/leaderelection/leaderelection.go | 42 +- .../tools/leaderelection/leasecandidate.go | 21 +- .../leaderelection/resourcelock/leaselock.go | 2 +- .../k8s.io/client-go/tools/metrics/metrics.go | 78 +- vendor/k8s.io/client-go/tools/record/event.go | 5 +- .../client-go/tools/watch/retrywatcher.go | 2 +- .../k8s.io/client-go/transport/ca_rotation.go | 154 + vendor/k8s.io/client-go/transport/cache.go | 153 +- vendor/k8s.io/client-go/transport/config.go | 3 +- .../client-go/transport/round_trippers.go | 2 +- .../k8s.io/client-go/transport/transport.go | 25 +- .../client-go/util/watchlist/watch_list.go | 3 + .../cmd/deepcopy-gen/args/args.go | 3 - .../cmd/deepcopy-gen/generators/deepcopy.go | 16 +- .../featuregate/feature_gate.go | 108 +- vendor/k8s.io/component-base/metrics/OWNERS | 3 +- .../component-base/metrics/api/v1/config.go | 127 + .../component-base/metrics/api/v1/doc.go | 34 + .../component-base/metrics/api/v1/types.go | 39 + .../metrics/api/v1/zz_generated.deepcopy.go | 50 + vendor/k8s.io/component-base/metrics/desc.go | 2 +- .../component-base/metrics/histogram.go | 23 +- .../metrics/internal/nativehistograms.go | 57 + .../k8s.io/component-base/metrics/metric.go | 4 +- .../k8s.io/component-base/metrics/options.go | 257 +- vendor/k8s.io/component-base/metrics/opts.go | 82 +- .../metrics/processstarttime_others.go | 1 - .../metrics/processstarttime_windows.go | 1 - .../k8s.io/component-base/metrics/registry.go | 73 +- .../k8s.io/component-base/metrics/version.go | 2 +- vendor/k8s.io/component-base/version/base.go | 2 +- .../klog/v2/internal/verbosity/verbosity.go | 303 + vendor/k8s.io/klog/v2/textlogger/options.go | 172 + .../k8s.io/klog/v2/textlogger/textlogger.go | 200 + .../klog/v2/textlogger/textlogger_slog.go | 52 + vendor/k8s.io/kubectl/pkg/drain/filters.go | 5 +- vendor/k8s.io/kubectl/pkg/scheme/install.go | 2 - vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go | 4 +- .../kubectl/pkg/util/term/resizeevents.go | 1 - vendor/k8s.io/kubectl/pkg/util/term/term.go | 25 + .../pkg/util => utils}/dump/dump.go | 0 .../utils/third_party/forked/golang/LICENSE | 27 + .../utils/third_party/forked/golang/PATENTS | 22 + .../third_party/forked/golang/btree/LICENSE | 202 + .../third_party/forked/golang/btree/README.md | 7 + .../third_party/forked/golang/btree/btree.go | 856 ++ vendor/modules.txt | 434 +- .../v2/api/v1beta1/awscluster_conversion.go | 1 + .../v2/api/v1beta1/zz_generated.conversion.go | 1 + .../v2/api/v1beta2/awscluster_defaults.go} | 12 +- .../v2/api/v1beta2/awscluster_types.go | 20 + .../v2/api/v1beta2/awscluster_webhook.go | 537 -- .../awsclustercontrolleridentity_webhook.go | 126 - .../v1beta2/awsclusterroleidentity_webhook.go | 119 - .../awsclusterstaticidentity_webhook.go | 113 - .../api/v1beta2/awsclustertemplate_webhook.go | 93 - .../v2/api/v1beta2/awsmachine_webhook.go | 513 -- .../api/v1beta2/awsmachinetemplate_webhook.go | 284 - .../v2/api/v1beta2/bastion.go | 18 - .../v2/api/v1beta2/network_types.go | 8 +- .../v2/api/v1beta2/types.go | 24 + .../v2/api/v1beta2/zz_generated.deepcopy.go | 27 +- .../v1beta1/azureasomanagedcluster_types.go | 2 +- .../v1beta1/azureasomanagedcluster_webhook.go | 70 - .../azureasomanagedclustertemplate_types.go | 2 +- .../azureasomanagedcontrolplane_types.go | 2 +- .../azureasomanagedcontrolplane_webhook.go | 70 - ...ureasomanagedcontrolplanetemplate_types.go | 2 +- .../azureasomanagedmachinepool_types.go | 2 +- .../azureasomanagedmachinepool_webhook.go | 70 - ...zureasomanagedmachinepooltemplate_types.go | 2 +- .../api/v1beta1/azurecluster_default.go | 599 -- .../api/v1beta1/azurecluster_types.go | 2 +- .../api/v1beta1/azurecluster_validation.go | 805 -- .../api/v1beta1/azurecluster_webhook.go | 232 - .../api/v1beta1/azureclusteridentity_types.go | 6 +- .../azureclusteridentity_validation.go | 40 - .../v1beta1/azureclusteridentity_webhook.go | 82 - .../v1beta1/azureclustertemplate_default.go | 133 - .../api/v1beta1/azureclustertemplate_types.go | 2 +- .../azureclustertemplate_validation.go | 188 - .../v1beta1/azureclustertemplate_webhook.go | 99 - .../api/v1beta1/azureimage_validation.go | 146 - .../api/v1beta1/azuremachine_default.go | 248 - .../api/v1beta1/azuremachine_types.go | 2 +- .../api/v1beta1/azuremachine_validation.go | 503 -- .../api/v1beta1/azuremachine_webhook.go | 249 - .../api/v1beta1/azuremachinetemplate_types.go | 60 +- .../v1beta1/azuremachinetemplate_webhook.go | 161 - .../api/v1beta1/azuremanagedcluster_types.go | 2 +- .../v1beta1/azuremanagedcluster_webhook.go | 56 - .../azuremanagedclustertemplate_types.go | 2 +- .../azuremanagedclustertemplate_webhook.go | 56 - .../azuremanagedcontrolplane_default.go | 151 - .../v1beta1/azuremanagedcontrolplane_types.go | 2 +- .../azuremanagedcontrolplane_webhook.go | 1264 --- ...zuremanagedcontrolplanetemplate_default.go | 72 - .../azuremanagedcontrolplanetemplate_types.go | 2 +- ...zuremanagedcontrolplanetemplate_webhook.go | 315 - .../v1beta1/azuremanagedmachinepool_types.go | 2 +- .../azuremanagedmachinepool_webhook.go | 587 -- .../azuremanagedmachinepooltemplate_types.go | 2 +- ...azuremanagedmachinepooltemplate_webhook.go | 279 - .../api/v1beta1/groupversion_info.go | 17 +- .../api/v1beta1/tags.go | 11 +- .../api/v1beta1/types.go | 16 +- .../api/v1beta1/types_class.go | 30 - .../api/v1beta1/types_template.go | 9 +- .../api/v1beta1/zz_generated.deepcopy.go | 58 +- .../util/azure/azure.go | 40 +- .../api/v1beta1/conditions_consts.go} | 25 +- .../api/v1beta1/gcpcluster_types.go | 10 +- .../api/v1beta1/gcpcluster_webhook.go | 129 - .../api/v1beta1/gcpclustertemplate_types.go | 4 +- .../api/v1beta1/gcpclustertemplate_webhook.go | 81 - .../api/v1beta1/gcpmachine_types.go | 8 - .../api/v1beta1/gcpmachine_webhook.go | 189 - .../api/v1beta1/gcpmachinetemplate_webhook.go | 120 - .../api/v1beta1/labels.go | 5 + .../api/v1beta1/types.go | 178 +- .../api/v1beta1/zz_generated.deepcopy.go | 80 +- .../api/v1beta2/ibmpowervscluster_types.go | 4 +- .../api/v1beta2/ibmpowervsimage_types.go | 3 +- .../api/v1beta2/ibmpowervsmachine_types.go | 3 +- .../api/v1beta2/ibmvpcmachine_types.go | 18 +- .../api/v1beta2/types.go | 3 +- .../api/v1beta2/zz_generated.deepcopy.go | 16 + .../api/v1beta1/conditions_consts.go | 29 + .../api/v1beta1/identity_types.go | 15 +- .../api/v1beta1/openstackcluster_types.go | 38 + .../api/v1beta1/openstackmachine_types.go | 28 + .../v1beta1/openstackmachinetemplate_types.go | 33 +- .../api/v1beta1/types.go | 5 + .../api/v1beta1/zz_generated.deepcopy.go | 88 +- .../pkg/utils/errors/errors.go | 2 +- .../pkg/utils/errors/terminal.go | 2 +- .../apis/v1beta1/types.go | 54 + .../apis/v1beta1/vspheremachine_types.go | 4 + .../apis/v1beta1/zz_generated.deepcopy.go | 51 + .../kubeadm/v1beta2/kubeadmconfig_types.go | 77 +- .../kubeadm/v1beta2/zz_generated.deepcopy.go | 20 + .../api/core/v1beta1/cluster_types.go | 88 +- .../api/core/v1beta1/clusterclass_types.go | 95 + .../api/core/v1beta1/common_types.go | 56 + .../api/core/v1beta1/conversion.go | 156 +- .../api/core/v1beta1/machine_types.go | 17 + .../core/v1beta1/machinehealthcheck_types.go | 35 + .../core/v1beta1/zz_generated.conversion.go | 220 +- .../api/core/v1beta1/zz_generated.deepcopy.go | 147 + .../api/core/v1beta1/zz_generated.openapi.go | 5425 ------------ .../api/core/v1beta2/cluster_types.go | 79 +- .../api/core/v1beta2/clusterclass_types.go | 51 + .../api/core/v1beta2/common_types.go | 3 +- .../api/core/v1beta2/condition_types.go | 10 + .../api/core/v1beta2/machine_types.go | 9 +- .../api/core/v1beta2/zz_generated.deepcopy.go | 48 + .../api/core/v1beta2/zz_generated.openapi.go | 200 +- .../cluster-api/feature/feature.go | 15 +- .../cluster-api/util/conditions/sort.go | 21 +- .../cluster-api/util/conversion/conversion.go | 59 +- .../cluster-api/util/patch/patch.go | 83 +- .../cluster-api/util/patch/utils.go | 22 +- .../cluster-api/util/secret/consts.go | 12 + .../cluster-api/util/topology/topology.go | 10 - .../sigs.k8s.io/controller-runtime/.gitignore | 1 + .../controller-runtime/.golangci.yml | 313 +- .../sigs.k8s.io/controller-runtime/Makefile | 16 +- .../controller-runtime/OWNERS_ALIASES | 9 +- .../sigs.k8s.io/controller-runtime/README.md | 12 +- .../controller-runtime/VERSIONING.md | 10 + .../sigs.k8s.io/controller-runtime/alias.go | 54 +- vendor/sigs.k8s.io/controller-runtime/doc.go | 2 +- .../pkg/builder/controller.go | 2 +- .../controller-runtime/pkg/builder/webhook.go | 256 +- .../controller-runtime/pkg/cache/cache.go | 136 +- .../pkg/cache/delegating_by_gvk_cache.go | 13 +- .../pkg/cache/informer_cache.go | 31 +- .../pkg/cache/internal/cache_reader.go | 33 +- .../pkg/cache/internal/informers.go | 91 +- .../pkg/cache/multi_namespace_cache.go | 151 +- .../pkg/certwatcher/certwatcher.go | 103 +- .../pkg/client/apiutil/apimachinery.go | 22 +- .../pkg/client/apiutil/errors.go | 8 +- .../pkg/client/apiutil/restmapper.go | 136 +- .../pkg/client/applyconfigurations.go | 53 + .../controller-runtime/pkg/client/client.go | 86 +- .../pkg/client/client_rest_resources.go | 105 +- .../pkg/client/config/config.go | 18 +- .../controller-runtime/pkg/client/dryrun.go | 8 + .../pkg/client/fieldowner.go | 8 + .../pkg/client/fieldvalidation.go | 11 + .../pkg/client/interfaces.go | 20 +- .../pkg/client/namespaced_client.go | 103 +- .../controller-runtime/pkg/client/options.go | 145 +- .../controller-runtime/pkg/client/patch.go | 8 +- .../pkg/client/typed_client.go | 115 +- .../pkg/client/unstructured_client.go | 89 +- .../controller-runtime/pkg/cluster/cluster.go | 46 +- .../pkg/cluster/internal.go | 5 + .../pkg/config/controller.go | 40 +- .../pkg/controller/controller.go | 129 +- .../controllerutil/controllerutil.go | 97 +- .../controller-runtime/pkg/controller/name.go | 2 +- .../pkg/controller/priorityqueue/metrics.go | 172 + .../controller/priorityqueue/priorityqueue.go | 569 ++ .../pkg/envtest/binaries.go | 387 + .../controller-runtime/pkg/envtest/crd.go | 13 +- .../controller-runtime/pkg/envtest/server.go | 79 +- .../controller-runtime/pkg/envtest/webhook.go | 12 +- .../controller-runtime/pkg/event/event.go | 3 + .../controller-runtime/pkg/handler/enqueue.go | 19 +- .../pkg/handler/enqueue_mapped.go | 44 +- .../pkg/handler/enqueue_owner.go | 2 +- .../pkg/handler/eventhandler.go | 115 +- .../controller-runtime/pkg/healthz/healthz.go | 4 +- .../pkg/internal/controller/controller.go | 322 +- .../internal/controller/metrics/metrics.go | 19 +- .../pkg/internal/flock/flock_other.go | 2 +- .../pkg/internal/flock/flock_unix.go | 1 - .../pkg/internal/httpserver/server.go | 5 +- .../pkg/internal/metrics/workqueue.go | 210 + .../pkg/internal/recorder/recorder.go | 102 +- .../pkg/internal/source/event_handler.go | 22 +- .../pkg/internal/source/kind.go | 41 +- .../pkg/internal/testing/addr/manager.go | 8 +- .../testing/controlplane/apiserver.go | 18 +- .../pkg/internal/testing/controlplane/auth.go | 2 +- .../pkg/internal/testing/controlplane/etcd.go | 4 + .../pkg/internal/testing/process/arguments.go | 8 +- .../testing/process/procattr_other.go | 1 - .../internal/testing/process/procattr_unix.go | 3 +- .../pkg/internal/testing/process/process.go | 8 +- .../internal/testing/process/signal_other.go} | 16 +- .../internal/testing/process/signal_unix.go} | 18 +- .../pkg/leaderelection/leader_election.go | 35 +- .../controller-runtime/pkg/log/deleg.go | 10 +- .../controller-runtime/pkg/log/log.go | 2 +- .../controller-runtime/pkg/log/null.go | 6 +- .../pkg/log/warning_handler.go | 27 +- .../pkg/manager/internal.go | 45 +- .../controller-runtime/pkg/manager/manager.go | 64 +- .../pkg/manager/runnable_group.go | 60 +- .../controller-runtime/pkg/manager/server.go | 2 +- .../pkg/manager/signals/signal_posix.go | 1 - .../pkg/metrics/server/server.go | 4 +- .../pkg/metrics/workqueue.go | 101 - .../pkg/predicate/predicate.go | 31 +- .../pkg/reconcile/reconcile.go | 19 +- .../pkg/recorder/recorder.go | 7 +- .../controller-runtime/pkg/scheme/scheme.go | 29 + .../controller-runtime/pkg/source/source.go | 11 +- .../pkg/webhook/admission/decode.go | 2 +- .../pkg/webhook/admission/defaulter.go | 84 - .../pkg/webhook/admission/defaulter_custom.go | 136 +- .../pkg/webhook/admission/multi.go | 6 + .../pkg/webhook/admission/validator.go | 127 - .../pkg/webhook/admission/validator_custom.go | 63 +- .../controller-runtime/pkg/webhook/alias.go | 16 +- .../pkg/webhook/conversion/conversion.go | 38 +- .../webhook/conversion/conversion_hubspoke.go | 173 + .../webhook/conversion/conversion_registry.go | 57 + .../webhook/conversion/metrics/metrics.go} | 28 +- .../pkg/webhook/internal/metrics/metrics.go | 9 +- .../controller-runtime/pkg/webhook/server.go | 6 +- .../kustomize/api/filters/nameref/nameref.go | 6 +- .../api/filters/replacement/replacement.go | 185 +- .../builtins/AnnotationsTransformer.go | 2 - .../internal/builtins/ConfigMapGenerator.go | 2 - .../api/internal/builtins/HashTransformer.go | 2 - .../builtins/HelmChartInflationGenerator.go | 29 +- .../internal/builtins/IAMPolicyGenerator.go | 2 - .../internal/builtins/ImageTagTransformer.go | 2 - .../api/internal/builtins/LabelTransformer.go | 2 - .../internal/builtins/NamespaceTransformer.go | 7 +- .../builtins/PatchJson6902Transformer.go | 2 - .../PatchStrategicMergeTransformer.go | 2 - .../api/internal/builtins/PatchTransformer.go | 23 +- .../internal/builtins/PrefixTransformer.go | 2 - .../builtins/ReplacementTransformer.go | 2 - .../builtins/ReplicaCountTransformer.go | 2 - .../api/internal/builtins/SecretGenerator.go | 2 - .../internal/builtins/SortOrderTransformer.go | 2 - .../internal/builtins/SuffixTransformer.go | 2 - .../internal/builtins/ValueAddTransformer.go | 2 - .../api/internal/loader/fileloader.go | 8 +- .../kustomize/api/internal/loader/loader.go | 2 +- .../internal/plugins/execplugin/execplugin.go | 10 +- .../api/internal/plugins/loader/loader.go | 2 +- .../api/internal/target/kusttarget.go | 25 +- .../target/kusttarget_configplugin.go | 18 +- .../kustomize/api/konfig/general.go | 3 + .../kustomize/api/resmap/reswrangler.go | 2 +- .../kustomize/api/resource/resource.go | 3 + .../sigs.k8s.io/kustomize/api/types/patch.go | 8 +- .../kustomize/api/types/patchargs.go | 13 + .../kustomize/api/types/replacement.go | 47 + .../kustomize/kyaml/filesys/filesystem.go | 4 +- .../kustomize/kyaml/fn/runtime/exec/exec.go | 2 +- .../kustomize/kyaml/kio/kioutil/kioutil.go | 2 +- .../kustomize/kyaml/kio/pkgio_reader.go | 4 +- .../kustomize/kyaml/runfn/runfn.go | 2 +- .../sigs.k8s.io/kustomize/kyaml/yaml/fns.go | 4 + .../sigs.k8s.io/kustomize/kyaml/yaml/match.go | 44 +- .../sigs.k8s.io/kustomize/kyaml/yaml/rnode.go | 31 +- .../v6/fieldpath/element.go | 28 +- .../v6/fieldpath/pathelementmap.go | 25 +- .../structured-merge-diff/v6/fieldpath/set.go | 24 +- .../v6/value/allocator.go | 80 +- .../v6/value/jsontagutil.go | 7 +- 2857 files changed, 169522 insertions(+), 118461 deletions(-) create mode 100644 vendor/cloud.google.com/go/kms/apiv1/.repo-metadata.json create mode 100644 vendor/cloud.google.com/go/kms/apiv1/hsm_management_client.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management.pb.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/kms/apiv1/kmspb/service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json create mode 100644 vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service_grpc.pb.go create mode 100644 vendor/cloud.google.com/go/storage/.repo-metadata.json create mode 100644 vendor/cloud.google.com/go/storage/contexts.go create mode 100644 vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json create mode 100644 vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_nonwindows.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_windows.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance-networks.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpmem.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_capacity_management_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_operationsvp_mem_volumes_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_responses.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_parameters.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/p_cloudvp_mem_volumes_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_responses.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_parameters.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_shared_images.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_request.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_response.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_create.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_update.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interface.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interfaces.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter_create.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_attach.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_create.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_reference.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volumes.go delete mode 100644 vendor/github.com/asaskevich/govalidator/.gitignore delete mode 100644 vendor/github.com/asaskevich/govalidator/.travis.yml delete mode 100644 vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md delete mode 100644 vendor/github.com/asaskevich/govalidator/LICENSE delete mode 100644 vendor/github.com/asaskevich/govalidator/README.md delete mode 100644 vendor/github.com/asaskevich/govalidator/arrays.go delete mode 100644 vendor/github.com/asaskevich/govalidator/converter.go delete mode 100644 vendor/github.com/asaskevich/govalidator/doc.go delete mode 100644 vendor/github.com/asaskevich/govalidator/error.go delete mode 100644 vendor/github.com/asaskevich/govalidator/numerics.go delete mode 100644 vendor/github.com/asaskevich/govalidator/patterns.go delete mode 100644 vendor/github.com/asaskevich/govalidator/types.go delete mode 100644 vendor/github.com/asaskevich/govalidator/utils.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/.gitignore delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/.travis.yml delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/LICENSE delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/README.md delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/arrays.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/converter.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/doc.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/error.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/numerics.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/patterns.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/types.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/utils.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/validator.go delete mode 100644 vendor/github.com/asaskevich/govalidator/v11/wercker.yml delete mode 100644 vendor/github.com/asaskevich/govalidator/validator.go delete mode 100644 vendor/github.com/asaskevich/govalidator/wercker.yml create mode 100644 vendor/github.com/fsnotify/fsnotify/.cirrus.yml create mode 100644 vendor/github.com/fsnotify/fsnotify/.gitignore create mode 100644 vendor/github.com/fsnotify/fsnotify/.mailmap create mode 100644 vendor/github.com/fsnotify/fsnotify/CHANGELOG.md create mode 100644 vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md create mode 100644 vendor/github.com/fsnotify/fsnotify/LICENSE create mode 100644 vendor/github.com/fsnotify/fsnotify/README.md create mode 100644 vendor/github.com/fsnotify/fsnotify/backend_fen.go create mode 100644 vendor/github.com/fsnotify/fsnotify/backend_inotify.go create mode 100644 vendor/github.com/fsnotify/fsnotify/backend_kqueue.go create mode 100644 vendor/github.com/fsnotify/fsnotify/backend_other.go create mode 100644 vendor/github.com/fsnotify/fsnotify/backend_windows.go create mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/darwin.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/freebsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/internal.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/unix.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/unix2.go create mode 100644 vendor/github.com/fsnotify/fsnotify/internal/windows.go create mode 100644 vendor/github.com/fsnotify/fsnotify/shared.go create mode 100644 vendor/github.com/fsnotify/fsnotify/staticcheck.conf create mode 100644 vendor/github.com/fsnotify/fsnotify/system_bsd.go create mode 100644 vendor/github.com/fsnotify/fsnotify/system_darwin.go create mode 100644 vendor/github.com/gabriel-vasile/mimetype/.git-blame-ignore-revs delete mode 100644 vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md create mode 100644 vendor/github.com/gabriel-vasile/mimetype/internal/csv/parser.go create mode 100644 vendor/github.com/gabriel-vasile/mimetype/internal/magic/netpbm.go create mode 100644 vendor/github.com/gabriel-vasile/mimetype/internal/markup/markup.go create mode 100644 vendor/github.com/gabriel-vasile/mimetype/internal/scan/bytes.go create mode 100644 vendor/github.com/go-openapi/jsonpointer/.cliff.toml create mode 100644 vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md create mode 100644 vendor/github.com/go-openapi/jsonpointer/NOTICE create mode 100644 vendor/github.com/go-openapi/jsonpointer/SECURITY.md create mode 100644 vendor/github.com/go-openapi/strfmt/errors.go create mode 100644 vendor/github.com/go-openapi/strfmt/ifaces.go create mode 100644 vendor/github.com/go-openapi/strfmt/mongo.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/.editorconfig create mode 100644 vendor/github.com/go-viper/mapstructure/v2/.envrc create mode 100644 vendor/github.com/go-viper/mapstructure/v2/.gitignore create mode 100644 vendor/github.com/go-viper/mapstructure/v2/.golangci.yaml rename vendor/github.com/{mitchellh/mapstructure => go-viper/mapstructure/v2}/CHANGELOG.md (92%) rename vendor/github.com/{mitchellh/mapstructure => go-viper/mapstructure/v2}/LICENSE (100%) create mode 100644 vendor/github.com/go-viper/mapstructure/v2/README.md create mode 100644 vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/errors.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/flake.lock create mode 100644 vendor/github.com/go-viper/mapstructure/v2/flake.nix create mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/errors.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/join.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/join_go1_19.go rename vendor/github.com/{mitchellh/mapstructure => go-viper/mapstructure/v2}/mapstructure.go (74%) create mode 100644 vendor/github.com/go-viper/mapstructure/v2/reflect_go1_19.go create mode 100644 vendor/github.com/go-viper/mapstructure/v2/reflect_go1_20.go create mode 100644 vendor/github.com/googleapis/gax-go/v2/feature.go delete mode 100644 vendor/github.com/gregjones/httpcache/.travis.yml delete mode 100644 vendor/github.com/gregjones/httpcache/README.md delete mode 100644 vendor/github.com/itchyny/gojq/.dockerignore delete mode 100644 vendor/github.com/itchyny/gojq/.gitattributes delete mode 100644 vendor/github.com/itchyny/gojq/.gitignore delete mode 100644 vendor/github.com/itchyny/gojq/CHANGELOG.md delete mode 100644 vendor/github.com/itchyny/gojq/Dockerfile delete mode 100644 vendor/github.com/itchyny/gojq/LICENSE delete mode 100644 vendor/github.com/itchyny/gojq/Makefile delete mode 100644 vendor/github.com/itchyny/gojq/README.md delete mode 100644 vendor/github.com/itchyny/gojq/_gojq delete mode 100644 vendor/github.com/itchyny/gojq/builtin.go delete mode 100644 vendor/github.com/itchyny/gojq/builtin.jq delete mode 100644 vendor/github.com/itchyny/gojq/code.go delete mode 100644 vendor/github.com/itchyny/gojq/compare.go delete mode 100644 vendor/github.com/itchyny/gojq/compiler.go delete mode 100644 vendor/github.com/itchyny/gojq/debug.go delete mode 100644 vendor/github.com/itchyny/gojq/encoder.go delete mode 100644 vendor/github.com/itchyny/gojq/env.go delete mode 100644 vendor/github.com/itchyny/gojq/error.go delete mode 100644 vendor/github.com/itchyny/gojq/execute.go delete mode 100644 vendor/github.com/itchyny/gojq/func.go delete mode 100644 vendor/github.com/itchyny/gojq/go.dev.mod delete mode 100644 vendor/github.com/itchyny/gojq/go.dev.sum delete mode 100644 vendor/github.com/itchyny/gojq/gojq.go delete mode 100644 vendor/github.com/itchyny/gojq/iter.go delete mode 100644 vendor/github.com/itchyny/gojq/lexer.go delete mode 100644 vendor/github.com/itchyny/gojq/module_loader.go delete mode 100644 vendor/github.com/itchyny/gojq/normalize.go delete mode 100644 vendor/github.com/itchyny/gojq/operator.go delete mode 100644 vendor/github.com/itchyny/gojq/option.go delete mode 100644 vendor/github.com/itchyny/gojq/parser.go delete mode 100644 vendor/github.com/itchyny/gojq/parser.go.y delete mode 100644 vendor/github.com/itchyny/gojq/preview.go delete mode 100644 vendor/github.com/itchyny/gojq/query.go delete mode 100644 vendor/github.com/itchyny/gojq/release.go delete mode 100644 vendor/github.com/itchyny/gojq/scope_stack.go delete mode 100644 vendor/github.com/itchyny/gojq/stack.go delete mode 100644 vendor/github.com/itchyny/gojq/term_type.go delete mode 100644 vendor/github.com/itchyny/gojq/type.go delete mode 100644 vendor/github.com/itchyny/timefmt-go/CHANGELOG.md delete mode 100644 vendor/github.com/itchyny/timefmt-go/LICENSE delete mode 100644 vendor/github.com/itchyny/timefmt-go/Makefile delete mode 100644 vendor/github.com/itchyny/timefmt-go/README.md delete mode 100644 vendor/github.com/itchyny/timefmt-go/format.go delete mode 100644 vendor/github.com/itchyny/timefmt-go/parse.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/domain_types.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/group_types.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/keypair_types.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/role_types.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/service_types.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.domain-resource.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.group-resource.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.keypair-resource.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.role-resource.go create mode 100644 vendor/github.com/k-orc/openstack-resource-controller/v2/api/v1alpha1/zz_generated.service-resource.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/README.md delete mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/error.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixmachinetemplate_webhook.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixmetro_types.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixmetrosite_types.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/api/v1beta1/nutanixvirtualhadomain_types.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/pkg/feature/feature.go create mode 100644 vendor/github.com/nutanix-cloud-native/cluster-api-provider-nutanix/pkg/feature/gates.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/environment/types/cache.go delete mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/utils/flatmap.go delete mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/utils/pointers.go delete mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/utils/utils.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/cluster.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/address.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/api_version.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/availability_zone_information.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/availability_zone_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/build_info.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ca_cert.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/category_filter.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/certification_signing_info.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/citrix_connector_config_details.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/citrix_connector_config_details_spec.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/citrix_resource_location.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/citrix_resource_location_spec.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/client_auth.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_analysis.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_config_spec.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_def_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_domain_server.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_management_server.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_network.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_network_entity.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_nodes.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_operation_mode.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_service_list.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/cluster_software.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/credentials.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/dhcp_options.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/encryption_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/external_configurations.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/external_configurations_spec.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/http_proxy_whitelist.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/hypervisor_server.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/idempotence_identifiers_input.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/idempotence_identifiers_metadata.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/idempotence_identifiers_response.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/idempotence_identifiers_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ip_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ip_pool.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ip_usage_stats.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/message_resource.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/network_function_chain_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/pool_stats.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/project_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/public_key.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recover_entities.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_data_service_ip_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_def_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_floating_ip_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_intent_input.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_intent_resource.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_intent_response.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_l2_stretch_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_list_intent_response.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_list_metadata_output.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_metadata.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_network.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_resources.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_script_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_stage.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_subnet_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_subnet_range_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_vm_ip_assignment.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/recovery_plan_volume_group_recovery_info.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/smtp_server.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/software_type.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/sort_order.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ssl_key.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/ssl_key_type.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/subnet.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/subnet_def_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/subnet_resources.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/subnet_resources_def_status.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/user_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/virtual_network_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/vm_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/volume_group_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/vpc_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/vswitch_config.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/vtep_gateway_reference.go create mode 100644 vendor/github.com/nutanix-cloud-native/prism-go-client/v3/models/witness_configuration.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_slice_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_an_array_matcher.go create mode 100644 vendor/github.com/openshift/api/config/v1/types_crio_credential_provider_config.go create mode 100644 vendor/github.com/openshift/api/machineconfiguration/v1/types_internalreleaseimage.go delete mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/agent_webhook.go delete mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/agentclassification_webhook.go delete mode 100644 vendor/github.com/openshift/assisted-service/api/v1beta1/infraenv_webhook.go create mode 100644 vendor/github.com/openshift/assisted-service/models/bundle_create_params.go create mode 100644 vendor/github.com/openshift/assisted-service/models/versioned_cluster_host_requirements_details.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/alibabacloud/doc.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/alibabacloud/machinepool.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/alibabacloud/platform.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/alibabacloud/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/nutanix/doc.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/nutanix/machinepools.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/nutanix/platform.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/nutanix/zz_generated.deepcopy.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/doc.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/machinepool.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/platform.go delete mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/ovirt/zz_generated.deepcopy.go create mode 100644 vendor/github.com/openshift/hive/apis/hive/v1/zz_generated.defaults.go create mode 100644 vendor/go.opentelemetry.io/otel/internal/errorhandler/errorhandler.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/metric.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv/metric.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.39.0/rpcconv/metric.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.40.0/MIGRATION.md create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.40.0/README.md rename vendor/go.opentelemetry.io/otel/semconv/{v1.34.0 => v1.40.0}/attribute_group.go (78%) rename vendor/go.opentelemetry.io/otel/semconv/{v1.34.0 => v1.40.0}/doc.go (80%) create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.40.0/error_type.go rename vendor/go.opentelemetry.io/otel/semconv/{v1.34.0 => v1.40.0}/exception.go (74%) rename vendor/go.opentelemetry.io/otel/semconv/{v1.39.0 => v1.40.0}/otelconv/metric.go (100%) rename vendor/go.opentelemetry.io/otel/semconv/{v1.24.0 => v1.40.0}/schema.go (71%) create mode 100644 vendor/golang.org/x/crypto/ssh/control.go delete mode 100644 vendor/golang.org/x/exp/maps/maps.go create mode 100644 vendor/google.golang.org/api/internal/credentialstype/credentialstype.go create mode 100644 vendor/google.golang.org/grpc/internal/mem/buffer_pool.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/cdsbalancer/cluster_watcher.go rename vendor/google.golang.org/grpc/internal/xds/balancer/{clusterresolver => cdsbalancer}/configbuilder.go (73%) rename vendor/google.golang.org/grpc/internal/xds/balancer/{clusterresolver => cdsbalancer}/configbuilder_childname.go (62%) delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/clusterresolver.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/config.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/logging.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_dns.go delete mode 100644 vendor/google.golang.org/grpc/internal/xds/balancer/clusterresolver/resource_resolver_eds.go create mode 100644 vendor/google.golang.org/grpc/internal/xds/server/filter_chain_manager.go create mode 100644 vendor/google.golang.org/grpc/internal/xds/server/routing.go delete mode 100644 vendor/k8s.io/api/admission/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/admissionregistration/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/admissionregistration/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/admissionregistration/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apidiscovery/v2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apidiscovery/v2beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apps/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apps/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/apps/v1beta2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/authentication/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/authentication/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/authentication/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/authorization/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/authorization/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/doc.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/generated.proto delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/register.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/types.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.model_name.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/doc.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/generated.proto delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/register.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/types.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.model_name.go delete mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go delete mode 100644 vendor/k8s.io/api/batch/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/batch/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/certificates/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/certificates/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/certificates/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/coordination/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/coordination/v1alpha2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/coordination/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/core/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/discovery/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/discovery/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/events/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/events/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/extensions/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/flowcontrol/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/flowcontrol/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/flowcontrol/v1beta2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/flowcontrol/v1beta3/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/imagepolicy/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/networking/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/networking/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/node/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/node/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/node/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/policy/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/policy/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/rbac/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/rbac/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/rbac/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/resource/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/resource/v1alpha3/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/resource/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/resource/v1beta2/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/scheduling/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/types.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/api/scheduling/v1alpha1/zz_generated.model_name.go rename vendor/k8s.io/api/scheduling/{v1alpha1 => v1alpha2}/doc.go (84%) create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/generated.pb.go create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/generated.proto rename vendor/k8s.io/api/scheduling/{v1alpha1 => v1alpha2}/register.go (90%) create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/types.go create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/scheduling/v1alpha2/zz_generated.model_name.go delete mode 100644 vendor/k8s.io/api/storage/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/storage/v1alpha1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/storage/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/api/storagemigration/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.protomessage.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/validate/content/path.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/validate/discriminator.go rename vendor/k8s.io/{api/admission/v1/generated.protomessage.pb.go => apimachinery/pkg/apis/meta/internalversion/conversion.go} (51%) create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fieldsv1.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fieldsv1_byte.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fieldsv1_string.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.protomessage.pb.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.protomessage.pb.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/applyconfiguration.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/jsonpatch.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingadmissionpolicybindingspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingadmissionpolicyspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutation.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/containerresourcemetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/crossversionobjectreference.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/externalmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalercondition.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerspec.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscalerstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricspec.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/objectmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/podsmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/resourcemetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/containerresourcemetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/crossversionobjectreference.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/externalmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerbehavior.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalercondition.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerspec.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscalerstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingpolicy.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/hpascalingrules.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricidentifier.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricspec.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metrictarget.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/metricvaluestatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/objectmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/podsmetricstatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricsource.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/resourcemetricstatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/imagevolumestatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeallocatableresourceclaimstatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/podschedulinggroup.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/volumestatus.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/core/v1/workloadreference.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1/nodeallocatableresourcemapping.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha3/poolstatus.go rename vendor/k8s.io/client-go/applyconfigurations/{scheduling/v1alpha1/priorityclass.go => resource/v1alpha3/resourcepoolstatusrequest.go} (57%) create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepoolstatusrequestspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepoolstatusrequeststatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1beta1/nodeallocatableresourcemapping.go rename vendor/k8s.io/client-go/applyconfigurations/{autoscaling/v2beta1/horizontalpodautoscaler.go => resource/v1beta2/devicetaintrule.go} (60%) create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1beta2/devicetaintrulespec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1beta2/devicetaintrulestatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1beta2/devicetaintselector.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/resource/v1beta2/nodeallocatableresourcemapping.go delete mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/podgroup.go rename vendor/k8s.io/client-go/applyconfigurations/scheduling/{v1alpha1 => v1alpha2}/gangschedulingpolicy.go (99%) rename vendor/k8s.io/client-go/applyconfigurations/{autoscaling/v2beta2/horizontalpodautoscaler.go => scheduling/v1alpha2/podgroup.go} (61%) create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgroupresourceclaim.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgroupresourceclaimstatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgroupschedulingconstraints.go rename vendor/k8s.io/client-go/applyconfigurations/scheduling/{v1alpha1/podgrouppolicy.go => v1alpha2/podgroupschedulingpolicy.go} (60%) create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgroupspec.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgroupstatus.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgrouptemplate.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/podgrouptemplatereference.go create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/topologyconstraint.go rename vendor/k8s.io/client-go/applyconfigurations/scheduling/{v1alpha1 => v1alpha2}/typedlocalobjectreference.go (99%) rename vendor/k8s.io/client-go/applyconfigurations/scheduling/{v1alpha1 => v1alpha2}/workload.go (95%) create mode 100644 vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha2/workloadpodgrouptemplatereference.go rename vendor/k8s.io/client-go/applyconfigurations/scheduling/{v1alpha1 => v1alpha2}/workloadspec.go (75%) create mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/informers/admissionregistration/v1/mutatingadmissionpolicybinding.go delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta2/horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/informers/autoscaling/v2beta2/interface.go create mode 100644 vendor/k8s.io/client-go/informers/resource/v1alpha3/resourcepoolstatusrequest.go create mode 100644 vendor/k8s.io/client-go/informers/resource/v1beta2/devicetaintrule.go delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go delete mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1alpha1/workload.go rename vendor/k8s.io/client-go/informers/scheduling/{v1alpha1 => v1alpha2}/interface.go (82%) create mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1alpha2/podgroup.go create mode 100644 vendor/k8s.io/client-go/informers/scheduling/v1alpha2/workload.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/fake/fake_mutatingadmissionpolicybinding.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingadmissionpolicybinding.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/autoscaling_client.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_autoscaling_client.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake/fake_horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/generated_expansion.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourcepoolstatusrequest.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourcepoolstatusrequest.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1beta2/devicetaintrule.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/resource/v1beta2/fake/fake_devicetaintrule.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_workload.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go rename vendor/k8s.io/client-go/kubernetes/typed/{autoscaling/v2beta2 => scheduling/v1alpha2}/doc.go (97%) rename vendor/k8s.io/client-go/kubernetes/typed/{autoscaling/v2beta1 => scheduling/v1alpha2}/fake/doc.go (100%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha2/fake/fake_podgroup.go rename vendor/k8s.io/client-go/kubernetes/typed/scheduling/{v1alpha1 => v1alpha2}/fake/fake_scheduling_client.go (70%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha2/fake/fake_workload.go rename vendor/k8s.io/client-go/kubernetes/typed/scheduling/{v1alpha1 => v1alpha2}/generated_expansion.go (91%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha2/podgroup.go rename vendor/k8s.io/client-go/kubernetes/typed/scheduling/{v1alpha1 => v1alpha2}/scheduling_client.go (67%) rename vendor/k8s.io/client-go/kubernetes/typed/scheduling/{v1alpha1 => v1alpha2}/workload.go (60%) create mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingadmissionpolicy.go create mode 100644 vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingadmissionpolicybinding.go delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta2/expansion_generated.go delete mode 100644 vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go create mode 100644 vendor/k8s.io/client-go/listers/resource/v1alpha3/resourcepoolstatusrequest.go rename vendor/k8s.io/client-go/listers/{scheduling/v1alpha1/priorityclass.go => resource/v1beta2/devicetaintrule.go} (50%) rename vendor/k8s.io/client-go/listers/scheduling/{v1alpha1 => v1alpha2}/expansion_generated.go (75%) create mode 100644 vendor/k8s.io/client-go/listers/scheduling/v1alpha2/podgroup.go rename vendor/k8s.io/client-go/listers/scheduling/{v1alpha1 => v1alpha2}/workload.go (80%) create mode 100644 vendor/k8s.io/client-go/testing/doc.go rename vendor/{github.com/gregjones/httpcache/LICENSE.txt => k8s.io/client-go/third_party/forked/httpcache/LICENSE} (100%) rename vendor/{github.com/gregjones => k8s.io/client-go/third_party/forked}/httpcache/httpcache.go (98%) create mode 100644 vendor/k8s.io/client-go/tools/cache/event_handler_name.go create mode 100644 vendor/k8s.io/client-go/tools/cache/fifo_metrics.go create mode 100644 vendor/k8s.io/client-go/tools/cache/identity.go create mode 100644 vendor/k8s.io/client-go/tools/events/OWNERS rename vendor/k8s.io/client-go/{kubernetes/typed/autoscaling/v2beta2/fake => tools/events}/doc.go (76%) create mode 100644 vendor/k8s.io/client-go/tools/events/event_broadcaster.go create mode 100644 vendor/k8s.io/client-go/tools/events/event_recorder.go create mode 100644 vendor/k8s.io/client-go/tools/events/fake.go create mode 100644 vendor/k8s.io/client-go/tools/events/helper.go create mode 100644 vendor/k8s.io/client-go/tools/events/interfaces.go create mode 100644 vendor/k8s.io/client-go/transport/ca_rotation.go create mode 100644 vendor/k8s.io/component-base/metrics/api/v1/config.go create mode 100644 vendor/k8s.io/component-base/metrics/api/v1/doc.go create mode 100644 vendor/k8s.io/component-base/metrics/api/v1/types.go create mode 100644 vendor/k8s.io/component-base/metrics/api/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/component-base/metrics/internal/nativehistograms.go create mode 100644 vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go create mode 100644 vendor/k8s.io/klog/v2/textlogger/options.go create mode 100644 vendor/k8s.io/klog/v2/textlogger/textlogger.go create mode 100644 vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go rename vendor/k8s.io/{apimachinery/pkg/util => utils}/dump/dump.go (100%) create mode 100644 vendor/k8s.io/utils/third_party/forked/golang/LICENSE create mode 100644 vendor/k8s.io/utils/third_party/forked/golang/PATENTS create mode 100644 vendor/k8s.io/utils/third_party/forked/golang/btree/LICENSE create mode 100644 vendor/k8s.io/utils/third_party/forked/golang/btree/README.md create mode 100644 vendor/k8s.io/utils/third_party/forked/golang/btree/btree.go rename vendor/{k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go => sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_defaults.go} (69%) delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awscluster_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustercontrolleridentity_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterroleidentity_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclusterstaticidentity_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsclustertemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachine_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/awsmachinetemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcluster_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedcontrolplane_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureasomanagedmachinepool_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_default.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_validation.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azurecluster_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_validation.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclusteridentity_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_default.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_validation.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureclustertemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azureimage_validation.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_default.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_validation.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachine_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremachinetemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcluster_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedclustertemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_default.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplane_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedcontrolplanetemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepool_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-azure/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go rename vendor/sigs.k8s.io/{cluster-api-provider-aws/v2/api/v1beta2/webhooks.go => cluster-api-provider-gcp/api/v1beta1/conditions_consts.go} (54%) delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpcluster_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpclustertemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachine_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api-provider-gcp/api/v1beta1/gcpmachinetemplate_webhook.go delete mode 100644 vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/zz_generated.openapi.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/client/applyconfigurations.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/metrics.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/controller/priorityqueue/priorityqueue.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/envtest/binaries.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/internal/metrics/workqueue.go rename vendor/{k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.protomessage.pb.go => sigs.k8s.io/controller-runtime/pkg/internal/testing/process/signal_other.go} (65%) rename vendor/{k8s.io/api/scheduling/v1beta1/generated.protomessage.pb.go => sigs.k8s.io/controller-runtime/pkg/internal/testing/process/signal_unix.go} (64%) delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/defaulter.go delete mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_hubspoke.go create mode 100644 vendor/sigs.k8s.io/controller-runtime/pkg/webhook/conversion/conversion_registry.go rename vendor/{k8s.io/apimachinery/pkg/util/diff/cmp.go => sigs.k8s.io/controller-runtime/pkg/webhook/conversion/metrics/metrics.go} (51%) create mode 100644 vendor/sigs.k8s.io/kustomize/api/types/patchargs.go diff --git a/vendor/cloud.google.com/go/.release-please-manifest-individual.json b/vendor/cloud.google.com/go/.release-please-manifest-individual.json index c33488e447..158fe0caa8 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest-individual.json +++ b/vendor/cloud.google.com/go/.release-please-manifest-individual.json @@ -1,18 +1,17 @@ { - "auth": "0.16.4", + "auth": "0.16.5", "auth/oauth2adapt": "0.2.8", - "bigquery": "1.69.0", - "bigquery/v2": "0.0.0", - "bigtable": "1.38.0", + "bigquery": "1.70.0", + "bigtable": "1.39.0", "datastore": "1.20.0", "errorreporting": "0.3.2", "firestore": "1.18.0", "logging": "1.13.0", "profiler": "0.4.3", - "pubsub": "1.50.0", - "pubsub/v2": "2.0.0", + "pubsub": "1.50.1", + "pubsub/v2": "2.0.1", "pubsublite": "1.8.2", - "spanner": "1.84.1", - "storage": "1.56.0", + "spanner": "1.85.1", + "storage": "1.56.1", "vertexai": "0.15.0" } diff --git a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json index bc7be08b2c..a194f47513 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json +++ b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json @@ -2,14 +2,14 @@ "accessapproval": "1.8.7", "accesscontextmanager": "1.9.6", "advisorynotifications": "1.5.6", - "ai": "0.12.1", - "aiplatform": "1.98.0", + "ai": "0.13.0", + "aiplatform": "1.102.0", "alloydb": "1.18.0", - "analytics": "0.29.0", + "analytics": "0.30.0", "apigateway": "1.7.7", "apigeeconnect": "1.7.7", "apigeeregistry": "0.9.6", - "apihub": "0.1.5", + "apihub": "0.2.0", "apikeys": "1.2.7", "appengine": "1.9.7", "apphub": "0.3.1", @@ -25,109 +25,111 @@ "beyondcorp": "1.1.6", "billing": "1.20.4", "binaryauthorization": "1.9.5", + "capacityplanner": "0.1.0", "certificatemanager": "1.9.5", "channel": "1.20.0", - "chat": "0.15.0", + "chat": "0.15.1", "chronicle": "0.1.1", - "cloudbuild": "1.22.3", + "cloudbuild": "1.23.0", "cloudcontrolspartner": "1.4.0", - "clouddms": "1.8.7", + "clouddms": "1.8.8", "cloudprofiler": "0.4.5", "cloudquotas": "1.4.0", "cloudtasks": "1.13.6", - "commerce": "1.2.5", - "compute": "1.43.0", - "compute/metadata": "0.8.0", - "confidentialcomputing": "1.9.2", - "config": "1.4.0", - "configdelivery": "0.1.0", - "contactcenterinsights": "1.17.3", + "commerce": "1.2.6", + "compute": "1.47.0", + "compute/metadata": "0.8.4", + "confidentialcomputing": "1.10.1", + "config": "1.5.1", + "configdelivery": "0.1.1", + "contactcenterinsights": "1.17.4", "container": "1.44.0", "containeranalysis": "0.14.1", - "datacatalog": "1.26.0", + "datacatalog": "1.26.1", "dataflow": "0.11.0", - "dataform": "0.12.0", - "datafusion": "1.8.6", - "datalabeling": "0.9.6", - "dataplex": "1.26.0", - "dataproc": "2.14.0", + "dataform": "0.12.1", + "datafusion": "1.8.7", + "datalabeling": "0.9.7", + "dataplex": "1.27.1", + "dataproc": "2.14.1", "dataqna": "0.9.7", - "datastream": "1.15.0", - "deploy": "1.27.2", - "developerconnect": "0.4.0", - "devicestreaming": "0.1.0", - "dialogflow": "1.69.0", - "discoveryengine": "1.20.0", - "dlp": "1.24.0", - "documentai": "1.37.0", - "domains": "0.10.6", - "edgecontainer": "1.4.3", - "edgenetwork": "1.2.6", - "essentialcontacts": "1.7.6", - "eventarc": "1.15.5", - "filestore": "1.10.2", - "financialservices": "0.1.3", - "functions": "1.19.6", - "gkebackup": "1.8.0", - "gkeconnect": "0.12.4", - "gkehub": "0.15.6", - "gkemulticloud": "1.5.3", + "datastream": "1.15.1", + "deploy": "1.27.3", + "developerconnect": "0.4.1", + "devicestreaming": "0.1.1", + "dialogflow": "1.69.1", + "discoveryengine": "1.21.1", + "documentai": "1.38.1", + "domains": "0.10.7", + "edgecontainer": "1.4.4", + "edgenetwork": "1.2.7", + "essentialcontacts": "1.7.7", + "eventarc": "1.16.1", + "filestore": "1.10.3", + "financialservices": "0.1.4", + "functions": "1.19.7", + "geminidataanalytics": "0.2.1", + "gkebackup": "1.8.1", + "gkeconnect": "0.12.5", + "gkehub": "0.16.0", + "gkemulticloud": "1.5.4", "grafeas": "0.3.16", - "gsuiteaddons": "1.7.7", + "gsuiteaddons": "1.7.8", "iam": "1.5.2", - "iap": "1.11.2", - "identitytoolkit": "0.2.5", - "ids": "1.5.6", - "iot": "1.8.6", - "kms": "1.22.0", + "iap": "1.11.3", + "identitytoolkit": "0.2.6", + "ids": "1.5.7", + "iot": "1.8.7", + "kms": "1.23.0", "language": "1.14.5", - "licensemanager": "0.1.0", - "lifesciences": "0.10.6", + "licensemanager": "0.1.1", + "lifesciences": "0.10.7", + "locationfinder": "0.1.1", "longrunning": "0.6.7", - "lustre": "0.2.0", - "maintenance": "0.1.1", - "managedidentities": "1.7.6", - "managedkafka": "0.7.0", - "maps": "1.22.0", - "mediatranslation": "0.9.6", - "memcache": "1.11.6", - "memorystore": "0.3.0", - "metastore": "1.14.7", - "migrationcenter": "1.1.5", - "modelarmor": "0.6.0", + "lustre": "0.2.1", + "maintenance": "0.1.2", + "managedidentities": "1.7.7", + "managedkafka": "0.8.1", + "maps": "1.23.0", + "mediatranslation": "0.9.7", + "memcache": "1.11.7", + "memorystore": "0.3.1", + "metastore": "1.14.8", + "migrationcenter": "1.1.6", + "modelarmor": "0.6.1", "monitoring": "1.24.2", - "netapp": "1.9.0", - "networkconnectivity": "1.18.0", - "networkmanagement": "1.20.0", - "networksecurity": "0.10.6", - "networkservices": "0.5.0", - "notebooks": "1.12.6", - "optimization": "1.7.6", - "oracledatabase": "0.5.0", - "orchestration": "1.11.9", - "orgpolicy": "1.15.0", - "osconfig": "1.15.0", - "oslogin": "1.14.6", - "parallelstore": "0.11.3", - "parametermanager": "0.3.0", - "phishingprotection": "0.9.6", - "policysimulator": "0.4.0", - "policytroubleshooter": "1.11.6", - "privatecatalog": "0.10.7", - "privilegedaccessmanager": "0.3.0", + "netapp": "1.10.1", + "networkconnectivity": "1.19.1", + "networkmanagement": "1.20.1", + "networksecurity": "0.10.7", + "networkservices": "0.5.1", + "notebooks": "1.12.7", + "optimization": "1.7.7", + "oracledatabase": "0.5.1", + "orchestration": "1.11.10", + "orgpolicy": "1.15.1", + "osconfig": "1.15.1", + "oslogin": "1.14.7", + "parallelstore": "0.11.4", + "parametermanager": "0.3.1", + "phishingprotection": "0.9.7", + "policysimulator": "0.4.1", + "policytroubleshooter": "1.11.7", + "privatecatalog": "0.10.8", + "privilegedaccessmanager": "0.3.1", "rapidmigrationassessment": "1.1.7", "recaptchaenterprise": "2.20.4", "recommendationengine": "0.9.6", "recommender": "1.13.5", "redis": "1.18.2", "resourcemanager": "1.10.6", - "retail": "1.24.0", + "retail": "1.25.0", "run": "1.12.0", "scheduler": "1.11.7", "secretmanager": "1.15.0", "securesourcemanager": "1.4.0", - "security": "1.19.0", - "securitycenter": "1.37.0", + "security": "1.19.1", + "securitycenter": "1.38.0", "securitycentermanagement": "1.1.5", "securityposture": "0.2.5", "servicecontrol": "1.14.5", @@ -136,7 +138,7 @@ "servicemanagement": "1.10.6", "serviceusage": "1.9.6", "shell": "1.8.6", - "shopping": "0.25.0", + "shopping": "1.1.0", "spanner/benchmarks": "0.1.0", "speech": "1.28.0", "storagebatchoperations": "0.1.0", @@ -146,15 +148,15 @@ "support": "1.4.0", "talent": "1.8.3", "telcoautomation": "1.1.5", - "texttospeech": "1.13.0", + "texttospeech": "1.14.0", "tpu": "1.8.3", "trace": "1.11.6", "translate": "1.12.6", - "video": "1.25.0", + "video": "1.27.0", "videointelligence": "1.12.6", "vision": "2.9.5", "visionai": "0.4.5", - "vmmigration": "1.8.6", + "vmmigration": "1.9.0", "vmwareengine": "1.3.5", "vpcaccess": "1.8.6", "webrisk": "1.11.1", diff --git a/vendor/cloud.google.com/go/.release-please-manifest.json b/vendor/cloud.google.com/go/.release-please-manifest.json index cabed7484a..768a5b8e61 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest.json +++ b/vendor/cloud.google.com/go/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.121.6" + ".": "0.123.0" } diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md index e2dd1de9b4..a63b40267f 100644 --- a/vendor/cloud.google.com/go/CHANGES.md +++ b/vendor/cloud.google.com/go/CHANGES.md @@ -2,6 +2,40 @@ +## [0.123.0](https://github.com/googleapis/google-cloud-go/compare/v0.122.0...v0.123.0) (2025-09-18) + + +### Features + +* **internal/stategen:** Populate the latest googleapis commit ([#12880](https://github.com/googleapis/google-cloud-go/issues/12880)) ([7b017a0](https://github.com/googleapis/google-cloud-go/commit/7b017a083ddd322b21faf413a329ba870a98db96)) +* **librariangen:** Implement the build command ([#12817](https://github.com/googleapis/google-cloud-go/issues/12817)) ([14734c8](https://github.com/googleapis/google-cloud-go/commit/14734c875103f97748857b9b0472fd0b2658663f)) + + +### Bug Fixes + +* **internal/librariangen:** Add link to source commit in release notes ([#12881](https://github.com/googleapis/google-cloud-go/issues/12881)) ([1c06cc6](https://github.com/googleapis/google-cloud-go/commit/1c06cc6109a84941c367896575b187b79befc3af)) +* **internal/librariangen:** Fix CHANGES.md headers ([#12849](https://github.com/googleapis/google-cloud-go/issues/12849)) ([baf515d](https://github.com/googleapis/google-cloud-go/commit/baf515dfe0d94f36c9dc232f6b55e9828b268eb0)) +* **internal/librariangen:** Remove go mod init/tidy from postprocessor ([#12832](https://github.com/googleapis/google-cloud-go/issues/12832)) ([1fe506a](https://github.com/googleapis/google-cloud-go/commit/1fe506a37e68497b6da4587d409b79e7b4d2a113)) +* **internal/librariangen:** Test for error path with flags ([#12830](https://github.com/googleapis/google-cloud-go/issues/12830)) ([f0da7b2](https://github.com/googleapis/google-cloud-go/commit/f0da7b22488b4d9f6232d227d3e196d8d2b92858)) +* **internal/postprocessor:** Add dlp to skip-module-scan-paths ([#12857](https://github.com/googleapis/google-cloud-go/issues/12857)) ([45a7d9b](https://github.com/googleapis/google-cloud-go/commit/45a7d9b4b9083d1bcaca89c3d86878ba77c230e3)) +* **librariangen:** Honor original container contract ([#12846](https://github.com/googleapis/google-cloud-go/issues/12846)) ([71c8fd3](https://github.com/googleapis/google-cloud-go/commit/71c8fd368667f74426aa31b6c50def8151482480)) +* **librariangen:** Improvements to release-init ([#12842](https://github.com/googleapis/google-cloud-go/issues/12842)) ([0db677a](https://github.com/googleapis/google-cloud-go/commit/0db677a93fe16b9a62bb69a3cea7bc45d5aaec36)) +* **stategen:** Specify an appropriate tag format for google-cloud-go ([#12835](https://github.com/googleapis/google-cloud-go/issues/12835)) ([ffcff33](https://github.com/googleapis/google-cloud-go/commit/ffcff33a0c3fad720a31083672c4cf2498af719f)) + +## [0.122.0](https://github.com/googleapis/google-cloud-go/compare/v0.121.6...v0.122.0) (2025-09-04) + + +### Features + +* **internal/librariangen:** Add release-init command ([#12751](https://github.com/googleapis/google-cloud-go/issues/12751)) ([52e84cc](https://github.com/googleapis/google-cloud-go/commit/52e84cc9a11077eb3c50a0b5fc9aa26361d63b47)) + + +### Bug Fixes + +* **internal/godocfx:** Better support for v2 modules ([#12797](https://github.com/googleapis/google-cloud-go/issues/12797)) ([4bc8785](https://github.com/googleapis/google-cloud-go/commit/4bc878597a5e6bd97cf3ee2174f6df7fbdd2d47b)) +* **internal/godocfx:** Module detection when tidy errors ([#12801](https://github.com/googleapis/google-cloud-go/issues/12801)) ([83d46cd](https://github.com/googleapis/google-cloud-go/commit/83d46cdc5ed7cfbb94038e7fa1f787adfe532c74)) +* **internal/librariangen:** Fix goimports errors ([#12765](https://github.com/googleapis/google-cloud-go/issues/12765)) ([83bdaa4](https://github.com/googleapis/google-cloud-go/commit/83bdaa4ce4e42f8b4a29e2055fc4894d8c6b1e2c)) + ## [0.121.6](https://github.com/googleapis/google-cloud-go/compare/v0.121.5...v0.121.6) (2025-08-14) diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md index 98d47fa2c4..5fd6ff388c 100644 --- a/vendor/cloud.google.com/go/README.md +++ b/vendor/cloud.google.com/go/README.md @@ -24,8 +24,8 @@ Our libraries are compatible with the two most recent major Go releases, the same [policy](https://go.dev/doc/devel/release#policy) the Go programming language follows. This means the currently supported versions are: -- Go 1.23 - Go 1.24 +- Go 1.25 ## Authentication diff --git a/vendor/cloud.google.com/go/auth/CHANGES.md b/vendor/cloud.google.com/go/auth/CHANGES.md index 4deca44353..b48828c150 100644 --- a/vendor/cloud.google.com/go/auth/CHANGES.md +++ b/vendor/cloud.google.com/go/auth/CHANGES.md @@ -1,3 +1,20 @@ +# Changes + +## [0.18.1](https://github.com/googleapis/google-cloud-go/releases/tag/auth%2Fv0.18.1) (2026-01-21) + +### Bug Fixes + +* add InternalOptions.TelemetryAttributes for internal client use (#13641) ([3876978](https://github.com/googleapis/google-cloud-go/commit/38769789755ed47d85e85dcd56596109de65f780)) +* remove singleton and restore normal usage of otelgrpc.clientHandler (#13522) ([673d4b0](https://github.com/googleapis/google-cloud-go/commit/673d4b05617f833aa433f7f6a350b5cb888ea20d)) + +## [0.18.0](https://github.com/googleapis/google-cloud-go/releases/tag/auth%2Fv0.18.0) (2025-12-15) + +### Features + +* Support scopes field from impersonated credential json (#13308) ([e3f62e1](https://github.com/googleapis/google-cloud-go/commit/e3f62e102840127a0058f5cced4c9738f2bf45f2)) +* add support for parsing EC private key (#13317) ([ea6bc62](https://github.com/googleapis/google-cloud-go/commit/ea6bc62ffe2cc0a6d607d698a181b37fa46c340d)) +* deprecate unsafe credentials JSON loading options (#13397) ([0dd2a3b](https://github.com/googleapis/google-cloud-go/commit/0dd2a3bdece9a85ee7216a737559fa9f5a869545)) + ## [0.17.0](https://github.com/googleapis/google-cloud-go/releases/tag/auth%2Fv0.17.0) (2025-10-02) ### Features @@ -5,8 +22,6 @@ * Add trust boundary support for service accounts and impersonation (HTTP/gRPC) (#11870) ([5c2b665](https://github.com/googleapis/google-cloud-go/commit/5c2b665f392e6dd90192f107188720aa1357e7da)) * add trust boundary support for external accounts (#12864) ([a67a146](https://github.com/googleapis/google-cloud-go/commit/a67a146a6a88a6f1ba10c409dfce8015ecd60a64)) -# Changelog - ## [0.16.5](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.4...auth/v0.16.5) (2025-08-14) diff --git a/vendor/cloud.google.com/go/auth/credentials/detect.go b/vendor/cloud.google.com/go/auth/credentials/detect.go index 6700e33e14..c9d7600e03 100644 --- a/vendor/cloud.google.com/go/auth/credentials/detect.go +++ b/vendor/cloud.google.com/go/auth/credentials/detect.go @@ -52,6 +52,44 @@ var ( allowOnGCECheck = true ) +// CredType specifies the type of JSON credentials being provided +// to a loading function such as [NewCredentialsFromFile] or +// [NewCredentialsFromJSON]. +type CredType string + +const ( + // ServiceAccount represents a service account file type. + ServiceAccount CredType = "service_account" + // AuthorizedUser represents a user credentials file type. + AuthorizedUser CredType = "authorized_user" + // ExternalAccount represents an external account file type. + // + // IMPORTANT: + // This credential type does not validate the credential configuration. A security + // risk occurs when a credential configuration configured with malicious urls + // is used. + // You should validate credential configurations provided by untrusted sources. + // See [Security requirements when using credential configurations from an external + // source] https://cloud.google.com/docs/authentication/external/externally-sourced-credentials + // for more details. + ExternalAccount CredType = "external_account" + // ImpersonatedServiceAccount represents an impersonated service account file type. + // + // IMPORTANT: + // This credential type does not validate the credential configuration. A security + // risk occurs when a credential configuration configured with malicious urls + // is used. + // You should validate credential configurations provided by untrusted sources. + // See [Security requirements when using credential configurations from an external + // source] https://cloud.google.com/docs/authentication/external/externally-sourced-credentials + // for more details. + ImpersonatedServiceAccount CredType = "impersonated_service_account" + // GDCHServiceAccount represents a GDCH service account credentials. + GDCHServiceAccount CredType = "gdch_service_account" + // ExternalAccountAuthorizedUser represents an external account authorized user credentials. + ExternalAccountAuthorizedUser CredType = "external_account_authorized_user" +) + // TokenBindingType specifies the type of binding used when requesting a token // whether to request a hard-bound token using mTLS or an instance identity // bound token using ALTS. @@ -92,6 +130,14 @@ func OnGCE() bool { // - On Google Compute Engine, Google App Engine standard second generation // runtimes, and Google App Engine flexible environment, it fetches // credentials from the metadata server. +// +// Important: If you accept a credential configuration (credential +// JSON/File/Stream) from an external source for authentication to Google +// Cloud Platform, you must validate it before providing it to any Google +// API or library. Providing an unvalidated credential configuration to +// Google APIs can compromise the security of your systems and data. For +// more information, refer to [Validate credential configurations from +// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) { if err := opts.validate(); err != nil { return nil, err @@ -189,25 +235,61 @@ type DetectOptions struct { // from the provided filepath. If provided, CredentialsJSON must not be. // Optional. // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + // Deprecated: This field is deprecated because of a potential security risk. + // It does not validate the credential configuration. The security risk occurs + // when a credential configuration is accepted from a source that is not + // under your control and used without validation on your side. + // + // If you know that you will be loading credential configurations of a + // specific type, it is recommended to use a credential-type-specific + // NewCredentialsFromFile method. This will ensure that an unexpected + // credential type with potential for malicious intent is not loaded + // unintentionally. You might still have to do validation for certain + // credential types. Please follow the recommendation for that method. For + // example, if you want to load only service accounts, you can use + // + // creds, err := credentials.NewCredentialsFromFile(ctx, credentials.ServiceAccount, filename, opts) + // + // If you are loading your credential configuration from an untrusted source + // and have not mitigated the risks (e.g. by validating the configuration + // yourself), make these changes as soon as possible to prevent security + // risks to your environment. + // + // Regardless of the method used, it is always your responsibility to + // validate configurations received from external sources. + // + // For more details see: + // https://cloud.google.com/docs/authentication/external/externally-sourced-credentials CredentialsFile string // CredentialsJSON overrides detection logic and uses the JSON bytes as the // source for the credential. If provided, CredentialsFile must not be. // Optional. // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + // Deprecated: This field is deprecated because of a potential security risk. + // It does not validate the credential configuration. The security risk occurs + // when a credential configuration is accepted from a source that is not + // under your control and used without validation on your side. + // + // If you know that you will be loading credential configurations of a + // specific type, it is recommended to use a credential-type-specific + // NewCredentialsFromJSON method. This will ensure that an unexpected + // credential type with potential for malicious intent is not loaded + // unintentionally. You might still have to do validation for certain + // credential types. Please follow the recommendation for that method. For + // example, if you want to load only service accounts, you can use + // + // creds, err := credentials.NewCredentialsFromJSON(ctx, credentials.ServiceAccount, json, opts) + // + // If you are loading your credential configuration from an untrusted source + // and have not mitigated the risks (e.g. by validating the configuration + // yourself), make these changes as soon as possible to prevent security + // risks to your environment. + // + // Regardless of the method used, it is always your responsibility to + // validate configurations received from external sources. + // + // For more details see: + // https://cloud.google.com/docs/authentication/external/externally-sourced-credentials CredentialsJSON []byte // UseSelfSignedJWT directs service account based credentials to create a // self-signed JWT with the private key found in the file, skipping any @@ -227,6 +309,61 @@ type DetectOptions struct { Logger *slog.Logger } +// NewCredentialsFromFile creates a [cloud.google.com/go/auth.Credentials] from +// the provided file. The credType argument specifies the expected credential +// type. If the file content does not match the expected type, an error is +// returned. +// +// Important: If you accept a credential configuration (credential +// JSON/File/Stream) from an external source for authentication to Google +// Cloud Platform, you must validate it before providing it to any Google +// API or library. Providing an unvalidated credential configuration to +// Google APIs can compromise the security of your systems and data. For +// more information, refer to [Validate credential configurations from +// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). +func NewCredentialsFromFile(credType CredType, filename string, opts *DetectOptions) (*auth.Credentials, error) { + b, err := os.ReadFile(filename) + if err != nil { + return nil, err + } + return NewCredentialsFromJSON(credType, b, opts) +} + +// NewCredentialsFromJSON creates a [cloud.google.com/go/auth.Credentials] from +// the provided JSON bytes. The credType argument specifies the expected +// credential type. If the JSON does not match the expected type, an error is +// returned. +// +// Important: If you accept a credential configuration (credential +// JSON/File/Stream) from an external source for authentication to Google +// Cloud Platform, you must validate it before providing it to any Google +// API or library. Providing an unvalidated credential configuration to +// Google APIs can compromise the security of your systems and data. For +// more information, refer to [Validate credential configurations from +// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). +func NewCredentialsFromJSON(credType CredType, b []byte, opts *DetectOptions) (*auth.Credentials, error) { + if err := checkCredentialType(b, credType); err != nil { + return nil, err + } + // We can't use readCredentialsFileJSON because it does auto-detection + // for client_credentials.json which we don't support here (no type field). + // Instead, we call fileCredentials just as readCredentialsFileJSON does + // when it doesn't detect client_credentials.json. + return fileCredentials(b, opts) +} + +func checkCredentialType(b []byte, expected CredType) error { + + fileType, err := credsfile.ParseFileType(b) + if err != nil { + return err + } + if CredType(fileType) != expected { + return fmt.Errorf("credentials: expected type %q, found %q", expected, fileType) + } + return nil +} + func (o *DetectOptions) validate() error { if o == nil { return errors.New("credentials: options must be provided") diff --git a/vendor/cloud.google.com/go/auth/credentials/filetypes.go b/vendor/cloud.google.com/go/auth/credentials/filetypes.go index d2a0424702..f3737a5e8c 100644 --- a/vendor/cloud.google.com/go/auth/credentials/filetypes.go +++ b/vendor/cloud.google.com/go/auth/credentials/filetypes.go @@ -28,18 +28,21 @@ import ( "cloud.google.com/go/auth/internal/trustboundary" ) +const cloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { fileType, err := credsfile.ParseFileType(b) if err != nil { return nil, err } + if fileType == "" { + return nil, errors.New("credentials: unsupported unidentified file type") + } var projectID, universeDomain string var tp auth.TokenProvider - switch fileType { - case credsfile.UnknownCredType: - return nil, errors.New("credentials: unsupported unidentified file type") - case credsfile.ServiceAccountKey: + switch CredType(fileType) { + case ServiceAccount: f, err := credsfile.ParseServiceAccount(b) if err != nil { return nil, err @@ -50,7 +53,7 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { } projectID = f.ProjectID universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.UserCredentialsKey: + case AuthorizedUser: f, err := credsfile.ParseUserCredentials(b) if err != nil { return nil, err @@ -60,7 +63,7 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { return nil, err } universeDomain = f.UniverseDomain - case credsfile.ExternalAccountKey: + case ExternalAccount: f, err := credsfile.ParseExternalAccount(b) if err != nil { return nil, err @@ -70,7 +73,7 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { return nil, err } universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.ExternalAccountAuthorizedUserKey: + case ExternalAccountAuthorizedUser: f, err := credsfile.ParseExternalAccountAuthorizedUser(b) if err != nil { return nil, err @@ -80,7 +83,7 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { return nil, err } universeDomain = f.UniverseDomain - case credsfile.ImpersonatedServiceAccountKey: + case ImpersonatedServiceAccount: f, err := credsfile.ParseImpersonatedServiceAccount(b) if err != nil { return nil, err @@ -90,7 +93,7 @@ func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { return nil, err } universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.GDCHServiceAccountKey: + case GDCHServiceAccount: f, err := credsfile.ParseGDCHServiceAccount(b) if err != nil { return nil, err @@ -275,14 +278,24 @@ func handleImpersonatedServiceAccount(f *credsfile.ImpersonatedServiceAccountFil return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials") } - sourceTP, err := fileCredentials(f.CredSource, opts) + sourceOpts := *opts + + // Source credential needs IAM or Cloud Platform scope to call the + // iamcredentials endpoint. The scopes provided by the user are for the + // impersonated credentials. + sourceOpts.Scopes = []string{cloudPlatformScope} + sourceTP, err := fileCredentials(f.CredSource, &sourceOpts) if err != nil { return nil, err } ud := resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) + scopes := opts.scopes() + if len(scopes) == 0 { + scopes = f.Scopes + } impOpts := &impersonate.Options{ URL: f.ServiceAccountImpersonationURL, - Scopes: opts.scopes(), + Scopes: scopes, Tp: sourceTP, Delegates: f.Delegates, Client: opts.client(), diff --git a/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go b/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go index 6bcd3ef545..9b4b1f06e8 100644 --- a/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go +++ b/vendor/cloud.google.com/go/auth/grpctransport/grpctransport.go @@ -24,7 +24,6 @@ import ( "log/slog" "net/http" "os" - "sync" "cloud.google.com/go/auth" "cloud.google.com/go/auth/credentials" @@ -36,7 +35,6 @@ import ( "google.golang.org/grpc" grpccreds "google.golang.org/grpc/credentials" grpcinsecure "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/stats" ) const ( @@ -54,27 +52,6 @@ var ( timeoutDialerOption grpc.DialOption ) -// otelStatsHandler is a singleton otelgrpc.clientHandler to be used across -// all dial connections to avoid the memory leak documented in -// https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4226 -// -// TODO: When this module depends on a version of otelgrpc containing the fix, -// replace this singleton with inline usage for simplicity. -// The fix should be in https://github.com/open-telemetry/opentelemetry-go/pull/5797. -var ( - initOtelStatsHandlerOnce sync.Once - otelStatsHandler stats.Handler -) - -// otelGRPCStatsHandler returns singleton otelStatsHandler for reuse across all -// dial connections. -func otelGRPCStatsHandler() stats.Handler { - initOtelStatsHandlerOnce.Do(func() { - otelStatsHandler = otelgrpc.NewClientHandler() - }) - return otelStatsHandler -} - // ClientCertProvider is a function that returns a TLS client certificate to be // used when opening TLS connections. It follows the same semantics as // [crypto/tls.Config.GetClientCertificate]. @@ -223,6 +200,15 @@ type InternalOptions struct { // SkipValidation bypasses validation on Options. It should only be used // internally for clients that needs more control over their transport. SkipValidation bool + // TelemetryAttributes specifies a map of telemetry attributes to be added + // to all OpenTelemetry signals, such as tracing and metrics, for purposes + // including representing the static identity of the client (e.g., service + // name, version). These attributes are expected to be consistent across all + // signals to enable cross-signal correlation. + // + // It should only be used internally by generated clients. Callers should not + // modify the map after it is passed in. + TelemetryAttributes map[string]string } // Dial returns a GRPCClientConnPool that can be used to communicate with a @@ -444,5 +430,5 @@ func addOpenTelemetryStatsHandler(dialOpts []grpc.DialOption, opts *Options) []g if opts.DisableTelemetry { return dialOpts } - return append(dialOpts, grpc.WithStatsHandler(otelGRPCStatsHandler())) + return append(dialOpts, grpc.WithStatsHandler(otelgrpc.NewClientHandler())) } diff --git a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go b/vendor/cloud.google.com/go/auth/httptransport/httptransport.go index c9126535d7..bd693907f9 100644 --- a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go +++ b/vendor/cloud.google.com/go/auth/httptransport/httptransport.go @@ -168,6 +168,15 @@ type InternalOptions struct { // for the credentials. It should only be used internally for clients that // need more control over their transport. The default is false. SkipUniverseDomainValidation bool + // TelemetryAttributes specifies a map of telemetry attributes to be added + // to all OpenTelemetry signals, such as tracing and metrics, for purposes + // including representing the static identity of the client (e.g., service + // name, version). These attributes are expected to be consistent across all + // signals to enable cross-signal correlation. + // + // It should only be used internally by generated clients. Callers should not + // modify the map after it is passed in. + TelemetryAttributes map[string]string } // AddAuthorizationMiddleware adds a middleware to the provided client's diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go b/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go index 9cd4bed61b..84aab8472a 100644 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go +++ b/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go @@ -32,50 +32,6 @@ const ( userCredsFilename = "application_default_credentials.json" ) -// CredentialType represents different credential filetypes Google credentials -// can be. -type CredentialType int - -const ( - // UnknownCredType is an unidentified file type. - UnknownCredType CredentialType = iota - // UserCredentialsKey represents a user creds file type. - UserCredentialsKey - // ServiceAccountKey represents a service account file type. - ServiceAccountKey - // ImpersonatedServiceAccountKey represents a impersonated service account - // file type. - ImpersonatedServiceAccountKey - // ExternalAccountKey represents a external account file type. - ExternalAccountKey - // GDCHServiceAccountKey represents a GDCH file type. - GDCHServiceAccountKey - // ExternalAccountAuthorizedUserKey represents a external account authorized - // user file type. - ExternalAccountAuthorizedUserKey -) - -// parseCredentialType returns the associated filetype based on the parsed -// typeString provided. -func parseCredentialType(typeString string) CredentialType { - switch typeString { - case "service_account": - return ServiceAccountKey - case "authorized_user": - return UserCredentialsKey - case "impersonated_service_account": - return ImpersonatedServiceAccountKey - case "external_account": - return ExternalAccountKey - case "external_account_authorized_user": - return ExternalAccountAuthorizedUserKey - case "gdch_service_account": - return GDCHServiceAccountKey - default: - return UnknownCredType - } -} - // GetFileNameFromEnv returns the override if provided or detects a filename // from the environment. func GetFileNameFromEnv(override string) string { diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go b/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go index 606347304c..cbba2eb977 100644 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go +++ b/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go @@ -140,6 +140,7 @@ type ImpersonatedServiceAccountFile struct { Type string `json:"type"` ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` Delegates []string `json:"delegates"` + Scopes []string `json:"scopes"` CredSource json.RawMessage `json:"source_credentials"` UniverseDomain string `json:"universe_domain"` } diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go b/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go index a02b9f5df7..f2cedb731c 100644 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go +++ b/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go @@ -89,10 +89,11 @@ type fileTypeChecker struct { } // ParseFileType determines the [CredentialType] based on bytes provided. -func ParseFileType(b []byte) (CredentialType, error) { +// Only returns error for json.Unmarshal. +func ParseFileType(b []byte) (string, error) { var f fileTypeChecker if err := json.Unmarshal(b, &f); err != nil { - return 0, err + return "", err } - return parseCredentialType(f.Type), nil + return f.Type, nil } diff --git a/vendor/cloud.google.com/go/auth/internal/internal.go b/vendor/cloud.google.com/go/auth/internal/internal.go index 72a8a6b7a5..48e9bd9ece 100644 --- a/vendor/cloud.google.com/go/auth/internal/internal.go +++ b/vendor/cloud.google.com/go/auth/internal/internal.go @@ -88,12 +88,13 @@ func ParseKey(key []byte) (crypto.Signer, error) { key = block.Bytes } var parsedKey crypto.PrivateKey - var err error - parsedKey, err = x509.ParsePKCS8PrivateKey(key) - if err != nil { - parsedKey, err = x509.ParsePKCS1PrivateKey(key) - if err != nil { - return nil, fmt.Errorf("private key should be a PEM or plain PKCS1 or PKCS8: %w", err) + + var errPKCS8, errPKCS1, errEC error + if parsedKey, errPKCS8 = x509.ParsePKCS8PrivateKey(key); errPKCS8 != nil { + if parsedKey, errPKCS1 = x509.ParsePKCS1PrivateKey(key); errPKCS1 != nil { + if parsedKey, errEC = x509.ParseECPrivateKey(key); errEC != nil { + return nil, fmt.Errorf("failed to parse private key. Tried PKCS8, PKCS1, and EC formats. Errors: [PKCS8: %v], [PKCS1: %v], [EC: %v]", errPKCS8, errPKCS1, errEC) + } } } parsed, ok := parsedKey.(crypto.Signer) diff --git a/vendor/cloud.google.com/go/auth/internal/version.go b/vendor/cloud.google.com/go/auth/internal/version.go index e2f56cf4d8..ec7f21a8a5 100644 --- a/vendor/cloud.google.com/go/auth/internal/version.go +++ b/vendor/cloud.google.com/go/auth/internal/version.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.17.0" +const Version = "0.18.1" diff --git a/vendor/cloud.google.com/go/go.work b/vendor/cloud.google.com/go/go.work index 474027f394..fc77cf320f 100644 --- a/vendor/cloud.google.com/go/go.work +++ b/vendor/cloud.google.com/go/go.work @@ -1,4 +1,4 @@ -go 1.23.0 +go 1.24.0 use ( . @@ -33,6 +33,7 @@ use ( ./bigtable ./billing ./binaryauthorization + ./capacityplanner ./certificatemanager ./channel ./chat @@ -79,6 +80,7 @@ use ( ./financialservices ./firestore ./functions + ./geminidataanalytics ./gkebackup ./gkeconnect ./gkehub @@ -101,11 +103,13 @@ use ( ./internal/librariangen ./internal/postprocessor ./internal/protoveneer + ./internal/stategen ./iot ./kms ./language ./licensemanager ./lifesciences + ./locationfinder ./logging ./longrunning ./lustre diff --git a/vendor/cloud.google.com/go/go.work.sum b/vendor/cloud.google.com/go/go.work.sum index 0db4a0f9af..0fff97d259 100644 --- a/vendor/cloud.google.com/go/go.work.sum +++ b/vendor/cloud.google.com/go/go.work.sum @@ -4,14 +4,19 @@ cloud.google.com/go/dataproc v1.12.0 h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3Y cloud.google.com/go/gaming v1.9.0 h1:7vEhFnZmd931Mo7sZ6pJy7uQPDxF7m7v8xtBheG08tc= cloud.google.com/go/gaming v1.10.1 h1:5qZmZEWzMf8GEFgm9NeC3bjFRpt7x4S6U7oLbxaf7N8= cloud.google.com/go/resourcesettings v1.8.3 h1:13HOFU7v4cEvIHXSAQbinF4wp2Baybbq7q9FMctg1Ek= +codeberg.org/go-fonts/liberation v0.5.0/go.mod h1:zS/2e1354/mJ4pGzIIaEtm/59VFCFnYC7YV6YdGl5GU= +codeberg.org/go-latex/latex v0.1.0/go.mod h1:LA0q/AyWIYrqVd+A9Upkgsb+IqPcmSTKc9Dny04MHMw= +codeberg.org/go-pdf/fpdf v0.10.0/go.mod h1:Y0DGRAdZ0OmnZPvjbMp/1bYxmIPxm0ws4tfoPOc4LjU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= +git.sr.ht/~sbinet/gg v0.6.0/go.mod h1:uucygbfC9wVPQIfrmwM2et0imr8L7KQWywX0xpFMm94= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.18.0 h1:ugYJK/neZQtQeh2jc5xNoDFiMQojlAkoqJMRb7vTu1U= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.18.0/go.mod h1:Xx0VKh7GJ4si3rmElbh19Mejxz68ibWg/J30ZOMrqzU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.23.0/go.mod h1:p2puVVSKjQ84Qb1gzw2XHLs34WQyHTYFZLaVxypAFYs= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0/go.mod h1:Cz6ft6Dkn3Et6l2v2a9/RpN7epQ1GtDlO6lj8bEcOvw= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -60,6 +65,7 @@ github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZ github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= @@ -87,6 +93,7 @@ github.com/go-fonts/latin-modern v0.2.0 h1:5/Tv1Ek/QCr20C6ZOz15vw3g7GELYL98KWr8H github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= github.com/go-fonts/stix v0.1.0 h1:UlZlgrvvmT/58o573ot7NFw0vZasZ5I6bcIft/oMdgg= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= +github.com/go-jose/go-jose/v4 v4.1.1/go.mod h1:BdsZGqgdO3b6tTc6LSE56wcDbMMLuPsw5d4ZD5f94kA= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= @@ -96,6 +103,7 @@ github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7a github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= +github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198/go.mod h1:DTh/Y2+NbnOVVoypCCQrovMPDKUGp4yZpSbWg5D0XIM= github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= @@ -209,26 +217,24 @@ go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0 go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= golang.org/x/image v0.0.0-20220302094943-723b81ca9867 h1:TcHcE0vrmgzNH1v3ppjcMGbhG5+9fMuvOmUYwNEF4q4= +golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= -golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b/go.mod h1:4ZwOYna0/zsOKwuR5X/m0QFOJpSZvAxFfkQT+Erd9D4= golang.org/x/telemetry v0.0.0-20250807160809-1a19826ec488/go.mod h1:fGb/2+tgXXjhjHsTNdVEEMZNWA0quBnfrO+AfoDSAKw= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= gonum.org/v1/plot v0.10.1 h1:dnifSs43YJuNMDzB7v8wV64O4ABBHReuAVAoBxqBqS4= +gonum.org/v1/plot v0.15.2/go.mod h1:DX+x+DWso3LTha+AdkJEv5Txvi+Tql3KAGkehP0/Ubg= google.golang.org/api v0.174.0/go.mod h1:aC7tB6j0HR1Nl0ni5ghpx6iLasmAX78Zkh/wgxAAjLg= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/genproto v0.0.0-20230725213213-b022f6e96895/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= @@ -236,15 +242,21 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230725213213-b022f6e96895/go. google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= google.golang.org/genproto/googleapis/api v0.0.0-20240930140551-af27646dc61f/go.mod h1:CLGoBuH1VHxAUXVPP8FfPwPEVJB6lz3URE5mY2SuayE= google.golang.org/genproto/googleapis/api v0.0.0-20250227231956-55c901821b1e h1:nsxey/MfoGzYNduN0NN/+hqP9iiCIYsrVbXb/8hjFM8= +google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA= +google.golang.org/genproto/googleapis/api v0.0.0-20250826171959-ef028d996bc1/go.mod h1:xUjFWUnWDpZ/C0Gu0qloASKFb6f8/QXiiXhSPFsD668= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240102182953-50ed04b92917/go.mod h1:O9TvT7A9NLgdqqF0JJXJ+axpaoYiEb8txGmkvy+AvLc= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240513163218-0867130af1f8/go.mod h1:RCpt0+3mpEDPldc32vXBM8ADXlFL95T8Chxx0nv0/zE= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250115164207-1a7da9e5054f h1:NtrhicUU5+S4TaE5AurusJUYfAo/QB8a+kbIXipuJeI= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:35wIojE/F1ptq1nfNDNjtowabHoMSA2qQs7+smpCO5s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250603155806-513f23925822 h1:zWFRixYR5QlotL+Uv3YfsPRENIrQFXiGs+iwqel6fOQ= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20250818200422-3122310a409c/go.mod h1:1kGGe25NDrNJYgta9Rp2QLLXWS1FLVMMXNvihbhK0iE= google.golang.org/genproto/googleapis/rpc v0.0.0-20230725213213-b022f6e96895/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20 h1:MLBCGN1O7GzIx+cBiwfYPwtmZ41U3Mn/cotLJciaArI= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index eaa1dab093..134d3771e9 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -539,6 +539,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/bigquery/datapolicies/apiv2": { + "api_shortname": "bigquerydatapolicy", + "distribution_name": "cloud.google.com/go/bigquery/datapolicies/apiv2", + "description": "BigQuery Data Policy API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/datapolicies/apiv2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/bigquery/datapolicies/apiv2beta1": { "api_shortname": "bigquerydatapolicy", "distribution_name": "cloud.google.com/go/bigquery/datapolicies/apiv2beta1", @@ -729,6 +739,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/capacityplanner/apiv1beta": { + "api_shortname": "capacityplanner", + "distribution_name": "cloud.google.com/go/capacityplanner/apiv1beta", + "description": "Capacity Planner API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/capacityplanner/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/certificatemanager/apiv1": { "api_shortname": "certificatemanager", "distribution_name": "cloud.google.com/go/certificatemanager/apiv1", @@ -1259,16 +1279,6 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, - "cloud.google.com/go/dlp/apiv2": { - "api_shortname": "dlp", - "distribution_name": "cloud.google.com/go/dlp/apiv2", - "description": "Sensitive Data Protection (DLP)", - "language": "go", - "client_library_type": "generated", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/dlp/latest/apiv2", - "release_level": "stable", - "library_type": "GAPIC_AUTO" - }, "cloud.google.com/go/documentai/apiv1": { "api_shortname": "documentai", "distribution_name": "cloud.google.com/go/documentai/apiv1", @@ -1459,6 +1469,16 @@ "release_level": "preview", "library_type": "CORE" }, + "cloud.google.com/go/geminidataanalytics/apiv1beta": { + "api_shortname": "geminidataanalytics", + "distribution_name": "cloud.google.com/go/geminidataanalytics/apiv1beta", + "description": "Data Analytics API with Gemini", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/geminidataanalytics/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/gkebackup/apiv1": { "api_shortname": "gkebackup", "distribution_name": "cloud.google.com/go/gkebackup/apiv1", @@ -1689,6 +1709,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/locationfinder/apiv1": { + "api_shortname": "cloudlocationfinder", + "distribution_name": "cloud.google.com/go/locationfinder/apiv1", + "description": "Cloud Location Finder API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/locationfinder/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/logging": { "api_shortname": "logging", "distribution_name": "cloud.google.com/go/logging", diff --git a/vendor/cloud.google.com/go/kms/apiv1/.repo-metadata.json b/vendor/cloud.google.com/go/kms/apiv1/.repo-metadata.json new file mode 100644 index 0000000000..86e5f30166 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "cloudkms", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/kms/latest/apiv1", + "client_library_type": "generated", + "description": "Cloud Key Management Service (KMS) API", + "distribution_name": "cloud.google.com/go/kms/apiv1", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "stable" +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go b/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go index 93e98452e8..74578907b5 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go +++ b/vendor/cloud.google.com/go/kms/apiv1/autokey_admin_client.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -66,6 +66,7 @@ func defaultAutokeyAdminGRPCClientOptions() []option.ClientOption { internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), internaloption.WithDefaultScopes(DefaultAuthScopes()...), internaloption.EnableJwtWithScope(), + internaloption.AllowHardBoundTokens("MTLS_S2A"), internaloption.EnableNewAuthLibrary(), option.WithGRPCDialOption(grpc.WithDefaultCallOptions( grpc.MaxCallRecvMsgSize(math.MaxInt32))), diff --git a/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go b/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go index 4ba085578b..867c22a155 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go +++ b/vendor/cloud.google.com/go/kms/apiv1/autokey_client.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -68,6 +68,7 @@ func defaultAutokeyGRPCClientOptions() []option.ClientOption { internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), internaloption.WithDefaultScopes(DefaultAuthScopes()...), internaloption.EnableJwtWithScope(), + internaloption.AllowHardBoundTokens("MTLS_S2A"), internaloption.EnableNewAuthLibrary(), option.WithGRPCDialOption(grpc.WithDefaultCallOptions( grpc.MaxCallRecvMsgSize(math.MaxInt32))), diff --git a/vendor/cloud.google.com/go/kms/apiv1/auxiliary.go b/vendor/cloud.google.com/go/kms/apiv1/auxiliary.go index 36e6bf84c1..e727a61927 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/auxiliary.go +++ b/vendor/cloud.google.com/go/kms/apiv1/auxiliary.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -91,6 +91,198 @@ func (op *CreateKeyHandleOperation) Name() string { return op.lro.Name() } +// CreateSingleTenantHsmInstanceOperation manages a long-running operation from CreateSingleTenantHsmInstance. +type CreateSingleTenantHsmInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateSingleTenantHsmInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.SingleTenantHsmInstance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateSingleTenantHsmInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.SingleTenantHsmInstance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateSingleTenantHsmInstanceOperation) Metadata() (*kmspb.CreateSingleTenantHsmInstanceMetadata, error) { + var meta kmspb.CreateSingleTenantHsmInstanceMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateSingleTenantHsmInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateSingleTenantHsmInstanceOperation) Name() string { + return op.lro.Name() +} + +// CreateSingleTenantHsmInstanceProposalOperation manages a long-running operation from CreateSingleTenantHsmInstanceProposal. +type CreateSingleTenantHsmInstanceProposalOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateSingleTenantHsmInstanceProposalOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.SingleTenantHsmInstanceProposal + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateSingleTenantHsmInstanceProposalOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.SingleTenantHsmInstanceProposal + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateSingleTenantHsmInstanceProposalOperation) Metadata() (*kmspb.CreateSingleTenantHsmInstanceProposalMetadata, error) { + var meta kmspb.CreateSingleTenantHsmInstanceProposalMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateSingleTenantHsmInstanceProposalOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateSingleTenantHsmInstanceProposalOperation) Name() string { + return op.lro.Name() +} + +// ExecuteSingleTenantHsmInstanceProposalOperation manages a long-running operation from ExecuteSingleTenantHsmInstanceProposal. +type ExecuteSingleTenantHsmInstanceProposalOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ExecuteSingleTenantHsmInstanceProposalOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*kmspb.ExecuteSingleTenantHsmInstanceProposalResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.ExecuteSingleTenantHsmInstanceProposalResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ExecuteSingleTenantHsmInstanceProposalOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*kmspb.ExecuteSingleTenantHsmInstanceProposalResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp kmspb.ExecuteSingleTenantHsmInstanceProposalResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ExecuteSingleTenantHsmInstanceProposalOperation) Metadata() (*kmspb.ExecuteSingleTenantHsmInstanceProposalMetadata, error) { + var meta kmspb.ExecuteSingleTenantHsmInstanceProposalMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ExecuteSingleTenantHsmInstanceProposalOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ExecuteSingleTenantHsmInstanceProposalOperation) Name() string { + return op.lro.Name() +} + // CryptoKeyIterator manages a stream of *kmspb.CryptoKey. type CryptoKeyIterator struct { items []*kmspb.CryptoKey @@ -419,3 +611,97 @@ func (it *LocationIterator) takeBuf() interface{} { it.items = nil return b } + +// SingleTenantHsmInstanceIterator manages a stream of *kmspb.SingleTenantHsmInstance. +type SingleTenantHsmInstanceIterator struct { + items []*kmspb.SingleTenantHsmInstance + 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 []*kmspb.SingleTenantHsmInstance, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *SingleTenantHsmInstanceIterator) 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 *SingleTenantHsmInstanceIterator) Next() (*kmspb.SingleTenantHsmInstance, error) { + var item *kmspb.SingleTenantHsmInstance + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SingleTenantHsmInstanceIterator) bufLen() int { + return len(it.items) +} + +func (it *SingleTenantHsmInstanceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// SingleTenantHsmInstanceProposalIterator manages a stream of *kmspb.SingleTenantHsmInstanceProposal. +type SingleTenantHsmInstanceProposalIterator struct { + items []*kmspb.SingleTenantHsmInstanceProposal + 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 []*kmspb.SingleTenantHsmInstanceProposal, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *SingleTenantHsmInstanceProposalIterator) 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 *SingleTenantHsmInstanceProposalIterator) Next() (*kmspb.SingleTenantHsmInstanceProposal, error) { + var item *kmspb.SingleTenantHsmInstanceProposal + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SingleTenantHsmInstanceProposalIterator) bufLen() int { + return len(it.items) +} + +func (it *SingleTenantHsmInstanceProposalIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/auxiliary_go123.go b/vendor/cloud.google.com/go/kms/apiv1/auxiliary_go123.go index b8517f3815..4b3427d62d 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/auxiliary_go123.go +++ b/vendor/cloud.google.com/go/kms/apiv1/auxiliary_go123.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -67,3 +67,15 @@ func (it *KeyRingIterator) All() iter.Seq2[*kmspb.KeyRing, error] { func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error] { return iterator.RangeAdapter(it.Next) } + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *SingleTenantHsmInstanceIterator) All() iter.Seq2[*kmspb.SingleTenantHsmInstance, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *SingleTenantHsmInstanceProposalIterator) All() iter.Seq2[*kmspb.SingleTenantHsmInstanceProposal, error] { + return iterator.RangeAdapter(it.Next) +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/doc.go b/vendor/cloud.google.com/go/kms/apiv1/doc.go index 7f85be3e6c..f167b1ff72 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/doc.go +++ b/vendor/cloud.google.com/go/kms/apiv1/doc.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go b/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go index 0282a7bacb..142db86bc6 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go +++ b/vendor/cloud.google.com/go/kms/apiv1/ekm_client.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -70,6 +70,7 @@ func defaultEkmGRPCClientOptions() []option.ClientOption { internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), internaloption.WithDefaultScopes(DefaultAuthScopes()...), internaloption.EnableJwtWithScope(), + internaloption.AllowHardBoundTokens("MTLS_S2A"), internaloption.EnableNewAuthLibrary(), option.WithGRPCDialOption(grpc.WithDefaultCallOptions( grpc.MaxCallRecvMsgSize(math.MaxInt32))), diff --git a/vendor/cloud.google.com/go/kms/apiv1/gapic_metadata.json b/vendor/cloud.google.com/go/kms/apiv1/gapic_metadata.json index 47b250252c..79e313dd41 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/gapic_metadata.json +++ b/vendor/cloud.google.com/go/kms/apiv1/gapic_metadata.json @@ -357,6 +357,170 @@ } } }, + "HsmManagement": { + "clients": { + "grpc": { + "libraryClient": "HsmManagementClient", + "rpcs": { + "ApproveSingleTenantHsmInstanceProposal": { + "methods": [ + "ApproveSingleTenantHsmInstanceProposal" + ] + }, + "CreateSingleTenantHsmInstance": { + "methods": [ + "CreateSingleTenantHsmInstance" + ] + }, + "CreateSingleTenantHsmInstanceProposal": { + "methods": [ + "CreateSingleTenantHsmInstanceProposal" + ] + }, + "DeleteSingleTenantHsmInstanceProposal": { + "methods": [ + "DeleteSingleTenantHsmInstanceProposal" + ] + }, + "ExecuteSingleTenantHsmInstanceProposal": { + "methods": [ + "ExecuteSingleTenantHsmInstanceProposal" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetSingleTenantHsmInstance": { + "methods": [ + "GetSingleTenantHsmInstance" + ] + }, + "GetSingleTenantHsmInstanceProposal": { + "methods": [ + "GetSingleTenantHsmInstanceProposal" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListSingleTenantHsmInstanceProposals": { + "methods": [ + "ListSingleTenantHsmInstanceProposals" + ] + }, + "ListSingleTenantHsmInstances": { + "methods": [ + "ListSingleTenantHsmInstances" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + } + } + }, + "rest": { + "libraryClient": "HsmManagementClient", + "rpcs": { + "ApproveSingleTenantHsmInstanceProposal": { + "methods": [ + "ApproveSingleTenantHsmInstanceProposal" + ] + }, + "CreateSingleTenantHsmInstance": { + "methods": [ + "CreateSingleTenantHsmInstance" + ] + }, + "CreateSingleTenantHsmInstanceProposal": { + "methods": [ + "CreateSingleTenantHsmInstanceProposal" + ] + }, + "DeleteSingleTenantHsmInstanceProposal": { + "methods": [ + "DeleteSingleTenantHsmInstanceProposal" + ] + }, + "ExecuteSingleTenantHsmInstanceProposal": { + "methods": [ + "ExecuteSingleTenantHsmInstanceProposal" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetSingleTenantHsmInstance": { + "methods": [ + "GetSingleTenantHsmInstance" + ] + }, + "GetSingleTenantHsmInstanceProposal": { + "methods": [ + "GetSingleTenantHsmInstanceProposal" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListSingleTenantHsmInstanceProposals": { + "methods": [ + "ListSingleTenantHsmInstanceProposals" + ] + }, + "ListSingleTenantHsmInstances": { + "methods": [ + "ListSingleTenantHsmInstances" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + } + } + } + } + }, "KeyManagementService": { "clients": { "grpc": { @@ -392,6 +556,11 @@ "CreateKeyRing" ] }, + "Decapsulate": { + "methods": [ + "Decapsulate" + ] + }, "Decrypt": { "methods": [ "Decrypt" @@ -567,6 +736,11 @@ "CreateKeyRing" ] }, + "Decapsulate": { + "methods": [ + "Decapsulate" + ] + }, "Decrypt": { "methods": [ "Decrypt" diff --git a/vendor/cloud.google.com/go/kms/apiv1/helpers.go b/vendor/cloud.google.com/go/kms/apiv1/helpers.go index 3d2c434993..535d7f76a5 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/helpers.go +++ b/vendor/cloud.google.com/go/kms/apiv1/helpers.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/cloud.google.com/go/kms/apiv1/hsm_management_client.go b/vendor/cloud.google.com/go/kms/apiv1/hsm_management_client.go new file mode 100644 index 0000000000..a7d4967da1 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/hsm_management_client.go @@ -0,0 +1,2080 @@ +// Copyright 2026 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 kms + +import ( + "bytes" + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + "time" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + kmspb "cloud.google.com/go/kms/apiv1/kmspb" + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newHsmManagementClientHook clientHook + +// HsmManagementCallOptions contains the retry settings for each method of HsmManagementClient. +type HsmManagementCallOptions struct { + ListSingleTenantHsmInstances []gax.CallOption + GetSingleTenantHsmInstance []gax.CallOption + CreateSingleTenantHsmInstance []gax.CallOption + CreateSingleTenantHsmInstanceProposal []gax.CallOption + ApproveSingleTenantHsmInstanceProposal []gax.CallOption + ExecuteSingleTenantHsmInstanceProposal []gax.CallOption + GetSingleTenantHsmInstanceProposal []gax.CallOption + ListSingleTenantHsmInstanceProposals []gax.CallOption + DeleteSingleTenantHsmInstanceProposal []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + GetOperation []gax.CallOption +} + +func defaultHsmManagementGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("cloudkms.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("cloudkms.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("cloudkms.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.AllowHardBoundTokens("MTLS_S2A"), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultHsmManagementCallOptions() *HsmManagementCallOptions { + return &HsmManagementCallOptions{ + ListSingleTenantHsmInstances: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetSingleTenantHsmInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateSingleTenantHsmInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ApproveSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ExecuteSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListSingleTenantHsmInstanceProposals: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + } +} + +func defaultHsmManagementRESTCallOptions() *HsmManagementCallOptions { + return &HsmManagementCallOptions{ + ListSingleTenantHsmInstances: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + GetSingleTenantHsmInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + CreateSingleTenantHsmInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + CreateSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + ApproveSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + ExecuteSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + GetSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + ListSingleTenantHsmInstanceProposals: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + DeleteSingleTenantHsmInstanceProposal: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + } +} + +// internalHsmManagementClient is an interface that defines the methods available from Cloud Key Management Service (KMS) API. +type internalHsmManagementClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListSingleTenantHsmInstances(context.Context, *kmspb.ListSingleTenantHsmInstancesRequest, ...gax.CallOption) *SingleTenantHsmInstanceIterator + GetSingleTenantHsmInstance(context.Context, *kmspb.GetSingleTenantHsmInstanceRequest, ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) + CreateSingleTenantHsmInstance(context.Context, *kmspb.CreateSingleTenantHsmInstanceRequest, ...gax.CallOption) (*CreateSingleTenantHsmInstanceOperation, error) + CreateSingleTenantHsmInstanceOperation(name string) *CreateSingleTenantHsmInstanceOperation + CreateSingleTenantHsmInstanceProposal(context.Context, *kmspb.CreateSingleTenantHsmInstanceProposalRequest, ...gax.CallOption) (*CreateSingleTenantHsmInstanceProposalOperation, error) + CreateSingleTenantHsmInstanceProposalOperation(name string) *CreateSingleTenantHsmInstanceProposalOperation + ApproveSingleTenantHsmInstanceProposal(context.Context, *kmspb.ApproveSingleTenantHsmInstanceProposalRequest, ...gax.CallOption) (*kmspb.ApproveSingleTenantHsmInstanceProposalResponse, error) + ExecuteSingleTenantHsmInstanceProposal(context.Context, *kmspb.ExecuteSingleTenantHsmInstanceProposalRequest, ...gax.CallOption) (*ExecuteSingleTenantHsmInstanceProposalOperation, error) + ExecuteSingleTenantHsmInstanceProposalOperation(name string) *ExecuteSingleTenantHsmInstanceProposalOperation + GetSingleTenantHsmInstanceProposal(context.Context, *kmspb.GetSingleTenantHsmInstanceProposalRequest, ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) + ListSingleTenantHsmInstanceProposals(context.Context, *kmspb.ListSingleTenantHsmInstanceProposalsRequest, ...gax.CallOption) *SingleTenantHsmInstanceProposalIterator + DeleteSingleTenantHsmInstanceProposal(context.Context, *kmspb.DeleteSingleTenantHsmInstanceProposalRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) +} + +// HsmManagementClient is a client for interacting with Cloud Key Management Service (KMS) API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// # Google Cloud HSM Management Service +// +// Provides interfaces for managing HSM instances. +// +// Implements a REST model with the following objects: +// +// SingleTenantHsmInstance +// +// SingleTenantHsmInstanceProposal +type HsmManagementClient struct { + // The internal transport-dependent client. + internalClient internalHsmManagementClient + + // The call options for this service. + CallOptions *HsmManagementCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *HsmManagementClient) 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 *HsmManagementClient) 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 *HsmManagementClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListSingleTenantHsmInstances lists +// SingleTenantHsmInstances. +func (c *HsmManagementClient) ListSingleTenantHsmInstances(ctx context.Context, req *kmspb.ListSingleTenantHsmInstancesRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceIterator { + return c.internalClient.ListSingleTenantHsmInstances(ctx, req, opts...) +} + +// GetSingleTenantHsmInstance returns metadata for a given +// SingleTenantHsmInstance. +func (c *HsmManagementClient) GetSingleTenantHsmInstance(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) { + return c.internalClient.GetSingleTenantHsmInstance(ctx, req, opts...) +} + +// CreateSingleTenantHsmInstance creates a new +// SingleTenantHsmInstance in a +// given Project and Location. User must create a RegisterTwoFactorAuthKeys +// proposal with this single-tenant HSM instance to finish setup of the +// instance. +func (c *HsmManagementClient) CreateSingleTenantHsmInstance(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceOperation, error) { + return c.internalClient.CreateSingleTenantHsmInstance(ctx, req, opts...) +} + +// CreateSingleTenantHsmInstanceOperation returns a new CreateSingleTenantHsmInstanceOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceOperation, possibly from a different process. +func (c *HsmManagementClient) CreateSingleTenantHsmInstanceOperation(name string) *CreateSingleTenantHsmInstanceOperation { + return c.internalClient.CreateSingleTenantHsmInstanceOperation(name) +} + +// CreateSingleTenantHsmInstanceProposal creates a new +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. +func (c *HsmManagementClient) CreateSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceProposalOperation, error) { + return c.internalClient.CreateSingleTenantHsmInstanceProposal(ctx, req, opts...) +} + +// CreateSingleTenantHsmInstanceProposalOperation returns a new CreateSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *HsmManagementClient) CreateSingleTenantHsmInstanceProposalOperation(name string) *CreateSingleTenantHsmInstanceProposalOperation { + return c.internalClient.CreateSingleTenantHsmInstanceProposalOperation(name) +} + +// ApproveSingleTenantHsmInstanceProposal approves a +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. The +// proposal must be in the +// PENDING +// state. +func (c *HsmManagementClient) ApproveSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ApproveSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.ApproveSingleTenantHsmInstanceProposalResponse, error) { + return c.internalClient.ApproveSingleTenantHsmInstanceProposal(ctx, req, opts...) +} + +// ExecuteSingleTenantHsmInstanceProposal executes a +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. The +// proposal must be in the +// APPROVED +// state. +func (c *HsmManagementClient) ExecuteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ExecuteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*ExecuteSingleTenantHsmInstanceProposalOperation, error) { + return c.internalClient.ExecuteSingleTenantHsmInstanceProposal(ctx, req, opts...) +} + +// ExecuteSingleTenantHsmInstanceProposalOperation returns a new ExecuteSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created ExecuteSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *HsmManagementClient) ExecuteSingleTenantHsmInstanceProposalOperation(name string) *ExecuteSingleTenantHsmInstanceProposalOperation { + return c.internalClient.ExecuteSingleTenantHsmInstanceProposalOperation(name) +} + +// GetSingleTenantHsmInstanceProposal returns metadata for a given +// SingleTenantHsmInstanceProposal. +func (c *HsmManagementClient) GetSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) { + return c.internalClient.GetSingleTenantHsmInstanceProposal(ctx, req, opts...) +} + +// ListSingleTenantHsmInstanceProposals lists +// SingleTenantHsmInstanceProposals. +func (c *HsmManagementClient) ListSingleTenantHsmInstanceProposals(ctx context.Context, req *kmspb.ListSingleTenantHsmInstanceProposalsRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceProposalIterator { + return c.internalClient.ListSingleTenantHsmInstanceProposals(ctx, req, opts...) +} + +// DeleteSingleTenantHsmInstanceProposal deletes a +// SingleTenantHsmInstanceProposal. +func (c *HsmManagementClient) DeleteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.DeleteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteSingleTenantHsmInstanceProposal(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *HsmManagementClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *HsmManagementClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *HsmManagementClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *HsmManagementClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *HsmManagementClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *HsmManagementClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// hsmManagementGRPCClient is a client for interacting with Cloud Key Management Service (KMS) API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type hsmManagementGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing HsmManagementClient + CallOptions **HsmManagementCallOptions + + // The gRPC API client. + hsmManagementClient kmspb.HsmManagementClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewHsmManagementClient creates a new hsm management client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// # Google Cloud HSM Management Service +// +// Provides interfaces for managing HSM instances. +// +// Implements a REST model with the following objects: +// +// SingleTenantHsmInstance +// +// SingleTenantHsmInstanceProposal +func NewHsmManagementClient(ctx context.Context, opts ...option.ClientOption) (*HsmManagementClient, error) { + clientOpts := defaultHsmManagementGRPCClientOptions() + if newHsmManagementClientHook != nil { + hookOpts, err := newHsmManagementClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := HsmManagementClient{CallOptions: defaultHsmManagementCallOptions()} + + c := &hsmManagementGRPCClient{ + connPool: connPool, + hsmManagementClient: kmspb.NewHsmManagementClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *hsmManagementGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *hsmManagementGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + 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 *hsmManagementGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type hsmManagementRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing HsmManagementClient + CallOptions **HsmManagementCallOptions + + logger *slog.Logger +} + +// NewHsmManagementRESTClient creates a new hsm management rest client. +// +// # Google Cloud HSM Management Service +// +// Provides interfaces for managing HSM instances. +// +// Implements a REST model with the following objects: +// +// SingleTenantHsmInstance +// +// SingleTenantHsmInstanceProposal +func NewHsmManagementRESTClient(ctx context.Context, opts ...option.ClientOption) (*HsmManagementClient, error) { + clientOpts := append(defaultHsmManagementRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultHsmManagementRESTCallOptions() + c := &hsmManagementRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &HsmManagementClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultHsmManagementRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://cloudkms.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://cloudkms.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://cloudkms.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// 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 *hsmManagementRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + 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 *hsmManagementRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *hsmManagementRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *hsmManagementGRPCClient) ListSingleTenantHsmInstances(ctx context.Context, req *kmspb.ListSingleTenantHsmInstancesRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListSingleTenantHsmInstances[0:len((*c.CallOptions).ListSingleTenantHsmInstances):len((*c.CallOptions).ListSingleTenantHsmInstances)], opts...) + it := &SingleTenantHsmInstanceIterator{} + req = proto.Clone(req).(*kmspb.ListSingleTenantHsmInstancesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*kmspb.SingleTenantHsmInstance, string, error) { + resp := &kmspb.ListSingleTenantHsmInstancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.ListSingleTenantHsmInstances, req, settings.GRPC, c.logger, "ListSingleTenantHsmInstances") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSingleTenantHsmInstances(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *hsmManagementGRPCClient) GetSingleTenantHsmInstance(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetSingleTenantHsmInstance[0:len((*c.CallOptions).GetSingleTenantHsmInstance):len((*c.CallOptions).GetSingleTenantHsmInstance)], opts...) + var resp *kmspb.SingleTenantHsmInstance + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.GetSingleTenantHsmInstance, req, settings.GRPC, c.logger, "GetSingleTenantHsmInstance") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) CreateSingleTenantHsmInstance(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateSingleTenantHsmInstance[0:len((*c.CallOptions).CreateSingleTenantHsmInstance):len((*c.CallOptions).CreateSingleTenantHsmInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.CreateSingleTenantHsmInstance, req, settings.GRPC, c.logger, "CreateSingleTenantHsmInstance") + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateSingleTenantHsmInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *hsmManagementGRPCClient) CreateSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceProposalOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).CreateSingleTenantHsmInstanceProposal):len((*c.CallOptions).CreateSingleTenantHsmInstanceProposal)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.CreateSingleTenantHsmInstanceProposal, req, settings.GRPC, c.logger, "CreateSingleTenantHsmInstanceProposal") + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *hsmManagementGRPCClient) ApproveSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ApproveSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.ApproveSingleTenantHsmInstanceProposalResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal):len((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal)], opts...) + var resp *kmspb.ApproveSingleTenantHsmInstanceProposalResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.ApproveSingleTenantHsmInstanceProposal, req, settings.GRPC, c.logger, "ApproveSingleTenantHsmInstanceProposal") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) ExecuteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ExecuteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*ExecuteSingleTenantHsmInstanceProposalOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ExecuteSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).ExecuteSingleTenantHsmInstanceProposal):len((*c.CallOptions).ExecuteSingleTenantHsmInstanceProposal)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.ExecuteSingleTenantHsmInstanceProposal, req, settings.GRPC, c.logger, "ExecuteSingleTenantHsmInstanceProposal") + return err + }, opts...) + if err != nil { + return nil, err + } + return &ExecuteSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *hsmManagementGRPCClient) GetSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).GetSingleTenantHsmInstanceProposal):len((*c.CallOptions).GetSingleTenantHsmInstanceProposal)], opts...) + var resp *kmspb.SingleTenantHsmInstanceProposal + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.GetSingleTenantHsmInstanceProposal, req, settings.GRPC, c.logger, "GetSingleTenantHsmInstanceProposal") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) ListSingleTenantHsmInstanceProposals(ctx context.Context, req *kmspb.ListSingleTenantHsmInstanceProposalsRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceProposalIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListSingleTenantHsmInstanceProposals[0:len((*c.CallOptions).ListSingleTenantHsmInstanceProposals):len((*c.CallOptions).ListSingleTenantHsmInstanceProposals)], opts...) + it := &SingleTenantHsmInstanceProposalIterator{} + req = proto.Clone(req).(*kmspb.ListSingleTenantHsmInstanceProposalsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*kmspb.SingleTenantHsmInstanceProposal, string, error) { + resp := &kmspb.ListSingleTenantHsmInstanceProposalsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.hsmManagementClient.ListSingleTenantHsmInstanceProposals, req, settings.GRPC, c.logger, "ListSingleTenantHsmInstanceProposals") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSingleTenantHsmInstanceProposals(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *hsmManagementGRPCClient) DeleteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.DeleteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).DeleteSingleTenantHsmInstanceProposal):len((*c.CallOptions).DeleteSingleTenantHsmInstanceProposal)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.hsmManagementClient.DeleteSingleTenantHsmInstanceProposal, req, settings.GRPC, c.logger, "DeleteSingleTenantHsmInstanceProposal") + return err + }, opts...) + return err +} + +func (c *hsmManagementGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *hsmManagementGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.iamPolicyClient.GetIamPolicy, req, settings.GRPC, c.logger, "GetIamPolicy") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.iamPolicyClient.SetIamPolicy, req, settings.GRPC, c.logger, "SetIamPolicy") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.iamPolicyClient.TestIamPermissions, req, settings.GRPC, c.logger, "TestIamPermissions") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *hsmManagementGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ListSingleTenantHsmInstances lists +// SingleTenantHsmInstances. +func (c *hsmManagementRESTClient) ListSingleTenantHsmInstances(ctx context.Context, req *kmspb.ListSingleTenantHsmInstancesRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceIterator { + it := &SingleTenantHsmInstanceIterator{} + req = proto.Clone(req).(*kmspb.ListSingleTenantHsmInstancesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*kmspb.SingleTenantHsmInstance, string, error) { + resp := &kmspb.ListSingleTenantHsmInstancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/singleTenantHsmInstances", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetShowDeleted() { + params.Add("showDeleted", fmt.Sprintf("%v", req.GetShowDeleted())) + } + + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSingleTenantHsmInstances") + 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.GetSingleTenantHsmInstances(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetSingleTenantHsmInstance returns metadata for a given +// SingleTenantHsmInstance. +func (c *hsmManagementRESTClient) GetSingleTenantHsmInstance(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstance, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetSingleTenantHsmInstance[0:len((*c.CallOptions).GetSingleTenantHsmInstance):len((*c.CallOptions).GetSingleTenantHsmInstance)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &kmspb.SingleTenantHsmInstance{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSingleTenantHsmInstance") + 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 +} + +// CreateSingleTenantHsmInstance creates a new +// SingleTenantHsmInstance in a +// given Project and Location. User must create a RegisterTwoFactorAuthKeys +// proposal with this single-tenant HSM instance to finish setup of the +// instance. +func (c *hsmManagementRESTClient) CreateSingleTenantHsmInstance(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSingleTenantHsmInstance() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/singleTenantHsmInstances", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetSingleTenantHsmInstanceId() != "" { + params.Add("singleTenantHsmInstanceId", fmt.Sprintf("%v", req.GetSingleTenantHsmInstanceId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSingleTenantHsmInstance") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1/%s", resp.GetName()) + return &CreateSingleTenantHsmInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateSingleTenantHsmInstanceProposal creates a new +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. +func (c *hsmManagementRESTClient) CreateSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.CreateSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*CreateSingleTenantHsmInstanceProposalOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSingleTenantHsmInstanceProposal() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/proposals", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetSingleTenantHsmInstanceProposalId() != "" { + params.Add("singleTenantHsmInstanceProposalId", fmt.Sprintf("%v", req.GetSingleTenantHsmInstanceProposalId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateSingleTenantHsmInstanceProposal") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1/%s", resp.GetName()) + return &CreateSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ApproveSingleTenantHsmInstanceProposal approves a +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. The +// proposal must be in the +// PENDING +// state. +func (c *hsmManagementRESTClient) ApproveSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ApproveSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.ApproveSingleTenantHsmInstanceProposalResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:approve", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal):len((*c.CallOptions).ApproveSingleTenantHsmInstanceProposal)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &kmspb.ApproveSingleTenantHsmInstanceProposalResponse{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ApproveSingleTenantHsmInstanceProposal") + 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 +} + +// ExecuteSingleTenantHsmInstanceProposal executes a +// SingleTenantHsmInstanceProposal +// for a given +// SingleTenantHsmInstance. The +// proposal must be in the +// APPROVED +// state. +func (c *hsmManagementRESTClient) ExecuteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.ExecuteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*ExecuteSingleTenantHsmInstanceProposalOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:execute", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ExecuteSingleTenantHsmInstanceProposal") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1/%s", resp.GetName()) + return &ExecuteSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetSingleTenantHsmInstanceProposal returns metadata for a given +// SingleTenantHsmInstanceProposal. +func (c *hsmManagementRESTClient) GetSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.GetSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) (*kmspb.SingleTenantHsmInstanceProposal, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetSingleTenantHsmInstanceProposal[0:len((*c.CallOptions).GetSingleTenantHsmInstanceProposal):len((*c.CallOptions).GetSingleTenantHsmInstanceProposal)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &kmspb.SingleTenantHsmInstanceProposal{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetSingleTenantHsmInstanceProposal") + 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 +} + +// ListSingleTenantHsmInstanceProposals lists +// SingleTenantHsmInstanceProposals. +func (c *hsmManagementRESTClient) ListSingleTenantHsmInstanceProposals(ctx context.Context, req *kmspb.ListSingleTenantHsmInstanceProposalsRequest, opts ...gax.CallOption) *SingleTenantHsmInstanceProposalIterator { + it := &SingleTenantHsmInstanceProposalIterator{} + req = proto.Clone(req).(*kmspb.ListSingleTenantHsmInstanceProposalsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*kmspb.SingleTenantHsmInstanceProposal, string, error) { + resp := &kmspb.ListSingleTenantHsmInstanceProposalsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/proposals", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetShowDeleted() { + params.Add("showDeleted", fmt.Sprintf("%v", req.GetShowDeleted())) + } + + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListSingleTenantHsmInstanceProposals") + 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.GetSingleTenantHsmInstanceProposals(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteSingleTenantHsmInstanceProposal deletes a +// SingleTenantHsmInstanceProposal. +func (c *hsmManagementRESTClient) DeleteSingleTenantHsmInstanceProposal(ctx context.Context, req *kmspb.DeleteSingleTenantHsmInstanceProposalRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteSingleTenantHsmInstanceProposal") + return err + }, opts...) +} + +// GetLocation gets information about a location. +func (c *hsmManagementRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *hsmManagementRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *hsmManagementRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:getIamPolicy", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetOptions().GetRequestedPolicyVersion() != 0 { + params.Add("options.requestedPolicyVersion", fmt.Sprintf("%v", req.GetOptions().GetRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIamPolicy") + 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 +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *hsmManagementRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:setIamPolicy", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SetIamPolicy") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *hsmManagementRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:testIamPermissions", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "TestIamPermissions") + 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 +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *hsmManagementRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") + 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 +} + +// CreateSingleTenantHsmInstanceOperation returns a new CreateSingleTenantHsmInstanceOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceOperation, possibly from a different process. +func (c *hsmManagementGRPCClient) CreateSingleTenantHsmInstanceOperation(name string) *CreateSingleTenantHsmInstanceOperation { + return &CreateSingleTenantHsmInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateSingleTenantHsmInstanceOperation returns a new CreateSingleTenantHsmInstanceOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceOperation, possibly from a different process. +func (c *hsmManagementRESTClient) CreateSingleTenantHsmInstanceOperation(name string) *CreateSingleTenantHsmInstanceOperation { + override := fmt.Sprintf("/v1/%s", name) + return &CreateSingleTenantHsmInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// CreateSingleTenantHsmInstanceProposalOperation returns a new CreateSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *hsmManagementGRPCClient) CreateSingleTenantHsmInstanceProposalOperation(name string) *CreateSingleTenantHsmInstanceProposalOperation { + return &CreateSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateSingleTenantHsmInstanceProposalOperation returns a new CreateSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created CreateSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *hsmManagementRESTClient) CreateSingleTenantHsmInstanceProposalOperation(name string) *CreateSingleTenantHsmInstanceProposalOperation { + override := fmt.Sprintf("/v1/%s", name) + return &CreateSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// ExecuteSingleTenantHsmInstanceProposalOperation returns a new ExecuteSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created ExecuteSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *hsmManagementGRPCClient) ExecuteSingleTenantHsmInstanceProposalOperation(name string) *ExecuteSingleTenantHsmInstanceProposalOperation { + return &ExecuteSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ExecuteSingleTenantHsmInstanceProposalOperation returns a new ExecuteSingleTenantHsmInstanceProposalOperation from a given name. +// The name must be that of a previously created ExecuteSingleTenantHsmInstanceProposalOperation, possibly from a different process. +func (c *hsmManagementRESTClient) ExecuteSingleTenantHsmInstanceProposalOperation(name string) *ExecuteSingleTenantHsmInstanceProposalOperation { + override := fmt.Sprintf("/v1/%s", name) + return &ExecuteSingleTenantHsmInstanceProposalOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go b/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go index 3246c31c21..ca27f08ca0 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go +++ b/vendor/cloud.google.com/go/kms/apiv1/key_management_client.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -73,6 +73,7 @@ type KeyManagementCallOptions struct { AsymmetricDecrypt []gax.CallOption MacSign []gax.CallOption MacVerify []gax.CallOption + Decapsulate []gax.CallOption GenerateRandomBytes []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption @@ -91,6 +92,7 @@ func defaultKeyManagementGRPCClientOptions() []option.ClientOption { internaloption.WithDefaultAudience("https://cloudkms.googleapis.com/"), internaloption.WithDefaultScopes(DefaultAuthScopes()...), internaloption.EnableJwtWithScope(), + internaloption.AllowHardBoundTokens("MTLS_S2A"), internaloption.EnableNewAuthLibrary(), option.WithGRPCDialOption(grpc.WithDefaultCallOptions( grpc.MaxCallRecvMsgSize(math.MaxInt32))), @@ -406,6 +408,7 @@ func defaultKeyManagementCallOptions() *KeyManagementCallOptions { }) }), }, + Decapsulate: []gax.CallOption{}, GenerateRandomBytes: []gax.CallOption{ gax.WithTimeout(60000 * time.Millisecond), gax.WithRetry(func() gax.Retryer { @@ -714,6 +717,7 @@ func defaultKeyManagementRESTCallOptions() *KeyManagementCallOptions { http.StatusGatewayTimeout) }), }, + Decapsulate: []gax.CallOption{}, GenerateRandomBytes: []gax.CallOption{ gax.WithTimeout(60000 * time.Millisecond), gax.WithRetry(func() gax.Retryer { @@ -767,6 +771,7 @@ type internalKeyManagementClient interface { AsymmetricDecrypt(context.Context, *kmspb.AsymmetricDecryptRequest, ...gax.CallOption) (*kmspb.AsymmetricDecryptResponse, error) MacSign(context.Context, *kmspb.MacSignRequest, ...gax.CallOption) (*kmspb.MacSignResponse, error) MacVerify(context.Context, *kmspb.MacVerifyRequest, ...gax.CallOption) (*kmspb.MacVerifyResponse, error) + Decapsulate(context.Context, *kmspb.DecapsulateRequest, ...gax.CallOption) (*kmspb.DecapsulateResponse, error) GenerateRandomBytes(context.Context, *kmspb.GenerateRandomBytesRequest, ...gax.CallOption) (*kmspb.GenerateRandomBytesResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator @@ -1061,6 +1066,15 @@ func (c *KeyManagementClient) MacVerify(ctx context.Context, req *kmspb.MacVerif return c.internalClient.MacVerify(ctx, req, opts...) } +// Decapsulate decapsulates data that was encapsulated with a public key retrieved from +// GetPublicKey +// corresponding to a CryptoKeyVersion +// with CryptoKey.purpose +// KEY_ENCAPSULATION. +func (c *KeyManagementClient) Decapsulate(ctx context.Context, req *kmspb.DecapsulateRequest, opts ...gax.CallOption) (*kmspb.DecapsulateResponse, error) { + return c.internalClient.Decapsulate(ctx, req, opts...) +} + // GenerateRandomBytes generate random bytes using the Cloud KMS randomness source in the provided // location. func (c *KeyManagementClient) GenerateRandomBytes(ctx context.Context, req *kmspb.GenerateRandomBytesRequest, opts ...gax.CallOption) (*kmspb.GenerateRandomBytesResponse, error) { @@ -1896,6 +1910,24 @@ func (c *keyManagementGRPCClient) MacVerify(ctx context.Context, req *kmspb.MacV return resp, nil } +func (c *keyManagementGRPCClient) Decapsulate(ctx context.Context, req *kmspb.DecapsulateRequest, opts ...gax.CallOption) (*kmspb.DecapsulateResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).Decapsulate[0:len((*c.CallOptions).Decapsulate):len((*c.CallOptions).Decapsulate)], opts...) + var resp *kmspb.DecapsulateResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.keyManagementClient.Decapsulate, req, settings.GRPC, c.logger, "Decapsulate") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *keyManagementGRPCClient) GenerateRandomBytes(ctx context.Context, req *kmspb.GenerateRandomBytesRequest, opts ...gax.CallOption) (*kmspb.GenerateRandomBytesResponse, error) { hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "location", url.QueryEscape(req.GetLocation()))} @@ -3780,6 +3812,66 @@ func (c *keyManagementRESTClient) MacVerify(ctx context.Context, req *kmspb.MacV return resp, nil } +// Decapsulate decapsulates data that was encapsulated with a public key retrieved from +// GetPublicKey +// corresponding to a CryptoKeyVersion +// with CryptoKey.purpose +// KEY_ENCAPSULATION. +func (c *keyManagementRESTClient) Decapsulate(ctx context.Context, req *kmspb.DecapsulateRequest, opts ...gax.CallOption) (*kmspb.DecapsulateResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v:decapsulate", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).Decapsulate[0:len((*c.CallOptions).Decapsulate):len((*c.CallOptions).Decapsulate)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &kmspb.DecapsulateResponse{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "Decapsulate") + 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 +} + // GenerateRandomBytes generate random bytes using the Cloud KMS randomness source in the provided // location. func (c *keyManagementRESTClient) GenerateRandomBytes(ctx context.Context, req *kmspb.GenerateRandomBytesRequest, opts ...gax.CallOption) (*kmspb.GenerateRandomBytesResponse, error) { diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go index 6f12a2532e..85bb725473 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey.pb.go @@ -21,16 +21,13 @@ package kmspb import ( + reflect "reflect" + sync "sync" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -613,173 +610,3 @@ func file_google_cloud_kms_v1_autokey_proto_init() { file_google_cloud_kms_v1_autokey_proto_goTypes = nil file_google_cloud_kms_v1_autokey_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AutokeyClient is the client API for Autokey service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AutokeyClient interface { - // Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the - // provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK - // use with the given resource type in the configured key project and the same - // location. [GetOperation][google.longrunning.Operations.GetOperation] should - // be used to resolve the resulting long-running operation and get the - // resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - // [CryptoKey][google.cloud.kms.v1.CryptoKey]. - CreateKeyHandle(ctx context.Context, in *CreateKeyHandleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) - // Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. - GetKeyHandle(ctx context.Context, in *GetKeyHandleRequest, opts ...grpc.CallOption) (*KeyHandle, error) - // Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. - ListKeyHandles(ctx context.Context, in *ListKeyHandlesRequest, opts ...grpc.CallOption) (*ListKeyHandlesResponse, error) -} - -type autokeyClient struct { - cc grpc.ClientConnInterface -} - -func NewAutokeyClient(cc grpc.ClientConnInterface) AutokeyClient { - return &autokeyClient{cc} -} - -func (c *autokeyClient) CreateKeyHandle(ctx context.Context, in *CreateKeyHandleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { - out := new(longrunningpb.Operation) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.Autokey/CreateKeyHandle", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *autokeyClient) GetKeyHandle(ctx context.Context, in *GetKeyHandleRequest, opts ...grpc.CallOption) (*KeyHandle, error) { - out := new(KeyHandle) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.Autokey/GetKeyHandle", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *autokeyClient) ListKeyHandles(ctx context.Context, in *ListKeyHandlesRequest, opts ...grpc.CallOption) (*ListKeyHandlesResponse, error) { - out := new(ListKeyHandlesResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.Autokey/ListKeyHandles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AutokeyServer is the server API for Autokey service. -type AutokeyServer interface { - // Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the - // provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK - // use with the given resource type in the configured key project and the same - // location. [GetOperation][google.longrunning.Operations.GetOperation] should - // be used to resolve the resulting long-running operation and get the - // resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and - // [CryptoKey][google.cloud.kms.v1.CryptoKey]. - CreateKeyHandle(context.Context, *CreateKeyHandleRequest) (*longrunningpb.Operation, error) - // Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. - GetKeyHandle(context.Context, *GetKeyHandleRequest) (*KeyHandle, error) - // Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. - ListKeyHandles(context.Context, *ListKeyHandlesRequest) (*ListKeyHandlesResponse, error) -} - -// UnimplementedAutokeyServer can be embedded to have forward compatible implementations. -type UnimplementedAutokeyServer struct { -} - -func (*UnimplementedAutokeyServer) CreateKeyHandle(context.Context, *CreateKeyHandleRequest) (*longrunningpb.Operation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateKeyHandle not implemented") -} -func (*UnimplementedAutokeyServer) GetKeyHandle(context.Context, *GetKeyHandleRequest) (*KeyHandle, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKeyHandle not implemented") -} -func (*UnimplementedAutokeyServer) ListKeyHandles(context.Context, *ListKeyHandlesRequest) (*ListKeyHandlesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKeyHandles not implemented") -} - -func RegisterAutokeyServer(s *grpc.Server, srv AutokeyServer) { - s.RegisterService(&_Autokey_serviceDesc, srv) -} - -func _Autokey_CreateKeyHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateKeyHandleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyServer).CreateKeyHandle(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.Autokey/CreateKeyHandle", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyServer).CreateKeyHandle(ctx, req.(*CreateKeyHandleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Autokey_GetKeyHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKeyHandleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyServer).GetKeyHandle(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.Autokey/GetKeyHandle", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyServer).GetKeyHandle(ctx, req.(*GetKeyHandleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Autokey_ListKeyHandles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKeyHandlesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyServer).ListKeyHandles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.Autokey/ListKeyHandles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyServer).ListKeyHandles(ctx, req.(*ListKeyHandlesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Autokey_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.kms.v1.Autokey", - HandlerType: (*AutokeyServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateKeyHandle", - Handler: _Autokey_CreateKeyHandle_Handler, - }, - { - MethodName: "GetKeyHandle", - Handler: _Autokey_GetKeyHandle_Handler, - }, - { - MethodName: "ListKeyHandles", - Handler: _Autokey_ListKeyHandles_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/kms/v1/autokey.proto", -} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go index e0569d6114..edae561341 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin.pb.go @@ -21,16 +21,13 @@ package kmspb import ( - context "context" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - reflect "reflect" - sync "sync" ) const ( @@ -581,175 +578,3 @@ func file_google_cloud_kms_v1_autokey_admin_proto_init() { file_google_cloud_kms_v1_autokey_admin_proto_goTypes = nil file_google_cloud_kms_v1_autokey_admin_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AutokeyAdminClient is the client API for AutokeyAdmin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AutokeyAdminClient interface { - // Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - // folder. The caller must have both `cloudkms.autokeyConfigs.update` - // permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy` - // permission on the provided key project. A - // [KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's - // descendant projects will use this configuration to determine where to - // create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. - UpdateAutokeyConfig(ctx context.Context, in *UpdateAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) - // Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - // folder. - GetAutokeyConfig(ctx context.Context, in *GetAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) - // Returns the effective Cloud KMS Autokey configuration for a given project. - ShowEffectiveAutokeyConfig(ctx context.Context, in *ShowEffectiveAutokeyConfigRequest, opts ...grpc.CallOption) (*ShowEffectiveAutokeyConfigResponse, error) -} - -type autokeyAdminClient struct { - cc grpc.ClientConnInterface -} - -func NewAutokeyAdminClient(cc grpc.ClientConnInterface) AutokeyAdminClient { - return &autokeyAdminClient{cc} -} - -func (c *autokeyAdminClient) UpdateAutokeyConfig(ctx context.Context, in *UpdateAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) { - out := new(AutokeyConfig) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.AutokeyAdmin/UpdateAutokeyConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *autokeyAdminClient) GetAutokeyConfig(ctx context.Context, in *GetAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) { - out := new(AutokeyConfig) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *autokeyAdminClient) ShowEffectiveAutokeyConfig(ctx context.Context, in *ShowEffectiveAutokeyConfigRequest, opts ...grpc.CallOption) (*ShowEffectiveAutokeyConfigResponse, error) { - out := new(ShowEffectiveAutokeyConfigResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.AutokeyAdmin/ShowEffectiveAutokeyConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AutokeyAdminServer is the server API for AutokeyAdmin service. -type AutokeyAdminServer interface { - // Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - // folder. The caller must have both `cloudkms.autokeyConfigs.update` - // permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy` - // permission on the provided key project. A - // [KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's - // descendant projects will use this configuration to determine where to - // create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. - UpdateAutokeyConfig(context.Context, *UpdateAutokeyConfigRequest) (*AutokeyConfig, error) - // Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a - // folder. - GetAutokeyConfig(context.Context, *GetAutokeyConfigRequest) (*AutokeyConfig, error) - // Returns the effective Cloud KMS Autokey configuration for a given project. - ShowEffectiveAutokeyConfig(context.Context, *ShowEffectiveAutokeyConfigRequest) (*ShowEffectiveAutokeyConfigResponse, error) -} - -// UnimplementedAutokeyAdminServer can be embedded to have forward compatible implementations. -type UnimplementedAutokeyAdminServer struct { -} - -func (*UnimplementedAutokeyAdminServer) UpdateAutokeyConfig(context.Context, *UpdateAutokeyConfigRequest) (*AutokeyConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAutokeyConfig not implemented") -} -func (*UnimplementedAutokeyAdminServer) GetAutokeyConfig(context.Context, *GetAutokeyConfigRequest) (*AutokeyConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAutokeyConfig not implemented") -} -func (*UnimplementedAutokeyAdminServer) ShowEffectiveAutokeyConfig(context.Context, *ShowEffectiveAutokeyConfigRequest) (*ShowEffectiveAutokeyConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ShowEffectiveAutokeyConfig not implemented") -} - -func RegisterAutokeyAdminServer(s *grpc.Server, srv AutokeyAdminServer) { - s.RegisterService(&_AutokeyAdmin_serviceDesc, srv) -} - -func _AutokeyAdmin_UpdateAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAutokeyConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyAdminServer).UpdateAutokeyConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.AutokeyAdmin/UpdateAutokeyConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyAdminServer).UpdateAutokeyConfig(ctx, req.(*UpdateAutokeyConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AutokeyAdmin_GetAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAutokeyConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyAdminServer).GetAutokeyConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyAdminServer).GetAutokeyConfig(ctx, req.(*GetAutokeyConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AutokeyAdmin_ShowEffectiveAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ShowEffectiveAutokeyConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AutokeyAdminServer).ShowEffectiveAutokeyConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.AutokeyAdmin/ShowEffectiveAutokeyConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AutokeyAdminServer).ShowEffectiveAutokeyConfig(ctx, req.(*ShowEffectiveAutokeyConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AutokeyAdmin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.kms.v1.AutokeyAdmin", - HandlerType: (*AutokeyAdminServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateAutokeyConfig", - Handler: _AutokeyAdmin_UpdateAutokeyConfig_Handler, - }, - { - MethodName: "GetAutokeyConfig", - Handler: _AutokeyAdmin_GetAutokeyConfig_Handler, - }, - { - MethodName: "ShowEffectiveAutokeyConfig", - Handler: _AutokeyAdmin_ShowEffectiveAutokeyConfig_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/kms/v1/autokey_admin.proto", -} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin_grpc.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin_grpc.pb.go new file mode 100644 index 0000000000..40fa0dc918 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_admin_grpc.pb.go @@ -0,0 +1,216 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/kms/v1/autokey_admin.proto + +package kmspb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AutokeyAdmin_UpdateAutokeyConfig_FullMethodName = "/google.cloud.kms.v1.AutokeyAdmin/UpdateAutokeyConfig" + AutokeyAdmin_GetAutokeyConfig_FullMethodName = "/google.cloud.kms.v1.AutokeyAdmin/GetAutokeyConfig" + AutokeyAdmin_ShowEffectiveAutokeyConfig_FullMethodName = "/google.cloud.kms.v1.AutokeyAdmin/ShowEffectiveAutokeyConfig" +) + +// AutokeyAdminClient is the client API for AutokeyAdmin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AutokeyAdminClient interface { + // Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a + // folder. The caller must have both `cloudkms.autokeyConfigs.update` + // permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy` + // permission on the provided key project. A + // [KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's + // descendant projects will use this configuration to determine where to + // create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. + UpdateAutokeyConfig(ctx context.Context, in *UpdateAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) + // Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a + // folder. + GetAutokeyConfig(ctx context.Context, in *GetAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) + // Returns the effective Cloud KMS Autokey configuration for a given project. + ShowEffectiveAutokeyConfig(ctx context.Context, in *ShowEffectiveAutokeyConfigRequest, opts ...grpc.CallOption) (*ShowEffectiveAutokeyConfigResponse, error) +} + +type autokeyAdminClient struct { + cc grpc.ClientConnInterface +} + +func NewAutokeyAdminClient(cc grpc.ClientConnInterface) AutokeyAdminClient { + return &autokeyAdminClient{cc} +} + +func (c *autokeyAdminClient) UpdateAutokeyConfig(ctx context.Context, in *UpdateAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) { + out := new(AutokeyConfig) + err := c.cc.Invoke(ctx, AutokeyAdmin_UpdateAutokeyConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autokeyAdminClient) GetAutokeyConfig(ctx context.Context, in *GetAutokeyConfigRequest, opts ...grpc.CallOption) (*AutokeyConfig, error) { + out := new(AutokeyConfig) + err := c.cc.Invoke(ctx, AutokeyAdmin_GetAutokeyConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autokeyAdminClient) ShowEffectiveAutokeyConfig(ctx context.Context, in *ShowEffectiveAutokeyConfigRequest, opts ...grpc.CallOption) (*ShowEffectiveAutokeyConfigResponse, error) { + out := new(ShowEffectiveAutokeyConfigResponse) + err := c.cc.Invoke(ctx, AutokeyAdmin_ShowEffectiveAutokeyConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AutokeyAdminServer is the server API for AutokeyAdmin service. +// All implementations should embed UnimplementedAutokeyAdminServer +// for forward compatibility +type AutokeyAdminServer interface { + // Updates the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a + // folder. The caller must have both `cloudkms.autokeyConfigs.update` + // permission on the parent folder and `cloudkms.cryptoKeys.setIamPolicy` + // permission on the provided key project. A + // [KeyHandle][google.cloud.kms.v1.KeyHandle] creation in the folder's + // descendant projects will use this configuration to determine where to + // create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey]. + UpdateAutokeyConfig(context.Context, *UpdateAutokeyConfigRequest) (*AutokeyConfig, error) + // Returns the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig] for a + // folder. + GetAutokeyConfig(context.Context, *GetAutokeyConfigRequest) (*AutokeyConfig, error) + // Returns the effective Cloud KMS Autokey configuration for a given project. + ShowEffectiveAutokeyConfig(context.Context, *ShowEffectiveAutokeyConfigRequest) (*ShowEffectiveAutokeyConfigResponse, error) +} + +// UnimplementedAutokeyAdminServer should be embedded to have forward compatible implementations. +type UnimplementedAutokeyAdminServer struct { +} + +func (UnimplementedAutokeyAdminServer) UpdateAutokeyConfig(context.Context, *UpdateAutokeyConfigRequest) (*AutokeyConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAutokeyConfig not implemented") +} +func (UnimplementedAutokeyAdminServer) GetAutokeyConfig(context.Context, *GetAutokeyConfigRequest) (*AutokeyConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAutokeyConfig not implemented") +} +func (UnimplementedAutokeyAdminServer) ShowEffectiveAutokeyConfig(context.Context, *ShowEffectiveAutokeyConfigRequest) (*ShowEffectiveAutokeyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShowEffectiveAutokeyConfig not implemented") +} + +// UnsafeAutokeyAdminServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AutokeyAdminServer will +// result in compilation errors. +type UnsafeAutokeyAdminServer interface { + mustEmbedUnimplementedAutokeyAdminServer() +} + +func RegisterAutokeyAdminServer(s grpc.ServiceRegistrar, srv AutokeyAdminServer) { + s.RegisterService(&AutokeyAdmin_ServiceDesc, srv) +} + +func _AutokeyAdmin_UpdateAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAutokeyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyAdminServer).UpdateAutokeyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutokeyAdmin_UpdateAutokeyConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyAdminServer).UpdateAutokeyConfig(ctx, req.(*UpdateAutokeyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutokeyAdmin_GetAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAutokeyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyAdminServer).GetAutokeyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutokeyAdmin_GetAutokeyConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyAdminServer).GetAutokeyConfig(ctx, req.(*GetAutokeyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutokeyAdmin_ShowEffectiveAutokeyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ShowEffectiveAutokeyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyAdminServer).ShowEffectiveAutokeyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AutokeyAdmin_ShowEffectiveAutokeyConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyAdminServer).ShowEffectiveAutokeyConfig(ctx, req.(*ShowEffectiveAutokeyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AutokeyAdmin_ServiceDesc is the grpc.ServiceDesc for AutokeyAdmin service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AutokeyAdmin_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.kms.v1.AutokeyAdmin", + HandlerType: (*AutokeyAdminServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateAutokeyConfig", + Handler: _AutokeyAdmin_UpdateAutokeyConfig_Handler, + }, + { + MethodName: "GetAutokeyConfig", + Handler: _AutokeyAdmin_GetAutokeyConfig_Handler, + }, + { + MethodName: "ShowEffectiveAutokeyConfig", + Handler: _AutokeyAdmin_ShowEffectiveAutokeyConfig_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/kms/v1/autokey_admin.proto", +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_grpc.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_grpc.pb.go new file mode 100644 index 0000000000..323e72ab80 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/autokey_grpc.pb.go @@ -0,0 +1,215 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/kms/v1/autokey.proto + +package kmspb + +import ( + context "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Autokey_CreateKeyHandle_FullMethodName = "/google.cloud.kms.v1.Autokey/CreateKeyHandle" + Autokey_GetKeyHandle_FullMethodName = "/google.cloud.kms.v1.Autokey/GetKeyHandle" + Autokey_ListKeyHandles_FullMethodName = "/google.cloud.kms.v1.Autokey/ListKeyHandles" +) + +// AutokeyClient is the client API for Autokey service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AutokeyClient interface { + // Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the + // provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK + // use with the given resource type in the configured key project and the same + // location. [GetOperation][google.longrunning.Operations.GetOperation] should + // be used to resolve the resulting long-running operation and get the + // resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + CreateKeyHandle(ctx context.Context, in *CreateKeyHandleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. + GetKeyHandle(ctx context.Context, in *GetKeyHandleRequest, opts ...grpc.CallOption) (*KeyHandle, error) + // Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. + ListKeyHandles(ctx context.Context, in *ListKeyHandlesRequest, opts ...grpc.CallOption) (*ListKeyHandlesResponse, error) +} + +type autokeyClient struct { + cc grpc.ClientConnInterface +} + +func NewAutokeyClient(cc grpc.ClientConnInterface) AutokeyClient { + return &autokeyClient{cc} +} + +func (c *autokeyClient) CreateKeyHandle(ctx context.Context, in *CreateKeyHandleRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, Autokey_CreateKeyHandle_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autokeyClient) GetKeyHandle(ctx context.Context, in *GetKeyHandleRequest, opts ...grpc.CallOption) (*KeyHandle, error) { + out := new(KeyHandle) + err := c.cc.Invoke(ctx, Autokey_GetKeyHandle_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autokeyClient) ListKeyHandles(ctx context.Context, in *ListKeyHandlesRequest, opts ...grpc.CallOption) (*ListKeyHandlesResponse, error) { + out := new(ListKeyHandlesResponse) + err := c.cc.Invoke(ctx, Autokey_ListKeyHandles_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AutokeyServer is the server API for Autokey service. +// All implementations should embed UnimplementedAutokeyServer +// for forward compatibility +type AutokeyServer interface { + // Creates a new [KeyHandle][google.cloud.kms.v1.KeyHandle], triggering the + // provisioning of a new [CryptoKey][google.cloud.kms.v1.CryptoKey] for CMEK + // use with the given resource type in the configured key project and the same + // location. [GetOperation][google.longrunning.Operations.GetOperation] should + // be used to resolve the resulting long-running operation and get the + // resulting [KeyHandle][google.cloud.kms.v1.KeyHandle] and + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + CreateKeyHandle(context.Context, *CreateKeyHandleRequest) (*longrunningpb.Operation, error) + // Returns the [KeyHandle][google.cloud.kms.v1.KeyHandle]. + GetKeyHandle(context.Context, *GetKeyHandleRequest) (*KeyHandle, error) + // Lists [KeyHandles][google.cloud.kms.v1.KeyHandle]. + ListKeyHandles(context.Context, *ListKeyHandlesRequest) (*ListKeyHandlesResponse, error) +} + +// UnimplementedAutokeyServer should be embedded to have forward compatible implementations. +type UnimplementedAutokeyServer struct { +} + +func (UnimplementedAutokeyServer) CreateKeyHandle(context.Context, *CreateKeyHandleRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateKeyHandle not implemented") +} +func (UnimplementedAutokeyServer) GetKeyHandle(context.Context, *GetKeyHandleRequest) (*KeyHandle, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKeyHandle not implemented") +} +func (UnimplementedAutokeyServer) ListKeyHandles(context.Context, *ListKeyHandlesRequest) (*ListKeyHandlesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyHandles not implemented") +} + +// UnsafeAutokeyServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AutokeyServer will +// result in compilation errors. +type UnsafeAutokeyServer interface { + mustEmbedUnimplementedAutokeyServer() +} + +func RegisterAutokeyServer(s grpc.ServiceRegistrar, srv AutokeyServer) { + s.RegisterService(&Autokey_ServiceDesc, srv) +} + +func _Autokey_CreateKeyHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateKeyHandleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyServer).CreateKeyHandle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Autokey_CreateKeyHandle_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyServer).CreateKeyHandle(ctx, req.(*CreateKeyHandleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Autokey_GetKeyHandle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKeyHandleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyServer).GetKeyHandle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Autokey_GetKeyHandle_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyServer).GetKeyHandle(ctx, req.(*GetKeyHandleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Autokey_ListKeyHandles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeyHandlesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutokeyServer).ListKeyHandles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Autokey_ListKeyHandles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutokeyServer).ListKeyHandles(ctx, req.(*ListKeyHandlesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Autokey_ServiceDesc is the grpc.ServiceDesc for Autokey service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Autokey_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.kms.v1.Autokey", + HandlerType: (*AutokeyServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateKeyHandle", + Handler: _Autokey_CreateKeyHandle_Handler, + }, + { + MethodName: "GetKeyHandle", + Handler: _Autokey_GetKeyHandle_Handler, + }, + { + MethodName: "ListKeyHandles", + Handler: _Autokey_ListKeyHandles_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/kms/v1/autokey.proto", +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go index 13f4e25241..73af2e9fc2 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service.pb.go @@ -21,17 +21,14 @@ package kmspb import ( - context "context" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -1458,329 +1455,3 @@ func file_google_cloud_kms_v1_ekm_service_proto_init() { file_google_cloud_kms_v1_ekm_service_proto_goTypes = nil file_google_cloud_kms_v1_ekm_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// EkmServiceClient is the client API for EkmService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EkmServiceClient interface { - // Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. - ListEkmConnections(ctx context.Context, in *ListEkmConnectionsRequest, opts ...grpc.CallOption) (*ListEkmConnectionsResponse, error) - // Returns metadata for a given - // [EkmConnection][google.cloud.kms.v1.EkmConnection]. - GetEkmConnection(ctx context.Context, in *GetEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) - // Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given - // Project and Location. - CreateEkmConnection(ctx context.Context, in *CreateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) - // Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. - UpdateEkmConnection(ctx context.Context, in *UpdateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) - // Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - // for a given project and location. - GetEkmConfig(ctx context.Context, in *GetEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) - // Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - // for a given project and location. - UpdateEkmConfig(ctx context.Context, in *UpdateEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) - // Verifies that Cloud KMS can successfully connect to the external key - // manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. - // If there is an error connecting to the EKM, this method returns a - // FAILED_PRECONDITION status containing structured information as described - // at https://cloud.google.com/kms/docs/reference/ekm_errors. - VerifyConnectivity(ctx context.Context, in *VerifyConnectivityRequest, opts ...grpc.CallOption) (*VerifyConnectivityResponse, error) -} - -type ekmServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEkmServiceClient(cc grpc.ClientConnInterface) EkmServiceClient { - return &ekmServiceClient{cc} -} - -func (c *ekmServiceClient) ListEkmConnections(ctx context.Context, in *ListEkmConnectionsRequest, opts ...grpc.CallOption) (*ListEkmConnectionsResponse, error) { - out := new(ListEkmConnectionsResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/ListEkmConnections", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) GetEkmConnection(ctx context.Context, in *GetEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { - out := new(EkmConnection) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/GetEkmConnection", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) CreateEkmConnection(ctx context.Context, in *CreateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { - out := new(EkmConnection) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/CreateEkmConnection", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) UpdateEkmConnection(ctx context.Context, in *UpdateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { - out := new(EkmConnection) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/UpdateEkmConnection", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) GetEkmConfig(ctx context.Context, in *GetEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) { - out := new(EkmConfig) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/GetEkmConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) UpdateEkmConfig(ctx context.Context, in *UpdateEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) { - out := new(EkmConfig) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/UpdateEkmConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ekmServiceClient) VerifyConnectivity(ctx context.Context, in *VerifyConnectivityRequest, opts ...grpc.CallOption) (*VerifyConnectivityResponse, error) { - out := new(VerifyConnectivityResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.EkmService/VerifyConnectivity", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EkmServiceServer is the server API for EkmService service. -type EkmServiceServer interface { - // Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. - ListEkmConnections(context.Context, *ListEkmConnectionsRequest) (*ListEkmConnectionsResponse, error) - // Returns metadata for a given - // [EkmConnection][google.cloud.kms.v1.EkmConnection]. - GetEkmConnection(context.Context, *GetEkmConnectionRequest) (*EkmConnection, error) - // Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given - // Project and Location. - CreateEkmConnection(context.Context, *CreateEkmConnectionRequest) (*EkmConnection, error) - // Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. - UpdateEkmConnection(context.Context, *UpdateEkmConnectionRequest) (*EkmConnection, error) - // Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - // for a given project and location. - GetEkmConfig(context.Context, *GetEkmConfigRequest) (*EkmConfig, error) - // Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource - // for a given project and location. - UpdateEkmConfig(context.Context, *UpdateEkmConfigRequest) (*EkmConfig, error) - // Verifies that Cloud KMS can successfully connect to the external key - // manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. - // If there is an error connecting to the EKM, this method returns a - // FAILED_PRECONDITION status containing structured information as described - // at https://cloud.google.com/kms/docs/reference/ekm_errors. - VerifyConnectivity(context.Context, *VerifyConnectivityRequest) (*VerifyConnectivityResponse, error) -} - -// UnimplementedEkmServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEkmServiceServer struct { -} - -func (*UnimplementedEkmServiceServer) ListEkmConnections(context.Context, *ListEkmConnectionsRequest) (*ListEkmConnectionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEkmConnections not implemented") -} -func (*UnimplementedEkmServiceServer) GetEkmConnection(context.Context, *GetEkmConnectionRequest) (*EkmConnection, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEkmConnection not implemented") -} -func (*UnimplementedEkmServiceServer) CreateEkmConnection(context.Context, *CreateEkmConnectionRequest) (*EkmConnection, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateEkmConnection not implemented") -} -func (*UnimplementedEkmServiceServer) UpdateEkmConnection(context.Context, *UpdateEkmConnectionRequest) (*EkmConnection, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEkmConnection not implemented") -} -func (*UnimplementedEkmServiceServer) GetEkmConfig(context.Context, *GetEkmConfigRequest) (*EkmConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEkmConfig not implemented") -} -func (*UnimplementedEkmServiceServer) UpdateEkmConfig(context.Context, *UpdateEkmConfigRequest) (*EkmConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEkmConfig not implemented") -} -func (*UnimplementedEkmServiceServer) VerifyConnectivity(context.Context, *VerifyConnectivityRequest) (*VerifyConnectivityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyConnectivity not implemented") -} - -func RegisterEkmServiceServer(s *grpc.Server, srv EkmServiceServer) { - s.RegisterService(&_EkmService_serviceDesc, srv) -} - -func _EkmService_ListEkmConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListEkmConnectionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).ListEkmConnections(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/ListEkmConnections", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).ListEkmConnections(ctx, req.(*ListEkmConnectionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_GetEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetEkmConnectionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).GetEkmConnection(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/GetEkmConnection", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).GetEkmConnection(ctx, req.(*GetEkmConnectionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_CreateEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateEkmConnectionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).CreateEkmConnection(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/CreateEkmConnection", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).CreateEkmConnection(ctx, req.(*CreateEkmConnectionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_UpdateEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEkmConnectionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).UpdateEkmConnection(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/UpdateEkmConnection", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).UpdateEkmConnection(ctx, req.(*UpdateEkmConnectionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_GetEkmConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetEkmConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).GetEkmConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/GetEkmConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).GetEkmConfig(ctx, req.(*GetEkmConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_UpdateEkmConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEkmConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).UpdateEkmConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/UpdateEkmConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).UpdateEkmConfig(ctx, req.(*UpdateEkmConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _EkmService_VerifyConnectivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyConnectivityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EkmServiceServer).VerifyConnectivity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.EkmService/VerifyConnectivity", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EkmServiceServer).VerifyConnectivity(ctx, req.(*VerifyConnectivityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _EkmService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.kms.v1.EkmService", - HandlerType: (*EkmServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListEkmConnections", - Handler: _EkmService_ListEkmConnections_Handler, - }, - { - MethodName: "GetEkmConnection", - Handler: _EkmService_GetEkmConnection_Handler, - }, - { - MethodName: "CreateEkmConnection", - Handler: _EkmService_CreateEkmConnection_Handler, - }, - { - MethodName: "UpdateEkmConnection", - Handler: _EkmService_UpdateEkmConnection_Handler, - }, - { - MethodName: "GetEkmConfig", - Handler: _EkmService_GetEkmConfig_Handler, - }, - { - MethodName: "UpdateEkmConfig", - Handler: _EkmService_UpdateEkmConfig_Handler, - }, - { - MethodName: "VerifyConnectivity", - Handler: _EkmService_VerifyConnectivity_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/kms/v1/ekm_service.proto", -} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service_grpc.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service_grpc.pb.go new file mode 100644 index 0000000000..57506c0da5 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/ekm_service_grpc.pb.go @@ -0,0 +1,374 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/kms/v1/ekm_service.proto + +package kmspb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + EkmService_ListEkmConnections_FullMethodName = "/google.cloud.kms.v1.EkmService/ListEkmConnections" + EkmService_GetEkmConnection_FullMethodName = "/google.cloud.kms.v1.EkmService/GetEkmConnection" + EkmService_CreateEkmConnection_FullMethodName = "/google.cloud.kms.v1.EkmService/CreateEkmConnection" + EkmService_UpdateEkmConnection_FullMethodName = "/google.cloud.kms.v1.EkmService/UpdateEkmConnection" + EkmService_GetEkmConfig_FullMethodName = "/google.cloud.kms.v1.EkmService/GetEkmConfig" + EkmService_UpdateEkmConfig_FullMethodName = "/google.cloud.kms.v1.EkmService/UpdateEkmConfig" + EkmService_VerifyConnectivity_FullMethodName = "/google.cloud.kms.v1.EkmService/VerifyConnectivity" +) + +// EkmServiceClient is the client API for EkmService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type EkmServiceClient interface { + // Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. + ListEkmConnections(ctx context.Context, in *ListEkmConnectionsRequest, opts ...grpc.CallOption) (*ListEkmConnectionsResponse, error) + // Returns metadata for a given + // [EkmConnection][google.cloud.kms.v1.EkmConnection]. + GetEkmConnection(ctx context.Context, in *GetEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) + // Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given + // Project and Location. + CreateEkmConnection(ctx context.Context, in *CreateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) + // Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. + UpdateEkmConnection(ctx context.Context, in *UpdateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) + // Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + // for a given project and location. + GetEkmConfig(ctx context.Context, in *GetEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) + // Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + // for a given project and location. + UpdateEkmConfig(ctx context.Context, in *UpdateEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) + // Verifies that Cloud KMS can successfully connect to the external key + // manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. + // If there is an error connecting to the EKM, this method returns a + // FAILED_PRECONDITION status containing structured information as described + // at https://cloud.google.com/kms/docs/reference/ekm_errors. + VerifyConnectivity(ctx context.Context, in *VerifyConnectivityRequest, opts ...grpc.CallOption) (*VerifyConnectivityResponse, error) +} + +type ekmServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEkmServiceClient(cc grpc.ClientConnInterface) EkmServiceClient { + return &ekmServiceClient{cc} +} + +func (c *ekmServiceClient) ListEkmConnections(ctx context.Context, in *ListEkmConnectionsRequest, opts ...grpc.CallOption) (*ListEkmConnectionsResponse, error) { + out := new(ListEkmConnectionsResponse) + err := c.cc.Invoke(ctx, EkmService_ListEkmConnections_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) GetEkmConnection(ctx context.Context, in *GetEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { + out := new(EkmConnection) + err := c.cc.Invoke(ctx, EkmService_GetEkmConnection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) CreateEkmConnection(ctx context.Context, in *CreateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { + out := new(EkmConnection) + err := c.cc.Invoke(ctx, EkmService_CreateEkmConnection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) UpdateEkmConnection(ctx context.Context, in *UpdateEkmConnectionRequest, opts ...grpc.CallOption) (*EkmConnection, error) { + out := new(EkmConnection) + err := c.cc.Invoke(ctx, EkmService_UpdateEkmConnection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) GetEkmConfig(ctx context.Context, in *GetEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) { + out := new(EkmConfig) + err := c.cc.Invoke(ctx, EkmService_GetEkmConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) UpdateEkmConfig(ctx context.Context, in *UpdateEkmConfigRequest, opts ...grpc.CallOption) (*EkmConfig, error) { + out := new(EkmConfig) + err := c.cc.Invoke(ctx, EkmService_UpdateEkmConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ekmServiceClient) VerifyConnectivity(ctx context.Context, in *VerifyConnectivityRequest, opts ...grpc.CallOption) (*VerifyConnectivityResponse, error) { + out := new(VerifyConnectivityResponse) + err := c.cc.Invoke(ctx, EkmService_VerifyConnectivity_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EkmServiceServer is the server API for EkmService service. +// All implementations should embed UnimplementedEkmServiceServer +// for forward compatibility +type EkmServiceServer interface { + // Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. + ListEkmConnections(context.Context, *ListEkmConnectionsRequest) (*ListEkmConnectionsResponse, error) + // Returns metadata for a given + // [EkmConnection][google.cloud.kms.v1.EkmConnection]. + GetEkmConnection(context.Context, *GetEkmConnectionRequest) (*EkmConnection, error) + // Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given + // Project and Location. + CreateEkmConnection(context.Context, *CreateEkmConnectionRequest) (*EkmConnection, error) + // Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. + UpdateEkmConnection(context.Context, *UpdateEkmConnectionRequest) (*EkmConnection, error) + // Returns the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + // for a given project and location. + GetEkmConfig(context.Context, *GetEkmConfigRequest) (*EkmConfig, error) + // Updates the [EkmConfig][google.cloud.kms.v1.EkmConfig] singleton resource + // for a given project and location. + UpdateEkmConfig(context.Context, *UpdateEkmConfigRequest) (*EkmConfig, error) + // Verifies that Cloud KMS can successfully connect to the external key + // manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. + // If there is an error connecting to the EKM, this method returns a + // FAILED_PRECONDITION status containing structured information as described + // at https://cloud.google.com/kms/docs/reference/ekm_errors. + VerifyConnectivity(context.Context, *VerifyConnectivityRequest) (*VerifyConnectivityResponse, error) +} + +// UnimplementedEkmServiceServer should be embedded to have forward compatible implementations. +type UnimplementedEkmServiceServer struct { +} + +func (UnimplementedEkmServiceServer) ListEkmConnections(context.Context, *ListEkmConnectionsRequest) (*ListEkmConnectionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEkmConnections not implemented") +} +func (UnimplementedEkmServiceServer) GetEkmConnection(context.Context, *GetEkmConnectionRequest) (*EkmConnection, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEkmConnection not implemented") +} +func (UnimplementedEkmServiceServer) CreateEkmConnection(context.Context, *CreateEkmConnectionRequest) (*EkmConnection, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEkmConnection not implemented") +} +func (UnimplementedEkmServiceServer) UpdateEkmConnection(context.Context, *UpdateEkmConnectionRequest) (*EkmConnection, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEkmConnection not implemented") +} +func (UnimplementedEkmServiceServer) GetEkmConfig(context.Context, *GetEkmConfigRequest) (*EkmConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEkmConfig not implemented") +} +func (UnimplementedEkmServiceServer) UpdateEkmConfig(context.Context, *UpdateEkmConfigRequest) (*EkmConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEkmConfig not implemented") +} +func (UnimplementedEkmServiceServer) VerifyConnectivity(context.Context, *VerifyConnectivityRequest) (*VerifyConnectivityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyConnectivity not implemented") +} + +// UnsafeEkmServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EkmServiceServer will +// result in compilation errors. +type UnsafeEkmServiceServer interface { + mustEmbedUnimplementedEkmServiceServer() +} + +func RegisterEkmServiceServer(s grpc.ServiceRegistrar, srv EkmServiceServer) { + s.RegisterService(&EkmService_ServiceDesc, srv) +} + +func _EkmService_ListEkmConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEkmConnectionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).ListEkmConnections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_ListEkmConnections_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).ListEkmConnections(ctx, req.(*ListEkmConnectionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_GetEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEkmConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).GetEkmConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_GetEkmConnection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).GetEkmConnection(ctx, req.(*GetEkmConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_CreateEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEkmConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).CreateEkmConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_CreateEkmConnection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).CreateEkmConnection(ctx, req.(*CreateEkmConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_UpdateEkmConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEkmConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).UpdateEkmConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_UpdateEkmConnection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).UpdateEkmConnection(ctx, req.(*UpdateEkmConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_GetEkmConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEkmConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).GetEkmConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_GetEkmConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).GetEkmConfig(ctx, req.(*GetEkmConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_UpdateEkmConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEkmConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).UpdateEkmConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_UpdateEkmConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).UpdateEkmConfig(ctx, req.(*UpdateEkmConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EkmService_VerifyConnectivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyConnectivityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EkmServiceServer).VerifyConnectivity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EkmService_VerifyConnectivity_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EkmServiceServer).VerifyConnectivity(ctx, req.(*VerifyConnectivityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// EkmService_ServiceDesc is the grpc.ServiceDesc for EkmService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EkmService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.kms.v1.EkmService", + HandlerType: (*EkmServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListEkmConnections", + Handler: _EkmService_ListEkmConnections_Handler, + }, + { + MethodName: "GetEkmConnection", + Handler: _EkmService_GetEkmConnection_Handler, + }, + { + MethodName: "CreateEkmConnection", + Handler: _EkmService_CreateEkmConnection_Handler, + }, + { + MethodName: "UpdateEkmConnection", + Handler: _EkmService_UpdateEkmConnection_Handler, + }, + { + MethodName: "GetEkmConfig", + Handler: _EkmService_GetEkmConfig_Handler, + }, + { + MethodName: "UpdateEkmConfig", + Handler: _EkmService_UpdateEkmConfig_Handler, + }, + { + MethodName: "VerifyConnectivity", + Handler: _EkmService_VerifyConnectivity_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/kms/v1/ekm_service.proto", +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management.pb.go new file mode 100644 index 0000000000..27640a8c6b --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management.pb.go @@ -0,0 +1,3442 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/kms/v1/hsm_management.proto + +package kmspb + +import ( + reflect "reflect" + sync "sync" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The set of states of a +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +type SingleTenantHsmInstance_State int32 + +const ( + // Not specified. + SingleTenantHsmInstance_STATE_UNSPECIFIED SingleTenantHsmInstance_State = 0 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // being created. + SingleTenantHsmInstance_CREATING SingleTenantHsmInstance_State = 1 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // waiting for 2FA keys to be registered. This can be done by calling + // [CreateSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal] + // with the [RegisterTwoFactorAuthKeys][] operation. + SingleTenantHsmInstance_PENDING_TWO_FACTOR_AUTH_REGISTRATION SingleTenantHsmInstance_State = 2 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // ready to use. A + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + // for all [CryptoKeys][google.cloud.kms.v1.CryptoKey] created within the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] to + // be usable. + SingleTenantHsmInstance_ACTIVE SingleTenantHsmInstance_State = 3 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // being disabled. + SingleTenantHsmInstance_DISABLING SingleTenantHsmInstance_State = 4 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // disabled. + SingleTenantHsmInstance_DISABLED SingleTenantHsmInstance_State = 5 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] is + // being deleted. Requests to the instance will be rejected in this state. + SingleTenantHsmInstance_DELETING SingleTenantHsmInstance_State = 6 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // has been deleted. + SingleTenantHsmInstance_DELETED SingleTenantHsmInstance_State = 7 + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // has failed and can not be recovered or used. + SingleTenantHsmInstance_FAILED SingleTenantHsmInstance_State = 8 +) + +// Enum value maps for SingleTenantHsmInstance_State. +var ( + SingleTenantHsmInstance_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "PENDING_TWO_FACTOR_AUTH_REGISTRATION", + 3: "ACTIVE", + 4: "DISABLING", + 5: "DISABLED", + 6: "DELETING", + 7: "DELETED", + 8: "FAILED", + } + SingleTenantHsmInstance_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "PENDING_TWO_FACTOR_AUTH_REGISTRATION": 2, + "ACTIVE": 3, + "DISABLING": 4, + "DISABLED": 5, + "DELETING": 6, + "DELETED": 7, + "FAILED": 8, + } +) + +func (x SingleTenantHsmInstance_State) Enum() *SingleTenantHsmInstance_State { + p := new(SingleTenantHsmInstance_State) + *p = x + return p +} + +func (x SingleTenantHsmInstance_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SingleTenantHsmInstance_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_kms_v1_hsm_management_proto_enumTypes[0].Descriptor() +} + +func (SingleTenantHsmInstance_State) Type() protoreflect.EnumType { + return &file_google_cloud_kms_v1_hsm_management_proto_enumTypes[0] +} + +func (x SingleTenantHsmInstance_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SingleTenantHsmInstance_State.Descriptor instead. +func (SingleTenantHsmInstance_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{0, 0} +} + +// The set of states of a +// [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. +type SingleTenantHsmInstanceProposal_State int32 + +const ( + // Not specified. + SingleTenantHsmInstanceProposal_STATE_UNSPECIFIED SingleTenantHsmInstanceProposal_State = 0 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // is being created. + SingleTenantHsmInstanceProposal_CREATING SingleTenantHsmInstanceProposal_State = 1 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // is pending approval. + SingleTenantHsmInstanceProposal_PENDING SingleTenantHsmInstanceProposal_State = 2 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // has been approved. + SingleTenantHsmInstanceProposal_APPROVED SingleTenantHsmInstanceProposal_State = 3 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // is being executed. + SingleTenantHsmInstanceProposal_RUNNING SingleTenantHsmInstanceProposal_State = 4 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // has been executed successfully. + SingleTenantHsmInstanceProposal_SUCCEEDED SingleTenantHsmInstanceProposal_State = 5 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // has failed. + SingleTenantHsmInstanceProposal_FAILED SingleTenantHsmInstanceProposal_State = 6 + // The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // has been deleted and will be purged after the purge_time. + SingleTenantHsmInstanceProposal_DELETED SingleTenantHsmInstanceProposal_State = 7 +) + +// Enum value maps for SingleTenantHsmInstanceProposal_State. +var ( + SingleTenantHsmInstanceProposal_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "PENDING", + 3: "APPROVED", + 4: "RUNNING", + 5: "SUCCEEDED", + 6: "FAILED", + 7: "DELETED", + } + SingleTenantHsmInstanceProposal_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "PENDING": 2, + "APPROVED": 3, + "RUNNING": 4, + "SUCCEEDED": 5, + "FAILED": 6, + "DELETED": 7, + } +) + +func (x SingleTenantHsmInstanceProposal_State) Enum() *SingleTenantHsmInstanceProposal_State { + p := new(SingleTenantHsmInstanceProposal_State) + *p = x + return p +} + +func (x SingleTenantHsmInstanceProposal_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SingleTenantHsmInstanceProposal_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_kms_v1_hsm_management_proto_enumTypes[1].Descriptor() +} + +func (SingleTenantHsmInstanceProposal_State) Type() protoreflect.EnumType { + return &file_google_cloud_kms_v1_hsm_management_proto_enumTypes[1] +} + +func (x SingleTenantHsmInstanceProposal_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_State.Descriptor instead. +func (SingleTenantHsmInstanceProposal_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 0} +} + +// A [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] +// represents a single-tenant HSM instance. It can be used for creating +// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with a +// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of +// [HSM_SINGLE_TENANT][CryptoKeyVersion.ProtectionLevel.HSM_SINGLE_TENANT], as +// well as performing cryptographic operations using keys created within the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +type SingleTenantHsmInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The resource name for this + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + // the format `projects/*/locations/*/singleTenantHsmInstances/*`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The time at which the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + // created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The state of the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + State SingleTenantHsmInstance_State `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.kms.v1.SingleTenantHsmInstance_State" json:"state,omitempty"` + // Required. The quorum auth configuration for the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + QuorumAuth *SingleTenantHsmInstance_QuorumAuth `protobuf:"bytes,4,opt,name=quorum_auth,json=quorumAuth,proto3" json:"quorum_auth,omitempty"` + // Output only. The time at which the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] was + // deleted. + DeleteTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` + // Output only. The system-defined duration that an instance can remain + // unrefreshed until it is automatically disabled. This will have a value of + // 120 days. + UnrefreshedDurationUntilDisable *durationpb.Duration `protobuf:"bytes,6,opt,name=unrefreshed_duration_until_disable,json=unrefreshedDurationUntilDisable,proto3" json:"unrefreshed_duration_until_disable,omitempty"` + // Output only. The time at which the instance will be automatically disabled + // if not refreshed. This field is updated upon creation and after each + // successful refresh operation and enable. A + // [RefreshSingleTenantHsmInstance][] operation must be made via a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // before this time otherwise the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will + // become disabled. + DisableTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=disable_time,json=disableTime,proto3" json:"disable_time,omitempty"` +} + +func (x *SingleTenantHsmInstance) Reset() { + *x = SingleTenantHsmInstance{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstance) ProtoMessage() {} + +func (x *SingleTenantHsmInstance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstance.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstance) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{0} +} + +func (x *SingleTenantHsmInstance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SingleTenantHsmInstance) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *SingleTenantHsmInstance) GetState() SingleTenantHsmInstance_State { + if x != nil { + return x.State + } + return SingleTenantHsmInstance_STATE_UNSPECIFIED +} + +func (x *SingleTenantHsmInstance) GetQuorumAuth() *SingleTenantHsmInstance_QuorumAuth { + if x != nil { + return x.QuorumAuth + } + return nil +} + +func (x *SingleTenantHsmInstance) GetDeleteTime() *timestamppb.Timestamp { + if x != nil { + return x.DeleteTime + } + return nil +} + +func (x *SingleTenantHsmInstance) GetUnrefreshedDurationUntilDisable() *durationpb.Duration { + if x != nil { + return x.UnrefreshedDurationUntilDisable + } + return nil +} + +func (x *SingleTenantHsmInstance) GetDisableTime() *timestamppb.Timestamp { + if x != nil { + return x.DisableTime + } + return nil +} + +// A +// [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] +// represents a proposal to perform an operation on a +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +type SingleTenantHsmInstanceProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The resource name for this + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in + // the format `projects/*/locations/*/singleTenantHsmInstances/*/proposals/*`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The time at which the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The state of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + State SingleTenantHsmInstanceProposal_State `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.kms.v1.SingleTenantHsmInstanceProposal_State" json:"state,omitempty"` + // Output only. The root cause of the most recent failure. Only present if + // [state][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state] is + // [FAILED][SingleTenantHsmInstanceProposal.FAILED]. + FailureReason string `protobuf:"bytes,4,opt,name=failure_reason,json=failureReason,proto3" json:"failure_reason,omitempty"` + // The approval parameters for the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + // The type of parameters is determined by the operation being proposed. + // + // Types that are assignable to ApprovalParameters: + // + // *SingleTenantHsmInstanceProposal_QuorumParameters_ + // *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters_ + ApprovalParameters isSingleTenantHsmInstanceProposal_ApprovalParameters `protobuf_oneof:"approval_parameters"` + // The expiration of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + // If not set, the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // will expire in 1 day. The maximum expire time is 7 days. The minimum expire + // time is 5 minutes. + // + // Types that are assignable to Expiration: + // + // *SingleTenantHsmInstanceProposal_ExpireTime + // *SingleTenantHsmInstanceProposal_Ttl + Expiration isSingleTenantHsmInstanceProposal_Expiration `protobuf_oneof:"expiration"` + // Output only. The time at which the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // was deleted. + DeleteTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` + // Output only. The time at which the soft-deleted + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // will be permanently purged. This field is only populated + // when the state is DELETED and will be set a time after expiration of the + // proposal, i.e. >= expire_time or (create_time + ttl). + PurgeTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=purge_time,json=purgeTime,proto3" json:"purge_time,omitempty"` + // The operation to perform on the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // + // Types that are assignable to Operation: + // + // *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys_ + // *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance_ + // *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance_ + // *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance_ + // *SingleTenantHsmInstanceProposal_AddQuorumMember_ + // *SingleTenantHsmInstanceProposal_RemoveQuorumMember_ + // *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance_ + Operation isSingleTenantHsmInstanceProposal_Operation `protobuf_oneof:"operation"` +} + +func (x *SingleTenantHsmInstanceProposal) Reset() { + *x = SingleTenantHsmInstanceProposal{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1} +} + +func (x *SingleTenantHsmInstanceProposal) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SingleTenantHsmInstanceProposal) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetState() SingleTenantHsmInstanceProposal_State { + if x != nil { + return x.State + } + return SingleTenantHsmInstanceProposal_STATE_UNSPECIFIED +} + +func (x *SingleTenantHsmInstanceProposal) GetFailureReason() string { + if x != nil { + return x.FailureReason + } + return "" +} + +func (m *SingleTenantHsmInstanceProposal) GetApprovalParameters() isSingleTenantHsmInstanceProposal_ApprovalParameters { + if m != nil { + return m.ApprovalParameters + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetQuorumParameters() *SingleTenantHsmInstanceProposal_QuorumParameters { + if x, ok := x.GetApprovalParameters().(*SingleTenantHsmInstanceProposal_QuorumParameters_); ok { + return x.QuorumParameters + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetRequiredActionQuorumParameters() *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters { + if x, ok := x.GetApprovalParameters().(*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters_); ok { + return x.RequiredActionQuorumParameters + } + return nil +} + +func (m *SingleTenantHsmInstanceProposal) GetExpiration() isSingleTenantHsmInstanceProposal_Expiration { + if m != nil { + return m.Expiration + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetExpireTime() *timestamppb.Timestamp { + if x, ok := x.GetExpiration().(*SingleTenantHsmInstanceProposal_ExpireTime); ok { + return x.ExpireTime + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetTtl() *durationpb.Duration { + if x, ok := x.GetExpiration().(*SingleTenantHsmInstanceProposal_Ttl); ok { + return x.Ttl + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetDeleteTime() *timestamppb.Timestamp { + if x != nil { + return x.DeleteTime + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetPurgeTime() *timestamppb.Timestamp { + if x != nil { + return x.PurgeTime + } + return nil +} + +func (m *SingleTenantHsmInstanceProposal) GetOperation() isSingleTenantHsmInstanceProposal_Operation { + if m != nil { + return m.Operation + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetRegisterTwoFactorAuthKeys() *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys_); ok { + return x.RegisterTwoFactorAuthKeys + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetDisableSingleTenantHsmInstance() *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance_); ok { + return x.DisableSingleTenantHsmInstance + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetEnableSingleTenantHsmInstance() *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance_); ok { + return x.EnableSingleTenantHsmInstance + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetDeleteSingleTenantHsmInstance() *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance_); ok { + return x.DeleteSingleTenantHsmInstance + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetAddQuorumMember() *SingleTenantHsmInstanceProposal_AddQuorumMember { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_AddQuorumMember_); ok { + return x.AddQuorumMember + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetRemoveQuorumMember() *SingleTenantHsmInstanceProposal_RemoveQuorumMember { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_RemoveQuorumMember_); ok { + return x.RemoveQuorumMember + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal) GetRefreshSingleTenantHsmInstance() *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance { + if x, ok := x.GetOperation().(*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance_); ok { + return x.RefreshSingleTenantHsmInstance + } + return nil +} + +type isSingleTenantHsmInstanceProposal_ApprovalParameters interface { + isSingleTenantHsmInstanceProposal_ApprovalParameters() +} + +type SingleTenantHsmInstanceProposal_QuorumParameters_ struct { + // Output only. The quorum approval parameters for the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + QuorumParameters *SingleTenantHsmInstanceProposal_QuorumParameters `protobuf:"bytes,5,opt,name=quorum_parameters,json=quorumParameters,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters_ struct { + // Output only. Parameters for an approval of a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // that has both required challenges and a quorum. + RequiredActionQuorumParameters *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters `protobuf:"bytes,14,opt,name=required_action_quorum_parameters,json=requiredActionQuorumParameters,proto3,oneof"` +} + +func (*SingleTenantHsmInstanceProposal_QuorumParameters_) isSingleTenantHsmInstanceProposal_ApprovalParameters() { +} + +func (*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters_) isSingleTenantHsmInstanceProposal_ApprovalParameters() { +} + +type isSingleTenantHsmInstanceProposal_Expiration interface { + isSingleTenantHsmInstanceProposal_Expiration() +} + +type SingleTenantHsmInstanceProposal_ExpireTime struct { + // The time at which the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // will expire if not approved and executed. + ExpireTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_Ttl struct { + // Input only. The TTL for the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + // Proposals will expire after this duration. + Ttl *durationpb.Duration `protobuf:"bytes,7,opt,name=ttl,proto3,oneof"` +} + +func (*SingleTenantHsmInstanceProposal_ExpireTime) isSingleTenantHsmInstanceProposal_Expiration() {} + +func (*SingleTenantHsmInstanceProposal_Ttl) isSingleTenantHsmInstanceProposal_Expiration() {} + +type isSingleTenantHsmInstanceProposal_Operation interface { + isSingleTenantHsmInstanceProposal_Operation() +} + +type SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys_ struct { + // Register 2FA keys for the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // This operation requires all N Challenges to be signed by 2FA keys. The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + // state to perform this operation. + RegisterTwoFactorAuthKeys *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys `protobuf:"bytes,8,opt,name=register_two_factor_auth_keys,json=registerTwoFactorAuthKeys,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance_ struct { + // Disable the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + // to perform this operation. + DisableSingleTenantHsmInstance *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance `protobuf:"bytes,9,opt,name=disable_single_tenant_hsm_instance,json=disableSingleTenantHsmInstance,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance_ struct { + // Enable the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] + // state to perform this operation. + EnableSingleTenantHsmInstance *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance `protobuf:"bytes,10,opt,name=enable_single_tenant_hsm_instance,json=enableSingleTenantHsmInstance,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance_ struct { + // Delete the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // Deleting a + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // will make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // unusable. The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] or + // [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] + // state to perform this operation. + DeleteSingleTenantHsmInstance *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance `protobuf:"bytes,11,opt,name=delete_single_tenant_hsm_instance,json=deleteSingleTenantHsmInstance,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_AddQuorumMember_ struct { + // Add a quorum member to the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // This will increase the + // [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + // by 1. The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + // to perform this operation. + AddQuorumMember *SingleTenantHsmInstanceProposal_AddQuorumMember `protobuf:"bytes,12,opt,name=add_quorum_member,json=addQuorumMember,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_RemoveQuorumMember_ struct { + // Remove a quorum member from the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // This will reduce + // [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + // by 1. The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + // to perform this operation. + RemoveQuorumMember *SingleTenantHsmInstanceProposal_RemoveQuorumMember `protobuf:"bytes,13,opt,name=remove_quorum_member,json=removeQuorumMember,proto3,oneof"` +} + +type SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance_ struct { + // Refreshes the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // This operation must be performed periodically to keep the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // active. This operation must be performed before + // [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] + // has passed. The + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // must be in the + // [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state + // to perform this operation. + RefreshSingleTenantHsmInstance *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance `protobuf:"bytes,17,opt,name=refresh_single_tenant_hsm_instance,json=refreshSingleTenantHsmInstance,proto3,oneof"` +} + +func (*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_AddQuorumMember_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_RemoveQuorumMember_) isSingleTenantHsmInstanceProposal_Operation() { +} + +func (*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance_) isSingleTenantHsmInstanceProposal_Operation() { +} + +// A challenge to be signed by a 2FA key. +type Challenge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The challenge to be signed by the 2FA key indicated by the + // public key. + Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` + // Output only. The public key associated with the 2FA key that should sign + // the challenge. + PublicKeyPem string `protobuf:"bytes,2,opt,name=public_key_pem,json=publicKeyPem,proto3" json:"public_key_pem,omitempty"` +} + +func (x *Challenge) Reset() { + *x = Challenge{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Challenge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Challenge) ProtoMessage() {} + +func (x *Challenge) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Challenge.ProtoReflect.Descriptor instead. +func (*Challenge) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{2} +} + +func (x *Challenge) GetChallenge() []byte { + if x != nil { + return x.Challenge + } + return nil +} + +func (x *Challenge) GetPublicKeyPem() string { + if x != nil { + return x.PublicKeyPem + } + return "" +} + +// A reply to a challenge signed by a 2FA key. +type ChallengeReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The signed challenge associated with the 2FA key. + // The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest. + SignedChallenge []byte `protobuf:"bytes,1,opt,name=signed_challenge,json=signedChallenge,proto3" json:"signed_challenge,omitempty"` + // Required. The public key associated with the 2FA key. + PublicKeyPem string `protobuf:"bytes,2,opt,name=public_key_pem,json=publicKeyPem,proto3" json:"public_key_pem,omitempty"` +} + +func (x *ChallengeReply) Reset() { + *x = ChallengeReply{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChallengeReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChallengeReply) ProtoMessage() {} + +func (x *ChallengeReply) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChallengeReply.ProtoReflect.Descriptor instead. +func (*ChallengeReply) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{3} +} + +func (x *ChallengeReply) GetSignedChallenge() []byte { + if x != nil { + return x.SignedChallenge + } + return nil +} + +func (x *ChallengeReply) GetPublicKeyPem() string { + if x != nil { + return x.PublicKeyPem + } + return "" +} + +// Request message for +// [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances]. +type ListSingleTenantHsmInstancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the location associated with the + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + // list, in the format `projects/*/locations/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Optional limit on the number of + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] to + // include in the response. Further + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] can + // subsequently be + // obtained by including the + // [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Optional pagination token, returned earlier via + // [ListSingleTenantHsmInstancesResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.next_page_token]. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Only include resources that match the filter in the response. For + // more information, see + // [Sorting and filtering list + // results](https://cloud.google.com/kms/docs/sorting-and-filtering). + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. For more information, see + // [Sorting and filtering list + // results](https://cloud.google.com/kms/docs/sorting-and-filtering). + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Optional. If set to true, + // [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances] + // will also return + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] in + // DELETED state. + ShowDeleted bool `protobuf:"varint,6,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` +} + +func (x *ListSingleTenantHsmInstancesRequest) Reset() { + *x = ListSingleTenantHsmInstancesRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSingleTenantHsmInstancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSingleTenantHsmInstancesRequest) ProtoMessage() {} + +func (x *ListSingleTenantHsmInstancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSingleTenantHsmInstancesRequest.ProtoReflect.Descriptor instead. +func (*ListSingleTenantHsmInstancesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{4} +} + +func (x *ListSingleTenantHsmInstancesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListSingleTenantHsmInstancesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSingleTenantHsmInstancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListSingleTenantHsmInstancesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListSingleTenantHsmInstancesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListSingleTenantHsmInstancesRequest) GetShowDeleted() bool { + if x != nil { + return x.ShowDeleted + } + return false +} + +// Response message for +// [HsmManagement.ListSingleTenantHsmInstances][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances]. +type ListSingleTenantHsmInstancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + SingleTenantHsmInstances []*SingleTenantHsmInstance `protobuf:"bytes,1,rep,name=single_tenant_hsm_instances,json=singleTenantHsmInstances,proto3" json:"single_tenant_hsm_instances,omitempty"` + // A token to retrieve next page of results. Pass this value in + // [ListSingleTenantHsmInstancesRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.page_token] + // to retrieve the next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // The total number of + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance] + // that matched the query. + // + // This field is not populated if + // [ListSingleTenantHsmInstancesRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest.filter] + // is applied. + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` +} + +func (x *ListSingleTenantHsmInstancesResponse) Reset() { + *x = ListSingleTenantHsmInstancesResponse{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSingleTenantHsmInstancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSingleTenantHsmInstancesResponse) ProtoMessage() {} + +func (x *ListSingleTenantHsmInstancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSingleTenantHsmInstancesResponse.ProtoReflect.Descriptor instead. +func (*ListSingleTenantHsmInstancesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSingleTenantHsmInstancesResponse) GetSingleTenantHsmInstances() []*SingleTenantHsmInstance { + if x != nil { + return x.SingleTenantHsmInstances + } + return nil +} + +func (x *ListSingleTenantHsmInstancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListSingleTenantHsmInstancesResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// Request message for +// [HsmManagement.GetSingleTenantHsmInstance][google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstance]. +type GetSingleTenantHsmInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + // the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSingleTenantHsmInstanceRequest) Reset() { + *x = GetSingleTenantHsmInstanceRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSingleTenantHsmInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSingleTenantHsmInstanceRequest) ProtoMessage() {} + +func (x *GetSingleTenantHsmInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSingleTenantHsmInstanceRequest.ProtoReflect.Descriptor instead. +func (*GetSingleTenantHsmInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{6} +} + +func (x *GetSingleTenantHsmInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [HsmManagement.CreateSingleTenantHsmInstance][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstance]. +type CreateSingleTenantHsmInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the location associated with the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance], in + // the format `projects/*/locations/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}`. + SingleTenantHsmInstanceId string `protobuf:"bytes,2,opt,name=single_tenant_hsm_instance_id,json=singleTenantHsmInstanceId,proto3" json:"single_tenant_hsm_instance_id,omitempty"` + // Required. An + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] with + // initial field values. + SingleTenantHsmInstance *SingleTenantHsmInstance `protobuf:"bytes,3,opt,name=single_tenant_hsm_instance,json=singleTenantHsmInstance,proto3" json:"single_tenant_hsm_instance,omitempty"` +} + +func (x *CreateSingleTenantHsmInstanceRequest) Reset() { + *x = CreateSingleTenantHsmInstanceRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSingleTenantHsmInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSingleTenantHsmInstanceRequest) ProtoMessage() {} + +func (x *CreateSingleTenantHsmInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSingleTenantHsmInstanceRequest.ProtoReflect.Descriptor instead. +func (*CreateSingleTenantHsmInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateSingleTenantHsmInstanceRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateSingleTenantHsmInstanceRequest) GetSingleTenantHsmInstanceId() string { + if x != nil { + return x.SingleTenantHsmInstanceId + } + return "" +} + +func (x *CreateSingleTenantHsmInstanceRequest) GetSingleTenantHsmInstance() *SingleTenantHsmInstance { + if x != nil { + return x.SingleTenantHsmInstance + } + return nil +} + +// Metadata message for +// [CreateSingleTenantHsmInstance][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstance] +// long-running operation response. +type CreateSingleTenantHsmInstanceMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSingleTenantHsmInstanceMetadata) Reset() { + *x = CreateSingleTenantHsmInstanceMetadata{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSingleTenantHsmInstanceMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSingleTenantHsmInstanceMetadata) ProtoMessage() {} + +func (x *CreateSingleTenantHsmInstanceMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSingleTenantHsmInstanceMetadata.ProtoReflect.Descriptor instead. +func (*CreateSingleTenantHsmInstanceMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{8} +} + +// Request message for +// [HsmManagement.CreateSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal]. +type CreateSingleTenantHsmInstanceProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [name][google.cloud.kms.v1.SingleTenantHsmInstance.name] of + // the [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] + // associated with the + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}`. + SingleTenantHsmInstanceProposalId string `protobuf:"bytes,2,opt,name=single_tenant_hsm_instance_proposal_id,json=singleTenantHsmInstanceProposalId,proto3" json:"single_tenant_hsm_instance_proposal_id,omitempty"` + // Required. The + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to create. + SingleTenantHsmInstanceProposal *SingleTenantHsmInstanceProposal `protobuf:"bytes,3,opt,name=single_tenant_hsm_instance_proposal,json=singleTenantHsmInstanceProposal,proto3" json:"single_tenant_hsm_instance_proposal,omitempty"` +} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) Reset() { + *x = CreateSingleTenantHsmInstanceProposalRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSingleTenantHsmInstanceProposalRequest) ProtoMessage() {} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSingleTenantHsmInstanceProposalRequest.ProtoReflect.Descriptor instead. +func (*CreateSingleTenantHsmInstanceProposalRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) GetSingleTenantHsmInstanceProposalId() string { + if x != nil { + return x.SingleTenantHsmInstanceProposalId + } + return "" +} + +func (x *CreateSingleTenantHsmInstanceProposalRequest) GetSingleTenantHsmInstanceProposal() *SingleTenantHsmInstanceProposal { + if x != nil { + return x.SingleTenantHsmInstanceProposal + } + return nil +} + +// Metadata message for +// [CreateSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal] +// long-running operation response. +type CreateSingleTenantHsmInstanceProposalMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSingleTenantHsmInstanceProposalMetadata) Reset() { + *x = CreateSingleTenantHsmInstanceProposalMetadata{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSingleTenantHsmInstanceProposalMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSingleTenantHsmInstanceProposalMetadata) ProtoMessage() {} + +func (x *CreateSingleTenantHsmInstanceProposalMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSingleTenantHsmInstanceProposalMetadata.ProtoReflect.Descriptor instead. +func (*CreateSingleTenantHsmInstanceProposalMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{10} +} + +// Request message for +// [HsmManagement.GetSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstanceProposal]. +type GetSingleTenantHsmInstanceProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The + // [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSingleTenantHsmInstanceProposalRequest) Reset() { + *x = GetSingleTenantHsmInstanceProposalRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSingleTenantHsmInstanceProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSingleTenantHsmInstanceProposalRequest) ProtoMessage() {} + +func (x *GetSingleTenantHsmInstanceProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSingleTenantHsmInstanceProposalRequest.ProtoReflect.Descriptor instead. +func (*GetSingleTenantHsmInstanceProposalRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{11} +} + +func (x *GetSingleTenantHsmInstanceProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [HsmManagement.ApproveSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.ApproveSingleTenantHsmInstanceProposal]. +type ApproveSingleTenantHsmInstanceProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The + // [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to approve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The approval payload. The type of approval payload must correspond to the + // type of approval_parameters in the proposal. + // + // Types that are assignable to ApprovalPayload: + // + // *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply_ + // *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply_ + ApprovalPayload isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload `protobuf_oneof:"approval_payload"` +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) Reset() { + *x = ApproveSingleTenantHsmInstanceProposalRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveSingleTenantHsmInstanceProposalRequest) ProtoMessage() {} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveSingleTenantHsmInstanceProposalRequest.ProtoReflect.Descriptor instead. +func (*ApproveSingleTenantHsmInstanceProposalRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{12} +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *ApproveSingleTenantHsmInstanceProposalRequest) GetApprovalPayload() isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload { + if m != nil { + return m.ApprovalPayload + } + return nil +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) GetQuorumReply() *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply { + if x, ok := x.GetApprovalPayload().(*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply_); ok { + return x.QuorumReply + } + return nil +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest) GetRequiredActionQuorumReply() *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply { + if x, ok := x.GetApprovalPayload().(*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply_); ok { + return x.RequiredActionQuorumReply + } + return nil +} + +type isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload interface { + isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload() +} + +type ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply_ struct { + // Required. The reply to + // [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] + // for approving the proposal. + QuorumReply *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply `protobuf:"bytes,2,opt,name=quorum_reply,json=quorumReply,proto3,oneof"` +} + +type ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply_ struct { + // Required. The reply to + // [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] + // for approving the proposal. + RequiredActionQuorumReply *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply `protobuf:"bytes,3,opt,name=required_action_quorum_reply,json=requiredActionQuorumReply,proto3,oneof"` +} + +func (*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply_) isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload() { +} + +func (*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply_) isApproveSingleTenantHsmInstanceProposalRequest_ApprovalPayload() { +} + +// Response message for +// [HsmManagement.ApproveSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.ApproveSingleTenantHsmInstanceProposal]. +type ApproveSingleTenantHsmInstanceProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ApproveSingleTenantHsmInstanceProposalResponse) Reset() { + *x = ApproveSingleTenantHsmInstanceProposalResponse{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveSingleTenantHsmInstanceProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveSingleTenantHsmInstanceProposalResponse) ProtoMessage() {} + +func (x *ApproveSingleTenantHsmInstanceProposalResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveSingleTenantHsmInstanceProposalResponse.ProtoReflect.Descriptor instead. +func (*ApproveSingleTenantHsmInstanceProposalResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{13} +} + +// Request message for +// [HsmManagement.ExecuteSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.ExecuteSingleTenantHsmInstanceProposal]. +type ExecuteSingleTenantHsmInstanceProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The + // [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to execute. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ExecuteSingleTenantHsmInstanceProposalRequest) Reset() { + *x = ExecuteSingleTenantHsmInstanceProposalRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteSingleTenantHsmInstanceProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteSingleTenantHsmInstanceProposalRequest) ProtoMessage() {} + +func (x *ExecuteSingleTenantHsmInstanceProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteSingleTenantHsmInstanceProposalRequest.ProtoReflect.Descriptor instead. +func (*ExecuteSingleTenantHsmInstanceProposalRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{14} +} + +func (x *ExecuteSingleTenantHsmInstanceProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Response message for +// [HsmManagement.ExecuteSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.ExecuteSingleTenantHsmInstanceProposal]. +type ExecuteSingleTenantHsmInstanceProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ExecuteSingleTenantHsmInstanceProposalResponse) Reset() { + *x = ExecuteSingleTenantHsmInstanceProposalResponse{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteSingleTenantHsmInstanceProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteSingleTenantHsmInstanceProposalResponse) ProtoMessage() {} + +func (x *ExecuteSingleTenantHsmInstanceProposalResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteSingleTenantHsmInstanceProposalResponse.ProtoReflect.Descriptor instead. +func (*ExecuteSingleTenantHsmInstanceProposalResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{15} +} + +// Metadata message for +// [ExecuteSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.ExecuteSingleTenantHsmInstanceProposal] +// long-running operation response. +type ExecuteSingleTenantHsmInstanceProposalMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ExecuteSingleTenantHsmInstanceProposalMetadata) Reset() { + *x = ExecuteSingleTenantHsmInstanceProposalMetadata{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecuteSingleTenantHsmInstanceProposalMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteSingleTenantHsmInstanceProposalMetadata) ProtoMessage() {} + +func (x *ExecuteSingleTenantHsmInstanceProposalMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteSingleTenantHsmInstanceProposalMetadata.ProtoReflect.Descriptor instead. +func (*ExecuteSingleTenantHsmInstanceProposalMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{16} +} + +// Request message for +// [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals]. +type ListSingleTenantHsmInstanceProposalsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the single tenant HSM instance associated + // with the + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to list, in the format `projects/*/locations/*/singleTenantHsmInstances/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Optional limit on the number of + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to include in the response. Further + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // can subsequently be obtained by including the + // [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Optional pagination token, returned earlier via + // [ListSingleTenantHsmInstanceProposalsResponse.next_page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.next_page_token]. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Only include resources that match the filter in the response. For + // more information, see + // [Sorting and filtering list + // results](https://cloud.google.com/kms/docs/sorting-and-filtering). + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Specify how the results should be sorted. If not specified, the + // results will be sorted in the default order. For more information, see + // [Sorting and filtering list + // results](https://cloud.google.com/kms/docs/sorting-and-filtering). + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Optional. If set to true, + // [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals] + // will also return + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // in DELETED state. + ShowDeleted bool `protobuf:"varint,6,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) Reset() { + *x = ListSingleTenantHsmInstanceProposalsRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSingleTenantHsmInstanceProposalsRequest) ProtoMessage() {} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSingleTenantHsmInstanceProposalsRequest.ProtoReflect.Descriptor instead. +func (*ListSingleTenantHsmInstanceProposalsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{17} +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListSingleTenantHsmInstanceProposalsRequest) GetShowDeleted() bool { + if x != nil { + return x.ShowDeleted + } + return false +} + +// Response message for +// [HsmManagement.ListSingleTenantHsmInstanceProposals][google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals]. +type ListSingleTenantHsmInstanceProposalsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + SingleTenantHsmInstanceProposals []*SingleTenantHsmInstanceProposal `protobuf:"bytes,1,rep,name=single_tenant_hsm_instance_proposals,json=singleTenantHsmInstanceProposals,proto3" json:"single_tenant_hsm_instance_proposals,omitempty"` + // A token to retrieve next page of results. Pass this value in + // [ListSingleTenantHsmInstanceProposalsRequest.page_token][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.page_token] + // to retrieve the next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // The total number of + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // that matched the query. + // + // This field is not populated if + // [ListSingleTenantHsmInstanceProposalsRequest.filter][google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest.filter] + // is applied. + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` +} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) Reset() { + *x = ListSingleTenantHsmInstanceProposalsResponse{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSingleTenantHsmInstanceProposalsResponse) ProtoMessage() {} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSingleTenantHsmInstanceProposalsResponse.ProtoReflect.Descriptor instead. +func (*ListSingleTenantHsmInstanceProposalsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{18} +} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) GetSingleTenantHsmInstanceProposals() []*SingleTenantHsmInstanceProposal { + if x != nil { + return x.SingleTenantHsmInstanceProposals + } + return nil +} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListSingleTenantHsmInstanceProposalsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// Request message for +// [HsmManagement.DeleteSingleTenantHsmInstanceProposal][google.cloud.kms.v1.HsmManagement.DeleteSingleTenantHsmInstanceProposal]. +type DeleteSingleTenantHsmInstanceProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The + // [name][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.name] of the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteSingleTenantHsmInstanceProposalRequest) Reset() { + *x = DeleteSingleTenantHsmInstanceProposalRequest{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSingleTenantHsmInstanceProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSingleTenantHsmInstanceProposalRequest) ProtoMessage() {} + +func (x *DeleteSingleTenantHsmInstanceProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSingleTenantHsmInstanceProposalRequest.ProtoReflect.Descriptor instead. +func (*DeleteSingleTenantHsmInstanceProposalRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{19} +} + +func (x *DeleteSingleTenantHsmInstanceProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Configuration for M of N quorum auth. +type SingleTenantHsmInstance_QuorumAuth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The total number of approvers. This is the N value used + // for M of N quorum auth. Must be greater than or equal to 3 and less than + // or equal to 16. + TotalApproverCount int32 `protobuf:"varint,1,opt,name=total_approver_count,json=totalApproverCount,proto3" json:"total_approver_count,omitempty"` + // Output only. The required numbers of approvers. The M value used for M of + // N quorum auth. Must be greater than or equal to 2 and less than or equal + // to + // [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + // - 1. + RequiredApproverCount int32 `protobuf:"varint,2,opt,name=required_approver_count,json=requiredApproverCount,proto3" json:"required_approver_count,omitempty"` + // Output only. The public keys associated with the 2FA keys for M of N + // quorum auth. + TwoFactorPublicKeyPems []string `protobuf:"bytes,3,rep,name=two_factor_public_key_pems,json=twoFactorPublicKeyPems,proto3" json:"two_factor_public_key_pems,omitempty"` +} + +func (x *SingleTenantHsmInstance_QuorumAuth) Reset() { + *x = SingleTenantHsmInstance_QuorumAuth{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstance_QuorumAuth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstance_QuorumAuth) ProtoMessage() {} + +func (x *SingleTenantHsmInstance_QuorumAuth) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstance_QuorumAuth.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstance_QuorumAuth) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SingleTenantHsmInstance_QuorumAuth) GetTotalApproverCount() int32 { + if x != nil { + return x.TotalApproverCount + } + return 0 +} + +func (x *SingleTenantHsmInstance_QuorumAuth) GetRequiredApproverCount() int32 { + if x != nil { + return x.RequiredApproverCount + } + return 0 +} + +func (x *SingleTenantHsmInstance_QuorumAuth) GetTwoFactorPublicKeyPems() []string { + if x != nil { + return x.TwoFactorPublicKeyPems + } + return nil +} + +// Parameters of quorum approval for the +// [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. +type SingleTenantHsmInstanceProposal_QuorumParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The required numbers of approvers. This is the M value used + // for M of N quorum auth. It is less than the number of public keys. + RequiredApproverCount int32 `protobuf:"varint,1,opt,name=required_approver_count,json=requiredApproverCount,proto3" json:"required_approver_count,omitempty"` + // Output only. The challenges to be signed by 2FA keys for quorum auth. M + // of N of these challenges are required to be signed to approve the + // operation. + Challenges []*Challenge `protobuf:"bytes,2,rep,name=challenges,proto3" json:"challenges,omitempty"` + // Output only. The public keys associated with the 2FA keys that have + // already approved the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // by signing the challenge. + ApprovedTwoFactorPublicKeyPems []string `protobuf:"bytes,3,rep,name=approved_two_factor_public_key_pems,json=approvedTwoFactorPublicKeyPems,proto3" json:"approved_two_factor_public_key_pems,omitempty"` +} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) Reset() { + *x = SingleTenantHsmInstanceProposal_QuorumParameters{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_QuorumParameters) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_QuorumParameters.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_QuorumParameters) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) GetRequiredApproverCount() int32 { + if x != nil { + return x.RequiredApproverCount + } + return 0 +} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) GetChallenges() []*Challenge { + if x != nil { + return x.Challenges + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal_QuorumParameters) GetApprovedTwoFactorPublicKeyPems() []string { + if x != nil { + return x.ApprovedTwoFactorPublicKeyPems + } + return nil +} + +// Parameters for an approval that has both required challenges and a +// quorum. +type SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. A list of specific challenges that must be signed. + // For some operations, this will contain a single challenge. + RequiredChallenges []*Challenge `protobuf:"bytes,1,rep,name=required_challenges,json=requiredChallenges,proto3" json:"required_challenges,omitempty"` + // Output only. The required number of quorum approvers. This is the M value + // used for M of N quorum auth. It is less than the number of public keys. + RequiredApproverCount int32 `protobuf:"varint,2,opt,name=required_approver_count,json=requiredApproverCount,proto3" json:"required_approver_count,omitempty"` + // Output only. The challenges to be signed by 2FA keys for quorum auth. M + // of N of these challenges are required to be signed to approve the + // operation. + QuorumChallenges []*Challenge `protobuf:"bytes,3,rep,name=quorum_challenges,json=quorumChallenges,proto3" json:"quorum_challenges,omitempty"` + // Output only. The public keys associated with the 2FA keys that have + // already approved the + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // by signing the challenge. + ApprovedTwoFactorPublicKeyPems []string `protobuf:"bytes,4,rep,name=approved_two_factor_public_key_pems,json=approvedTwoFactorPublicKeyPems,proto3" json:"approved_two_factor_public_key_pems,omitempty"` +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) Reset() { + *x = SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) GetRequiredChallenges() []*Challenge { + if x != nil { + return x.RequiredChallenges + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) GetRequiredApproverCount() int32 { + if x != nil { + return x.RequiredApproverCount + } + return 0 +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) GetQuorumChallenges() []*Challenge { + if x != nil { + return x.QuorumChallenges + } + return nil +} + +func (x *SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters) GetApprovedTwoFactorPublicKeyPems() []string { + if x != nil { + return x.ApprovedTwoFactorPublicKeyPems + } + return nil +} + +// Register 2FA keys for the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +// This operation requires all Challenges to be signed by 2FA keys. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [PENDING_TWO_FACTOR_AUTH_REGISTRATION][google.cloud.kms.v1.SingleTenantHsmInstance.State.PENDING_TWO_FACTOR_AUTH_REGISTRATION] +// state to perform this operation. +type SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The required numbers of approvers to set for the + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + // This is the M value used for M of N quorum auth. Must be greater than or + // equal to 2 and less than or equal to + // [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] + // - 1. + RequiredApproverCount int32 `protobuf:"varint,1,opt,name=required_approver_count,json=requiredApproverCount,proto3" json:"required_approver_count,omitempty"` + // Required. The public keys associated with the 2FA keys for M of N quorum + // auth. Public keys must be associated with RSA 2048 keys. + TwoFactorPublicKeyPems []string `protobuf:"bytes,2,rep,name=two_factor_public_key_pems,json=twoFactorPublicKeyPems,proto3" json:"two_factor_public_key_pems,omitempty"` +} + +func (x *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) Reset() { + *x = SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) GetRequiredApproverCount() int32 { + if x != nil { + return x.RequiredApproverCount + } + return 0 +} + +func (x *SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys) GetTwoFactorPublicKeyPems() []string { + if x != nil { + return x.TwoFactorPublicKeyPems + } + return nil +} + +// Disable the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state to +// perform this operation. +type SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance) Reset() { + *x = SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 3} +} + +// Enable the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [DISABLED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DISABLED] +// state to perform this operation. +type SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance) Reset() { + *x = SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 4} +} + +// Delete the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +// Deleting a +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] will +// make all [CryptoKeys][google.cloud.kms.v1.CryptoKey] attached to the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] +// unusable. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// not be in the +// [DELETING][google.cloud.kms.v1.SingleTenantHsmInstance.State.DELETING] or +// [DELETED][google.cloud.kms.v1.SingleTenantHsmInstance.State.DELETED] state +// to perform this operation. +type SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance) Reset() { + *x = SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 5} +} + +// Add a quorum member to the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +// This will increase the +// [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] +// by 1. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state to +// perform this operation. +type SingleTenantHsmInstanceProposal_AddQuorumMember struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The public key associated with the 2FA key for the new quorum + // member to add. Public keys must be associated with RSA 2048 keys. + TwoFactorPublicKeyPem string `protobuf:"bytes,1,opt,name=two_factor_public_key_pem,json=twoFactorPublicKeyPem,proto3" json:"two_factor_public_key_pem,omitempty"` +} + +func (x *SingleTenantHsmInstanceProposal_AddQuorumMember) Reset() { + *x = SingleTenantHsmInstanceProposal_AddQuorumMember{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_AddQuorumMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_AddQuorumMember) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_AddQuorumMember) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_AddQuorumMember.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_AddQuorumMember) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 6} +} + +func (x *SingleTenantHsmInstanceProposal_AddQuorumMember) GetTwoFactorPublicKeyPem() string { + if x != nil { + return x.TwoFactorPublicKeyPem + } + return "" +} + +// Remove a quorum member from the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +// This will reduce +// [total_approver_count][google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth.total_approver_count] +// by 1. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state to +// perform this operation. +type SingleTenantHsmInstanceProposal_RemoveQuorumMember struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The public key associated with the 2FA key for the quorum + // member to remove. Public keys must be associated with RSA 2048 keys. + TwoFactorPublicKeyPem string `protobuf:"bytes,1,opt,name=two_factor_public_key_pem,json=twoFactorPublicKeyPem,proto3" json:"two_factor_public_key_pem,omitempty"` +} + +func (x *SingleTenantHsmInstanceProposal_RemoveQuorumMember) Reset() { + *x = SingleTenantHsmInstanceProposal_RemoveQuorumMember{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_RemoveQuorumMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_RemoveQuorumMember) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_RemoveQuorumMember) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_RemoveQuorumMember.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_RemoveQuorumMember) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 7} +} + +func (x *SingleTenantHsmInstanceProposal_RemoveQuorumMember) GetTwoFactorPublicKeyPem() string { + if x != nil { + return x.TwoFactorPublicKeyPem + } + return "" +} + +// Refreshes the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. +// This operation must be performed periodically to keep the +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] +// active. This operation must be performed before +// [unrefreshed_duration_until_disable][google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable] +// has passed. The +// [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] must +// be in the +// [ACTIVE][google.cloud.kms.v1.SingleTenantHsmInstance.State.ACTIVE] state to +// perform this operation. +type SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance) Reset() { + *x = SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance) ProtoMessage() {} + +func (x *SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance.ProtoReflect.Descriptor instead. +func (*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{1, 8} +} + +// The reply to +// [QuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters] +// for approving the proposal. +type ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The challenge replies to approve the proposal. Challenge + // replies can be sent across multiple requests. The proposal will be + // approved when + // [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.required_approver_count] + // challenge replies are provided. + ChallengeReplies []*ChallengeReply `protobuf:"bytes,1,rep,name=challenge_replies,json=challengeReplies,proto3" json:"challenge_replies,omitempty"` +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) Reset() { + *x = ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) ProtoMessage() {} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply.ProtoReflect.Descriptor instead. +func (*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply) GetChallengeReplies() []*ChallengeReply { + if x != nil { + return x.ChallengeReplies + } + return nil +} + +// The reply to +// [RequiredActionQuorumParameters][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters] +// for approving the proposal. +type ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. All required challenges must be signed for the proposal to be + // approved. These can be sent across multiple requests. + RequiredChallengeReplies []*ChallengeReply `protobuf:"bytes,1,rep,name=required_challenge_replies,json=requiredChallengeReplies,proto3" json:"required_challenge_replies,omitempty"` + // Required. Quorum members' signed challenge replies. These can be provided + // across multiple requests. The proposal will be approved when + // [required_approver_count][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_approver_count] + // quorum_challenge_replies are provided and when all + // required_challenge_replies are provided. + QuorumChallengeReplies []*ChallengeReply `protobuf:"bytes,2,rep,name=quorum_challenge_replies,json=quorumChallengeReplies,proto3" json:"quorum_challenge_replies,omitempty"` +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) Reset() { + *x = ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply{} + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) ProtoMessage() {} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_hsm_management_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply.ProtoReflect.Descriptor instead. +func (*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP(), []int{12, 1} +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) GetRequiredChallengeReplies() []*ChallengeReply { + if x != nil { + return x.RequiredChallengeReplies + } + return nil +} + +func (x *ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply) GetQuorumChallengeReplies() []*ChallengeReply { + if x != nil { + return x.QuorumChallengeReplies + } + return nil +} + +var File_google_cloud_kms_v1_hsm_management_proto protoreflect.FileDescriptor + +var file_google_cloud_kms_v1_hsm_management_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6b, + 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x73, 0x6d, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x08, 0x0a, 0x17, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x0b, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x51, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, + 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6b, 0x0a, 0x22, + 0x75, 0x6e, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1f, 0x75, 0x6e, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, + 0x69, 0x6c, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0xc1, 0x01, + 0x0a, 0x0a, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x14, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x3f, 0x0a, 0x1a, 0x74, 0x77, 0x6f, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x74, 0x77, 0x6f, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, + 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x57, 0x4f, 0x5f, + 0x46, 0x41, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x52, 0x45, 0x47, 0x49, + 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, + 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0a, + 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x3a, 0xc7, 0x01, 0xea, 0x41, 0xc3, + 0x01, 0x0a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x5d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x73, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x7d, 0x2a, 0x18, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, + 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x17, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x22, 0xda, 0x19, 0x0a, 0x1f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x11, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, + 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x1e, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x04, 0x48, 0x01, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x40, 0x0a, 0x0b, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, + 0x0a, 0x0a, 0x70, 0x75, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x09, 0x70, 0x75, 0x72, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x92, + 0x01, 0x0a, 0x1d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x77, 0x6f, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x77, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, + 0x74, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x02, 0x52, 0x19, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x77, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, + 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x53, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x02, 0x52, 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x21, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x02, 0x52, 0x1d, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x21, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x02, 0x52, 0x1d, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x11, 0x61, 0x64, 0x64, + 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x51, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x02, 0x52, 0x0f, 0x61, 0x64, + 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x7b, 0x0a, + 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x48, 0x02, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x51, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0xa1, 0x01, 0x0a, 0x22, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x48, 0x02, 0x52, 0x1e, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0xe6, + 0x01, 0x0a, 0x10, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x23, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x5f, 0x74, 0x77, 0x6f, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x64, 0x54, 0x77, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x73, 0x1a, 0xd7, 0x02, 0x0a, 0x1e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x13, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x12, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, + 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x50, 0x0a, + 0x11, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x71, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x73, 0x12, + 0x50, 0x0a, 0x23, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x77, 0x6f, 0x5f, + 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x1e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x77, 0x6f, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, + 0x73, 0x1a, 0x99, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x77, + 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x1a, + 0x74, 0x77, 0x6f, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x16, 0x74, 0x77, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x73, 0x1a, 0x20, 0x0a, + 0x1e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x1a, + 0x1f, 0x0a, 0x1d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x1a, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x1a, 0x50, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x19, 0x74, 0x77, 0x6f, 0x5f, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, 0x74, 0x77, + 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x50, 0x65, 0x6d, 0x1a, 0x53, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x51, 0x75, 0x6f, + 0x72, 0x75, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x19, 0x74, 0x77, 0x6f, + 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x15, 0x74, 0x77, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x1a, 0x20, 0x0a, 0x1e, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, + 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x7c, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x05, 0x12, + 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x07, 0x3a, 0xf4, 0x01, 0xea, 0x41, 0xf0, 0x01, 0x0a, + 0x37, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x72, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x7d, 0x2a, 0x20, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x32, 0x1f, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, + 0x15, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x59, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x21, + 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x12, 0x29, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x70, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x22, 0x6b, 0x0a, 0x0e, + 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, + 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x29, + 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x22, 0x93, 0x02, 0x0a, 0x23, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x5f, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, + 0xda, 0x01, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x1b, 0x73, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x18, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x70, 0x0a, 0x21, + 0x47, 0x65, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, + 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x37, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x31, 0x0a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa0, + 0x02, 0x0a, 0x24, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, + 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x1d, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x6e, 0x0a, 0x1a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x17, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x22, 0x27, 0x0a, 0x25, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe1, 0x02, 0x0a, 0x2c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x31, 0x0a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x26, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, + 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x21, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, + 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x49, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x23, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x1f, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x2f, + 0x0a, 0x2d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x80, 0x01, 0x0a, 0x29, 0x47, 0x65, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x89, 0x06, 0x0a, 0x2d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x71, 0x75, 0x6f, + 0x72, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x0b, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0xa4, 0x01, 0x0a, 0x1c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x6f, + 0x72, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, + 0x19, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x51, + 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x1a, 0x64, 0x0a, 0x0b, 0x51, 0x75, + 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x55, 0x0a, 0x11, 0x63, 0x68, 0x61, + 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, + 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, + 0x1a, 0xe7, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x66, + 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x18, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x18, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x16, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x30, + 0x0a, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x84, 0x01, 0x0a, 0x2d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, + 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x30, 0x0a, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa9, 0x02, 0x0a, 0x2b, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x31, 0x0a, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, + 0x26, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xfc, 0x01, 0x0a, 0x2c, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x24, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x20, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x2c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xa3, 0x15, 0x0a, + 0x0d, 0x48, 0x73, 0x6d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0xe2, + 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0xcf, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x4b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xe1, 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xe5, 0x01, 0xca, 0x41, 0x40, 0x0a, 0x17, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x25, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x3f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x2c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, + 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x73, 0x69, 0x6e, 0x67, + 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x3a, + 0x1a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, + 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3c, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xa8, 0x03, 0x0a, 0x25, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x02, 0xca, 0x41, 0x50, 0x0a, 0x1f, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x2d, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x51, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x2c, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x3a, 0x23, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x68, 0x73, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x48, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x12, 0xa2, 0x02, 0x0a, 0x26, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, + 0x65, 0x2c, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x55, 0x3a, 0x01, 0x2a, 0x22, 0x50, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0xd3, 0x02, 0x0a, 0x26, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, + 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc5, 0x01, 0xca, 0x41, 0x60, 0x0a, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x3a, 0x01, 0x2a, 0x22, 0x50, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, + 0xf3, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x57, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x02, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x40, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x59, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0xdb, + 0x01, 0x0a, 0x25, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x57, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x4a, 0x2a, 0x48, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x48, 0x73, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x1a, 0x74, 0xca, 0x41, + 0x17, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x57, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, + 0x6d, 0x73, 0x42, 0x86, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x12, + 0x48, 0x73, 0x6d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x61, 0x70, + 0x69, 0x76, 0x31, 0x2f, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0xaa, + 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4b, + 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4b, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_kms_v1_hsm_management_proto_rawDescOnce sync.Once + file_google_cloud_kms_v1_hsm_management_proto_rawDescData = file_google_cloud_kms_v1_hsm_management_proto_rawDesc +) + +func file_google_cloud_kms_v1_hsm_management_proto_rawDescGZIP() []byte { + file_google_cloud_kms_v1_hsm_management_proto_rawDescOnce.Do(func() { + file_google_cloud_kms_v1_hsm_management_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_kms_v1_hsm_management_proto_rawDescData) + }) + return file_google_cloud_kms_v1_hsm_management_proto_rawDescData +} + +var file_google_cloud_kms_v1_hsm_management_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_kms_v1_hsm_management_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_google_cloud_kms_v1_hsm_management_proto_goTypes = []any{ + (SingleTenantHsmInstance_State)(0), // 0: google.cloud.kms.v1.SingleTenantHsmInstance.State + (SingleTenantHsmInstanceProposal_State)(0), // 1: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State + (*SingleTenantHsmInstance)(nil), // 2: google.cloud.kms.v1.SingleTenantHsmInstance + (*SingleTenantHsmInstanceProposal)(nil), // 3: google.cloud.kms.v1.SingleTenantHsmInstanceProposal + (*Challenge)(nil), // 4: google.cloud.kms.v1.Challenge + (*ChallengeReply)(nil), // 5: google.cloud.kms.v1.ChallengeReply + (*ListSingleTenantHsmInstancesRequest)(nil), // 6: google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest + (*ListSingleTenantHsmInstancesResponse)(nil), // 7: google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse + (*GetSingleTenantHsmInstanceRequest)(nil), // 8: google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest + (*CreateSingleTenantHsmInstanceRequest)(nil), // 9: google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest + (*CreateSingleTenantHsmInstanceMetadata)(nil), // 10: google.cloud.kms.v1.CreateSingleTenantHsmInstanceMetadata + (*CreateSingleTenantHsmInstanceProposalRequest)(nil), // 11: google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest + (*CreateSingleTenantHsmInstanceProposalMetadata)(nil), // 12: google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalMetadata + (*GetSingleTenantHsmInstanceProposalRequest)(nil), // 13: google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest + (*ApproveSingleTenantHsmInstanceProposalRequest)(nil), // 14: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest + (*ApproveSingleTenantHsmInstanceProposalResponse)(nil), // 15: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse + (*ExecuteSingleTenantHsmInstanceProposalRequest)(nil), // 16: google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest + (*ExecuteSingleTenantHsmInstanceProposalResponse)(nil), // 17: google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalResponse + (*ExecuteSingleTenantHsmInstanceProposalMetadata)(nil), // 18: google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalMetadata + (*ListSingleTenantHsmInstanceProposalsRequest)(nil), // 19: google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest + (*ListSingleTenantHsmInstanceProposalsResponse)(nil), // 20: google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse + (*DeleteSingleTenantHsmInstanceProposalRequest)(nil), // 21: google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest + (*SingleTenantHsmInstance_QuorumAuth)(nil), // 22: google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth + (*SingleTenantHsmInstanceProposal_QuorumParameters)(nil), // 23: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters + (*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters)(nil), // 24: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters + (*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys)(nil), // 25: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys + (*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance)(nil), // 26: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance + (*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance)(nil), // 27: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance + (*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance)(nil), // 28: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance + (*SingleTenantHsmInstanceProposal_AddQuorumMember)(nil), // 29: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember + (*SingleTenantHsmInstanceProposal_RemoveQuorumMember)(nil), // 30: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember + (*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance)(nil), // 31: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance + (*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply)(nil), // 32: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply + (*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply)(nil), // 33: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 35: google.protobuf.Duration + (*longrunningpb.Operation)(nil), // 36: google.longrunning.Operation + (*emptypb.Empty)(nil), // 37: google.protobuf.Empty +} +var file_google_cloud_kms_v1_hsm_management_proto_depIdxs = []int32{ + 34, // 0: google.cloud.kms.v1.SingleTenantHsmInstance.create_time:type_name -> google.protobuf.Timestamp + 0, // 1: google.cloud.kms.v1.SingleTenantHsmInstance.state:type_name -> google.cloud.kms.v1.SingleTenantHsmInstance.State + 22, // 2: google.cloud.kms.v1.SingleTenantHsmInstance.quorum_auth:type_name -> google.cloud.kms.v1.SingleTenantHsmInstance.QuorumAuth + 34, // 3: google.cloud.kms.v1.SingleTenantHsmInstance.delete_time:type_name -> google.protobuf.Timestamp + 35, // 4: google.cloud.kms.v1.SingleTenantHsmInstance.unrefreshed_duration_until_disable:type_name -> google.protobuf.Duration + 34, // 5: google.cloud.kms.v1.SingleTenantHsmInstance.disable_time:type_name -> google.protobuf.Timestamp + 34, // 6: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.create_time:type_name -> google.protobuf.Timestamp + 1, // 7: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.state:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State + 23, // 8: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.quorum_parameters:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters + 24, // 9: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.required_action_quorum_parameters:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters + 34, // 10: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.expire_time:type_name -> google.protobuf.Timestamp + 35, // 11: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.ttl:type_name -> google.protobuf.Duration + 34, // 12: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.delete_time:type_name -> google.protobuf.Timestamp + 34, // 13: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.purge_time:type_name -> google.protobuf.Timestamp + 25, // 14: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.register_two_factor_auth_keys:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RegisterTwoFactorAuthKeys + 26, // 15: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.disable_single_tenant_hsm_instance:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DisableSingleTenantHsmInstance + 27, // 16: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.enable_single_tenant_hsm_instance:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.EnableSingleTenantHsmInstance + 28, // 17: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.delete_single_tenant_hsm_instance:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.DeleteSingleTenantHsmInstance + 29, // 18: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.add_quorum_member:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.AddQuorumMember + 30, // 19: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.remove_quorum_member:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RemoveQuorumMember + 31, // 20: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.refresh_single_tenant_hsm_instance:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RefreshSingleTenantHsmInstance + 2, // 21: google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse.single_tenant_hsm_instances:type_name -> google.cloud.kms.v1.SingleTenantHsmInstance + 2, // 22: google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest.single_tenant_hsm_instance:type_name -> google.cloud.kms.v1.SingleTenantHsmInstance + 3, // 23: google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest.single_tenant_hsm_instance_proposal:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal + 32, // 24: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.quorum_reply:type_name -> google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply + 33, // 25: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.required_action_quorum_reply:type_name -> google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply + 3, // 26: google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse.single_tenant_hsm_instance_proposals:type_name -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal + 4, // 27: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.QuorumParameters.challenges:type_name -> google.cloud.kms.v1.Challenge + 4, // 28: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.required_challenges:type_name -> google.cloud.kms.v1.Challenge + 4, // 29: google.cloud.kms.v1.SingleTenantHsmInstanceProposal.RequiredActionQuorumParameters.quorum_challenges:type_name -> google.cloud.kms.v1.Challenge + 5, // 30: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.QuorumReply.challenge_replies:type_name -> google.cloud.kms.v1.ChallengeReply + 5, // 31: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply.required_challenge_replies:type_name -> google.cloud.kms.v1.ChallengeReply + 5, // 32: google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest.RequiredActionQuorumReply.quorum_challenge_replies:type_name -> google.cloud.kms.v1.ChallengeReply + 6, // 33: google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances:input_type -> google.cloud.kms.v1.ListSingleTenantHsmInstancesRequest + 8, // 34: google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstance:input_type -> google.cloud.kms.v1.GetSingleTenantHsmInstanceRequest + 9, // 35: google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstance:input_type -> google.cloud.kms.v1.CreateSingleTenantHsmInstanceRequest + 11, // 36: google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal:input_type -> google.cloud.kms.v1.CreateSingleTenantHsmInstanceProposalRequest + 14, // 37: google.cloud.kms.v1.HsmManagement.ApproveSingleTenantHsmInstanceProposal:input_type -> google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalRequest + 16, // 38: google.cloud.kms.v1.HsmManagement.ExecuteSingleTenantHsmInstanceProposal:input_type -> google.cloud.kms.v1.ExecuteSingleTenantHsmInstanceProposalRequest + 13, // 39: google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstanceProposal:input_type -> google.cloud.kms.v1.GetSingleTenantHsmInstanceProposalRequest + 19, // 40: google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals:input_type -> google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsRequest + 21, // 41: google.cloud.kms.v1.HsmManagement.DeleteSingleTenantHsmInstanceProposal:input_type -> google.cloud.kms.v1.DeleteSingleTenantHsmInstanceProposalRequest + 7, // 42: google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstances:output_type -> google.cloud.kms.v1.ListSingleTenantHsmInstancesResponse + 2, // 43: google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstance:output_type -> google.cloud.kms.v1.SingleTenantHsmInstance + 36, // 44: google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstance:output_type -> google.longrunning.Operation + 36, // 45: google.cloud.kms.v1.HsmManagement.CreateSingleTenantHsmInstanceProposal:output_type -> google.longrunning.Operation + 15, // 46: google.cloud.kms.v1.HsmManagement.ApproveSingleTenantHsmInstanceProposal:output_type -> google.cloud.kms.v1.ApproveSingleTenantHsmInstanceProposalResponse + 36, // 47: google.cloud.kms.v1.HsmManagement.ExecuteSingleTenantHsmInstanceProposal:output_type -> google.longrunning.Operation + 3, // 48: google.cloud.kms.v1.HsmManagement.GetSingleTenantHsmInstanceProposal:output_type -> google.cloud.kms.v1.SingleTenantHsmInstanceProposal + 20, // 49: google.cloud.kms.v1.HsmManagement.ListSingleTenantHsmInstanceProposals:output_type -> google.cloud.kms.v1.ListSingleTenantHsmInstanceProposalsResponse + 37, // 50: google.cloud.kms.v1.HsmManagement.DeleteSingleTenantHsmInstanceProposal:output_type -> google.protobuf.Empty + 42, // [42:51] is the sub-list for method output_type + 33, // [33:42] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name +} + +func init() { file_google_cloud_kms_v1_hsm_management_proto_init() } +func file_google_cloud_kms_v1_hsm_management_proto_init() { + if File_google_cloud_kms_v1_hsm_management_proto != nil { + return + } + file_google_cloud_kms_v1_hsm_management_proto_msgTypes[1].OneofWrappers = []any{ + (*SingleTenantHsmInstanceProposal_QuorumParameters_)(nil), + (*SingleTenantHsmInstanceProposal_RequiredActionQuorumParameters_)(nil), + (*SingleTenantHsmInstanceProposal_ExpireTime)(nil), + (*SingleTenantHsmInstanceProposal_Ttl)(nil), + (*SingleTenantHsmInstanceProposal_RegisterTwoFactorAuthKeys_)(nil), + (*SingleTenantHsmInstanceProposal_DisableSingleTenantHsmInstance_)(nil), + (*SingleTenantHsmInstanceProposal_EnableSingleTenantHsmInstance_)(nil), + (*SingleTenantHsmInstanceProposal_DeleteSingleTenantHsmInstance_)(nil), + (*SingleTenantHsmInstanceProposal_AddQuorumMember_)(nil), + (*SingleTenantHsmInstanceProposal_RemoveQuorumMember_)(nil), + (*SingleTenantHsmInstanceProposal_RefreshSingleTenantHsmInstance_)(nil), + } + file_google_cloud_kms_v1_hsm_management_proto_msgTypes[12].OneofWrappers = []any{ + (*ApproveSingleTenantHsmInstanceProposalRequest_QuorumReply_)(nil), + (*ApproveSingleTenantHsmInstanceProposalRequest_RequiredActionQuorumReply_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_kms_v1_hsm_management_proto_rawDesc, + NumEnums: 2, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_kms_v1_hsm_management_proto_goTypes, + DependencyIndexes: file_google_cloud_kms_v1_hsm_management_proto_depIdxs, + EnumInfos: file_google_cloud_kms_v1_hsm_management_proto_enumTypes, + MessageInfos: file_google_cloud_kms_v1_hsm_management_proto_msgTypes, + }.Build() + File_google_cloud_kms_v1_hsm_management_proto = out.File + file_google_cloud_kms_v1_hsm_management_proto_rawDesc = nil + file_google_cloud_kms_v1_hsm_management_proto_goTypes = nil + file_google_cloud_kms_v1_hsm_management_proto_depIdxs = nil +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management_grpc.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management_grpc.pb.go new file mode 100644 index 0000000000..aff6657c95 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/hsm_management_grpc.pb.go @@ -0,0 +1,486 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/kms/v1/hsm_management.proto + +package kmspb + +import ( + context "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + HsmManagement_ListSingleTenantHsmInstances_FullMethodName = "/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstances" + HsmManagement_GetSingleTenantHsmInstance_FullMethodName = "/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstance" + HsmManagement_CreateSingleTenantHsmInstance_FullMethodName = "/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstance" + HsmManagement_CreateSingleTenantHsmInstanceProposal_FullMethodName = "/google.cloud.kms.v1.HsmManagement/CreateSingleTenantHsmInstanceProposal" + HsmManagement_ApproveSingleTenantHsmInstanceProposal_FullMethodName = "/google.cloud.kms.v1.HsmManagement/ApproveSingleTenantHsmInstanceProposal" + HsmManagement_ExecuteSingleTenantHsmInstanceProposal_FullMethodName = "/google.cloud.kms.v1.HsmManagement/ExecuteSingleTenantHsmInstanceProposal" + HsmManagement_GetSingleTenantHsmInstanceProposal_FullMethodName = "/google.cloud.kms.v1.HsmManagement/GetSingleTenantHsmInstanceProposal" + HsmManagement_ListSingleTenantHsmInstanceProposals_FullMethodName = "/google.cloud.kms.v1.HsmManagement/ListSingleTenantHsmInstanceProposals" + HsmManagement_DeleteSingleTenantHsmInstanceProposal_FullMethodName = "/google.cloud.kms.v1.HsmManagement/DeleteSingleTenantHsmInstanceProposal" +) + +// HsmManagementClient is the client API for HsmManagement service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HsmManagementClient interface { + // Lists + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + ListSingleTenantHsmInstances(ctx context.Context, in *ListSingleTenantHsmInstancesRequest, opts ...grpc.CallOption) (*ListSingleTenantHsmInstancesResponse, error) + // Returns metadata for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + GetSingleTenantHsmInstance(ctx context.Context, in *GetSingleTenantHsmInstanceRequest, opts ...grpc.CallOption) (*SingleTenantHsmInstance, error) + // Creates a new + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in a + // given Project and Location. User must create a RegisterTwoFactorAuthKeys + // proposal with this single-tenant HSM instance to finish setup of the + // instance. + CreateSingleTenantHsmInstance(ctx context.Context, in *CreateSingleTenantHsmInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Creates a new + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + CreateSingleTenantHsmInstanceProposal(ctx context.Context, in *CreateSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Approves a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + // proposal must be in the + // [PENDING][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.PENDING] + // state. + ApproveSingleTenantHsmInstanceProposal(ctx context.Context, in *ApproveSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*ApproveSingleTenantHsmInstanceProposalResponse, error) + // Executes a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + // proposal must be in the + // [APPROVED][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.APPROVED] + // state. + ExecuteSingleTenantHsmInstanceProposal(ctx context.Context, in *ExecuteSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Returns metadata for a given + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + GetSingleTenantHsmInstanceProposal(ctx context.Context, in *GetSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*SingleTenantHsmInstanceProposal, error) + // Lists + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + ListSingleTenantHsmInstanceProposals(ctx context.Context, in *ListSingleTenantHsmInstanceProposalsRequest, opts ...grpc.CallOption) (*ListSingleTenantHsmInstanceProposalsResponse, error) + // Deletes a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + DeleteSingleTenantHsmInstanceProposal(ctx context.Context, in *DeleteSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type hsmManagementClient struct { + cc grpc.ClientConnInterface +} + +func NewHsmManagementClient(cc grpc.ClientConnInterface) HsmManagementClient { + return &hsmManagementClient{cc} +} + +func (c *hsmManagementClient) ListSingleTenantHsmInstances(ctx context.Context, in *ListSingleTenantHsmInstancesRequest, opts ...grpc.CallOption) (*ListSingleTenantHsmInstancesResponse, error) { + out := new(ListSingleTenantHsmInstancesResponse) + err := c.cc.Invoke(ctx, HsmManagement_ListSingleTenantHsmInstances_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) GetSingleTenantHsmInstance(ctx context.Context, in *GetSingleTenantHsmInstanceRequest, opts ...grpc.CallOption) (*SingleTenantHsmInstance, error) { + out := new(SingleTenantHsmInstance) + err := c.cc.Invoke(ctx, HsmManagement_GetSingleTenantHsmInstance_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) CreateSingleTenantHsmInstance(ctx context.Context, in *CreateSingleTenantHsmInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, HsmManagement_CreateSingleTenantHsmInstance_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) CreateSingleTenantHsmInstanceProposal(ctx context.Context, in *CreateSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, HsmManagement_CreateSingleTenantHsmInstanceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) ApproveSingleTenantHsmInstanceProposal(ctx context.Context, in *ApproveSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*ApproveSingleTenantHsmInstanceProposalResponse, error) { + out := new(ApproveSingleTenantHsmInstanceProposalResponse) + err := c.cc.Invoke(ctx, HsmManagement_ApproveSingleTenantHsmInstanceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) ExecuteSingleTenantHsmInstanceProposal(ctx context.Context, in *ExecuteSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, HsmManagement_ExecuteSingleTenantHsmInstanceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) GetSingleTenantHsmInstanceProposal(ctx context.Context, in *GetSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*SingleTenantHsmInstanceProposal, error) { + out := new(SingleTenantHsmInstanceProposal) + err := c.cc.Invoke(ctx, HsmManagement_GetSingleTenantHsmInstanceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) ListSingleTenantHsmInstanceProposals(ctx context.Context, in *ListSingleTenantHsmInstanceProposalsRequest, opts ...grpc.CallOption) (*ListSingleTenantHsmInstanceProposalsResponse, error) { + out := new(ListSingleTenantHsmInstanceProposalsResponse) + err := c.cc.Invoke(ctx, HsmManagement_ListSingleTenantHsmInstanceProposals_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hsmManagementClient) DeleteSingleTenantHsmInstanceProposal(ctx context.Context, in *DeleteSingleTenantHsmInstanceProposalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, HsmManagement_DeleteSingleTenantHsmInstanceProposal_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HsmManagementServer is the server API for HsmManagement service. +// All implementations should embed UnimplementedHsmManagementServer +// for forward compatibility +type HsmManagementServer interface { + // Lists + // [SingleTenantHsmInstances][google.cloud.kms.v1.SingleTenantHsmInstance]. + ListSingleTenantHsmInstances(context.Context, *ListSingleTenantHsmInstancesRequest) (*ListSingleTenantHsmInstancesResponse, error) + // Returns metadata for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + GetSingleTenantHsmInstance(context.Context, *GetSingleTenantHsmInstanceRequest) (*SingleTenantHsmInstance, error) + // Creates a new + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance] in a + // given Project and Location. User must create a RegisterTwoFactorAuthKeys + // proposal with this single-tenant HSM instance to finish setup of the + // instance. + CreateSingleTenantHsmInstance(context.Context, *CreateSingleTenantHsmInstanceRequest) (*longrunningpb.Operation, error) + // Creates a new + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. + CreateSingleTenantHsmInstanceProposal(context.Context, *CreateSingleTenantHsmInstanceProposalRequest) (*longrunningpb.Operation, error) + // Approves a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + // proposal must be in the + // [PENDING][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.PENDING] + // state. + ApproveSingleTenantHsmInstanceProposal(context.Context, *ApproveSingleTenantHsmInstanceProposalRequest) (*ApproveSingleTenantHsmInstanceProposalResponse, error) + // Executes a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal] + // for a given + // [SingleTenantHsmInstance][google.cloud.kms.v1.SingleTenantHsmInstance]. The + // proposal must be in the + // [APPROVED][google.cloud.kms.v1.SingleTenantHsmInstanceProposal.State.APPROVED] + // state. + ExecuteSingleTenantHsmInstanceProposal(context.Context, *ExecuteSingleTenantHsmInstanceProposalRequest) (*longrunningpb.Operation, error) + // Returns metadata for a given + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + GetSingleTenantHsmInstanceProposal(context.Context, *GetSingleTenantHsmInstanceProposalRequest) (*SingleTenantHsmInstanceProposal, error) + // Lists + // [SingleTenantHsmInstanceProposals][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + ListSingleTenantHsmInstanceProposals(context.Context, *ListSingleTenantHsmInstanceProposalsRequest) (*ListSingleTenantHsmInstanceProposalsResponse, error) + // Deletes a + // [SingleTenantHsmInstanceProposal][google.cloud.kms.v1.SingleTenantHsmInstanceProposal]. + DeleteSingleTenantHsmInstanceProposal(context.Context, *DeleteSingleTenantHsmInstanceProposalRequest) (*emptypb.Empty, error) +} + +// UnimplementedHsmManagementServer should be embedded to have forward compatible implementations. +type UnimplementedHsmManagementServer struct { +} + +func (UnimplementedHsmManagementServer) ListSingleTenantHsmInstances(context.Context, *ListSingleTenantHsmInstancesRequest) (*ListSingleTenantHsmInstancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSingleTenantHsmInstances not implemented") +} +func (UnimplementedHsmManagementServer) GetSingleTenantHsmInstance(context.Context, *GetSingleTenantHsmInstanceRequest) (*SingleTenantHsmInstance, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSingleTenantHsmInstance not implemented") +} +func (UnimplementedHsmManagementServer) CreateSingleTenantHsmInstance(context.Context, *CreateSingleTenantHsmInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSingleTenantHsmInstance not implemented") +} +func (UnimplementedHsmManagementServer) CreateSingleTenantHsmInstanceProposal(context.Context, *CreateSingleTenantHsmInstanceProposalRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSingleTenantHsmInstanceProposal not implemented") +} +func (UnimplementedHsmManagementServer) ApproveSingleTenantHsmInstanceProposal(context.Context, *ApproveSingleTenantHsmInstanceProposalRequest) (*ApproveSingleTenantHsmInstanceProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveSingleTenantHsmInstanceProposal not implemented") +} +func (UnimplementedHsmManagementServer) ExecuteSingleTenantHsmInstanceProposal(context.Context, *ExecuteSingleTenantHsmInstanceProposalRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecuteSingleTenantHsmInstanceProposal not implemented") +} +func (UnimplementedHsmManagementServer) GetSingleTenantHsmInstanceProposal(context.Context, *GetSingleTenantHsmInstanceProposalRequest) (*SingleTenantHsmInstanceProposal, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSingleTenantHsmInstanceProposal not implemented") +} +func (UnimplementedHsmManagementServer) ListSingleTenantHsmInstanceProposals(context.Context, *ListSingleTenantHsmInstanceProposalsRequest) (*ListSingleTenantHsmInstanceProposalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSingleTenantHsmInstanceProposals not implemented") +} +func (UnimplementedHsmManagementServer) DeleteSingleTenantHsmInstanceProposal(context.Context, *DeleteSingleTenantHsmInstanceProposalRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSingleTenantHsmInstanceProposal not implemented") +} + +// UnsafeHsmManagementServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HsmManagementServer will +// result in compilation errors. +type UnsafeHsmManagementServer interface { + mustEmbedUnimplementedHsmManagementServer() +} + +func RegisterHsmManagementServer(s grpc.ServiceRegistrar, srv HsmManagementServer) { + s.RegisterService(&HsmManagement_ServiceDesc, srv) +} + +func _HsmManagement_ListSingleTenantHsmInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSingleTenantHsmInstancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).ListSingleTenantHsmInstances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_ListSingleTenantHsmInstances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).ListSingleTenantHsmInstances(ctx, req.(*ListSingleTenantHsmInstancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_GetSingleTenantHsmInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSingleTenantHsmInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).GetSingleTenantHsmInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_GetSingleTenantHsmInstance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).GetSingleTenantHsmInstance(ctx, req.(*GetSingleTenantHsmInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_CreateSingleTenantHsmInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSingleTenantHsmInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).CreateSingleTenantHsmInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_CreateSingleTenantHsmInstance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).CreateSingleTenantHsmInstance(ctx, req.(*CreateSingleTenantHsmInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_CreateSingleTenantHsmInstanceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSingleTenantHsmInstanceProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).CreateSingleTenantHsmInstanceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_CreateSingleTenantHsmInstanceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).CreateSingleTenantHsmInstanceProposal(ctx, req.(*CreateSingleTenantHsmInstanceProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_ApproveSingleTenantHsmInstanceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApproveSingleTenantHsmInstanceProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).ApproveSingleTenantHsmInstanceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_ApproveSingleTenantHsmInstanceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).ApproveSingleTenantHsmInstanceProposal(ctx, req.(*ApproveSingleTenantHsmInstanceProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_ExecuteSingleTenantHsmInstanceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteSingleTenantHsmInstanceProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).ExecuteSingleTenantHsmInstanceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_ExecuteSingleTenantHsmInstanceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).ExecuteSingleTenantHsmInstanceProposal(ctx, req.(*ExecuteSingleTenantHsmInstanceProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_GetSingleTenantHsmInstanceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSingleTenantHsmInstanceProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).GetSingleTenantHsmInstanceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_GetSingleTenantHsmInstanceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).GetSingleTenantHsmInstanceProposal(ctx, req.(*GetSingleTenantHsmInstanceProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_ListSingleTenantHsmInstanceProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSingleTenantHsmInstanceProposalsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).ListSingleTenantHsmInstanceProposals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_ListSingleTenantHsmInstanceProposals_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).ListSingleTenantHsmInstanceProposals(ctx, req.(*ListSingleTenantHsmInstanceProposalsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HsmManagement_DeleteSingleTenantHsmInstanceProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSingleTenantHsmInstanceProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HsmManagementServer).DeleteSingleTenantHsmInstanceProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HsmManagement_DeleteSingleTenantHsmInstanceProposal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HsmManagementServer).DeleteSingleTenantHsmInstanceProposal(ctx, req.(*DeleteSingleTenantHsmInstanceProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// HsmManagement_ServiceDesc is the grpc.ServiceDesc for HsmManagement service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HsmManagement_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.kms.v1.HsmManagement", + HandlerType: (*HsmManagementServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListSingleTenantHsmInstances", + Handler: _HsmManagement_ListSingleTenantHsmInstances_Handler, + }, + { + MethodName: "GetSingleTenantHsmInstance", + Handler: _HsmManagement_GetSingleTenantHsmInstance_Handler, + }, + { + MethodName: "CreateSingleTenantHsmInstance", + Handler: _HsmManagement_CreateSingleTenantHsmInstance_Handler, + }, + { + MethodName: "CreateSingleTenantHsmInstanceProposal", + Handler: _HsmManagement_CreateSingleTenantHsmInstanceProposal_Handler, + }, + { + MethodName: "ApproveSingleTenantHsmInstanceProposal", + Handler: _HsmManagement_ApproveSingleTenantHsmInstanceProposal_Handler, + }, + { + MethodName: "ExecuteSingleTenantHsmInstanceProposal", + Handler: _HsmManagement_ExecuteSingleTenantHsmInstanceProposal_Handler, + }, + { + MethodName: "GetSingleTenantHsmInstanceProposal", + Handler: _HsmManagement_GetSingleTenantHsmInstanceProposal_Handler, + }, + { + MethodName: "ListSingleTenantHsmInstanceProposals", + Handler: _HsmManagement_ListSingleTenantHsmInstanceProposals_Handler, + }, + { + MethodName: "DeleteSingleTenantHsmInstanceProposal", + Handler: _HsmManagement_DeleteSingleTenantHsmInstanceProposal_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/kms/v1/hsm_management.proto", +} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go index 4ba8029e40..3914d208ec 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/resources.pb.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,14 +21,15 @@ package kmspb import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( @@ -54,6 +55,8 @@ const ( ProtectionLevel_EXTERNAL ProtectionLevel = 3 // Crypto operations are performed in an EKM-over-VPC backend. ProtectionLevel_EXTERNAL_VPC ProtectionLevel = 4 + // Crypto operations are performed in a single-tenant HSM. + ProtectionLevel_HSM_SINGLE_TENANT ProtectionLevel = 5 ) // Enum value maps for ProtectionLevel. @@ -64,6 +67,7 @@ var ( 2: "HSM", 3: "EXTERNAL", 4: "EXTERNAL_VPC", + 5: "HSM_SINGLE_TENANT", } ProtectionLevel_value = map[string]int32{ "PROTECTION_LEVEL_UNSPECIFIED": 0, @@ -71,6 +75,7 @@ var ( "HSM": 2, "EXTERNAL": 3, "EXTERNAL_VPC": 4, + "HSM_SINGLE_TENANT": 5, } ) @@ -125,6 +130,12 @@ const ( AccessReason_GOOGLE_INITIATED_SYSTEM_OPERATION AccessReason = 6 // No reason is expected for this key request. AccessReason_REASON_NOT_EXPECTED AccessReason = 7 + // Deprecated: This code is no longer generated by + // Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes + // available in both Key Access Justifications and Access Transparency logs + // provide customer-visible signals of emergency access in more precise + // contexts. + // // Customer uses their account to perform any access to their own data which // their IAM policy authorizes, and one of the following is true: // @@ -133,7 +144,15 @@ const ( // - A Google-initiated emergency access operation has interacted with a // resource in the same project or folder as the currently accessed resource // within the past 7 days. + // + // Deprecated: Marked as deprecated in google/cloud/kms/v1/resources.proto. AccessReason_MODIFIED_CUSTOMER_INITIATED_ACCESS AccessReason = 8 + // Deprecated: This code is no longer generated by + // Google Cloud. The GOOGLE_RESPONSE_TO_PRODUCTION_ALERT justification codes + // available in both Key Access Justifications and Access Transparency logs + // provide customer-visible signals of emergency access in more precise + // contexts. + // // Google systems access customer data to help optimize the structure of the // data or quality for future uses by the customer, and one of the following // is true: @@ -143,6 +162,8 @@ const ( // - A Google-initiated emergency access operation has interacted with a // resource in the same project or folder as the currently accessed resource // within the past 7 days. + // + // Deprecated: Marked as deprecated in google/cloud/kms/v1/resources.proto. AccessReason_MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION AccessReason = 9 // Google-initiated access to maintain system reliability. AccessReason_GOOGLE_RESPONSE_TO_PRODUCTION_ALERT AccessReason = 10 @@ -253,17 +274,23 @@ const ( // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used // with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. CryptoKey_MAC CryptoKey_CryptoKeyPurpose = 9 + // [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + // with + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + // and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate]. + CryptoKey_KEY_ENCAPSULATION CryptoKey_CryptoKeyPurpose = 10 ) // Enum value maps for CryptoKey_CryptoKeyPurpose. var ( CryptoKey_CryptoKeyPurpose_name = map[int32]string{ - 0: "CRYPTO_KEY_PURPOSE_UNSPECIFIED", - 1: "ENCRYPT_DECRYPT", - 5: "ASYMMETRIC_SIGN", - 6: "ASYMMETRIC_DECRYPT", - 7: "RAW_ENCRYPT_DECRYPT", - 9: "MAC", + 0: "CRYPTO_KEY_PURPOSE_UNSPECIFIED", + 1: "ENCRYPT_DECRYPT", + 5: "ASYMMETRIC_SIGN", + 6: "ASYMMETRIC_DECRYPT", + 7: "RAW_ENCRYPT_DECRYPT", + 9: "MAC", + 10: "KEY_ENCAPSULATION", } CryptoKey_CryptoKeyPurpose_value = map[string]int32{ "CRYPTO_KEY_PURPOSE_UNSPECIFIED": 0, @@ -272,6 +299,7 @@ var ( "ASYMMETRIC_DECRYPT": 6, "RAW_ENCRYPT_DECRYPT": 7, "MAC": 9, + "KEY_ENCAPSULATION": 10, } ) @@ -489,6 +517,13 @@ const ( CryptoKeyVersion_HMAC_SHA224 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 36 // Algorithm representing symmetric encryption by an external key manager. CryptoKeyVersion_EXTERNAL_SYMMETRIC_ENCRYPTION CryptoKeyVersion_CryptoKeyVersionAlgorithm = 18 + // ML-KEM-768 (FIPS 203) + CryptoKeyVersion_ML_KEM_768 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 47 + // ML-KEM-1024 (FIPS 203) + CryptoKeyVersion_ML_KEM_1024 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 48 + // X-Wing hybrid KEM combining ML-KEM-768 with X25519 following + // datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/. + CryptoKeyVersion_KEM_XWING CryptoKeyVersion_CryptoKeyVersionAlgorithm = 63 // The post-quantum Module-Lattice-Based Digital Signature Algorithm, at // security level 3. Randomized version. CryptoKeyVersion_PQ_SIGN_ML_DSA_65 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 56 @@ -536,6 +571,9 @@ var ( 35: "HMAC_SHA512", 36: "HMAC_SHA224", 18: "EXTERNAL_SYMMETRIC_ENCRYPTION", + 47: "ML_KEM_768", + 48: "ML_KEM_1024", + 63: "KEM_XWING", 56: "PQ_SIGN_ML_DSA_65", 57: "PQ_SIGN_SLH_DSA_SHA2_128S", } @@ -576,6 +614,9 @@ var ( "HMAC_SHA512": 35, "HMAC_SHA224": 36, "EXTERNAL_SYMMETRIC_ENCRYPTION": 18, + "ML_KEM_768": 47, + "ML_KEM_1024": 48, + "KEM_XWING": 63, "PQ_SIGN_ML_DSA_65": 56, "PQ_SIGN_SLH_DSA_SHA2_128S": 57, } @@ -807,10 +848,16 @@ const ( // and [Textual Encoding of Subject Public Key Info] // (https://tools.ietf.org/html/rfc7468#section-13) for more information. PublicKey_PEM PublicKey_PublicKeyFormat = 1 + // The returned public key will be encoded in DER format (the + // PrivateKeyInfo structure from RFC 5208). + PublicKey_DER PublicKey_PublicKeyFormat = 2 // This is supported only for PQC algorithms. // The key material is returned in the format defined by NIST PQC // standards (FIPS 203, FIPS 204, and FIPS 205). PublicKey_NIST_PQC PublicKey_PublicKeyFormat = 3 + // The returned public key is in raw bytes format defined in its standard + // https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem. + PublicKey_XWING_RAW_BYTES PublicKey_PublicKeyFormat = 4 ) // Enum value maps for PublicKey_PublicKeyFormat. @@ -818,12 +865,16 @@ var ( PublicKey_PublicKeyFormat_name = map[int32]string{ 0: "PUBLIC_KEY_FORMAT_UNSPECIFIED", 1: "PEM", + 2: "DER", 3: "NIST_PQC", + 4: "XWING_RAW_BYTES", } PublicKey_PublicKeyFormat_value = map[string]int32{ "PUBLIC_KEY_FORMAT_UNSPECIFIED": 0, "PEM": 1, + "DER": 2, "NIST_PQC": 3, + "XWING_RAW_BYTES": 4, } ) @@ -1159,7 +1210,12 @@ type CryptoKey struct { // if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of // [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC], with the - // resource name in the format `projects/*/locations/*/ekmConnections/*`. + // resource name in the format `projects/*/locations/*/ekmConnections/*`. Only + // applicable if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + // have a [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + // [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT], + // with the resource name in the format + // `projects/*/locations/*/singleTenantHsmInstances/*`. // Note, this list is non-exhaustive and may apply to additional // [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. CryptoKeyBackend string `protobuf:"bytes,15,opt,name=crypto_key_backend,json=cryptoKeyBackend,proto3" json:"crypto_key_backend,omitempty"` @@ -1972,6 +2028,15 @@ type ImportJob struct { // [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a // protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. Attestation *KeyOperationAttestation `protobuf:"bytes,8,opt,name=attestation,proto3" json:"attestation,omitempty"` + // Immutable. The resource name of the backend environment where the key + // material for the wrapping key resides and where all related cryptographic + // operations are performed. Currently, this field is only populated for keys + // stored in HSM_SINGLE_TENANT. Note, this list is non-exhaustive and may + // apply to additional [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] + // in the future. + // Supported resources: + // * `"projects/*/locations/*/singleTenantHsmInstances/*"` + CryptoKeyBackend string `protobuf:"bytes,11,opt,name=crypto_key_backend,json=cryptoKeyBackend,proto3" json:"crypto_key_backend,omitempty"` } func (x *ImportJob) Reset() { @@ -2074,6 +2139,13 @@ func (x *ImportJob) GetAttestation() *KeyOperationAttestation { return nil } +func (x *ImportJob) GetCryptoKeyBackend() string { + if x != nil { + return x.CryptoKeyBackend + } + return "" +} + // ExternalProtectionLevelOptions stores a group of additional fields for // configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that // are specific to the [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] @@ -2343,7 +2415,7 @@ var file_google_cloud_kms_v1_resources_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, - 0x7d, 0x22, 0xd4, 0x09, 0x0a, 0x09, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, + 0x7d, 0x22, 0xeb, 0x09, 0x0a, 0x09, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, @@ -2401,7 +2473,7 @@ var file_google_cloud_kms_v1_resources_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x43, 0x72, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x50, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, @@ -2411,420 +2483,432 @@ var file_google_cloud_kms_v1_resources_proto_rawDesc = []byte{ 0x41, 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x07, 0x12, 0x07, 0x0a, - 0x03, 0x4d, 0x41, 0x43, 0x10, 0x09, 0x3a, 0x7b, 0xea, 0x41, 0x78, 0x0a, 0x21, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, 0x53, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, - 0x65, 0x79, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x62, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x22, 0x83, 0x04, 0x0a, 0x17, 0x4b, - 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, - 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x65, - 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x1a, 0x98, 0x01, 0x0a, 0x11, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x63, 0x61, 0x76, 0x69, 0x75, 0x6d, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x76, 0x69, 0x75, 0x6d, 0x43, 0x65, 0x72, 0x74, - 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x64, - 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x61, 0x72, 0x64, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, - 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, - 0x72, 0x74, 0x73, 0x22, 0x6b, 0x0a, 0x11, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x54, 0x54, 0x45, - 0x53, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, - 0x43, 0x41, 0x56, 0x49, 0x55, 0x4d, 0x5f, 0x56, 0x31, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, - 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x56, 0x49, 0x55, 0x4d, - 0x5f, 0x56, 0x32, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x04, - 0x22, 0xbf, 0x15, 0x0a, 0x10, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x51, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, + 0x03, 0x4d, 0x41, 0x43, 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, + 0x43, 0x41, 0x50, 0x53, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x3a, 0x7b, 0xea, + 0x41, 0x78, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, + 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, + 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x72, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, + 0xcf, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x10, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x62, 0x0a, + 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x22, 0x83, 0x04, 0x0a, 0x17, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x54, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x62, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x03, - 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x53, 0x0a, 0x0b, 0x61, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, - 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, - 0x72, 0x6f, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x12, - 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x72, - 0x6f, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x69, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, - 0x40, 0x0a, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x37, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x13, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x19, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x23, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x20, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, - 0x7e, 0x0a, 0x21, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x1e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x30, 0x0a, 0x11, 0x72, 0x65, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6c, 0x69, 0x67, - 0x69, 0x62, 0x6c, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x10, 0x72, 0x65, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, - 0x65, 0x22, 0x98, 0x08, 0x0a, 0x19, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, - 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x45, - 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, - 0x1b, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, - 0x43, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0f, - 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x29, 0x12, - 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x13, - 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x43, 0x42, 0x43, 0x10, - 0x2a, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x43, 0x42, 0x43, - 0x10, 0x2b, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x43, 0x54, - 0x52, 0x10, 0x2c, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x43, - 0x54, 0x52, 0x10, 0x2d, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, - 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, - 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, - 0x53, 0x53, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x03, - 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x53, 0x53, - 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x1c, - 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x34, - 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x0f, 0x12, 0x1e, 0x0a, 0x1a, - 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x32, - 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, - 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x33, - 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, - 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, - 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, - 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, - 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x10, 0x12, 0x1b, 0x0a, 0x17, - 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x4b, 0x43, - 0x53, 0x31, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x10, 0x1c, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x53, 0x41, - 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, - 0x33, 0x30, 0x37, 0x32, 0x10, 0x1d, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, - 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, - 0x36, 0x10, 0x1e, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, - 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, - 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, - 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x09, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x44, - 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, - 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0a, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, - 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, - 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x52, - 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, - 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x25, 0x12, 0x1e, 0x0a, 0x1a, 0x52, - 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, - 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x26, 0x12, 0x1e, 0x0a, 0x1a, 0x52, - 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, - 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x27, 0x12, 0x17, 0x0a, 0x13, 0x45, - 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, - 0x35, 0x36, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, - 0x50, 0x33, 0x38, 0x34, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0d, 0x12, 0x1c, 0x0a, - 0x18, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, - 0x4b, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x1f, 0x12, 0x13, 0x0a, 0x0f, 0x45, - 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x28, - 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, - 0x20, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x21, - 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, - 0x22, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, - 0x10, 0x23, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x32, - 0x34, 0x10, 0x24, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, - 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x12, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x51, 0x5f, 0x53, 0x49, 0x47, - 0x4e, 0x5f, 0x4d, 0x4c, 0x5f, 0x44, 0x53, 0x41, 0x5f, 0x36, 0x35, 0x10, 0x38, 0x12, 0x1d, 0x0a, - 0x19, 0x50, 0x51, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x53, 0x4c, 0x48, 0x5f, 0x44, 0x53, 0x41, - 0x5f, 0x53, 0x48, 0x41, 0x32, 0x5f, 0x31, 0x32, 0x38, 0x53, 0x10, 0x39, 0x22, 0x9b, 0x02, 0x0a, - 0x15, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x24, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, - 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, - 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, - 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x45, 0x44, - 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x5f, 0x53, 0x43, - 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, - 0x0d, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, - 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x4e, 0x44, 0x49, - 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x53, 0x54, - 0x52, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x58, 0x54, - 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x0a, 0x22, 0x49, 0x0a, 0x14, 0x43, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x69, - 0x65, 0x77, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, 0x5f, 0x4b, 0x45, 0x59, - 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, - 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x3a, 0xaa, 0x01, 0xea, 0x41, 0xa6, 0x01, 0x0a, 0x28, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, - 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, - 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x7d, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x0f, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0e, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, - 0xbc, 0x05, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x70, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x65, 0x6d, 0x12, - 0x5d, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x3a, - 0x0a, 0x0a, 0x70, 0x65, 0x6d, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x09, 0x70, 0x65, 0x6d, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, - 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x5a, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x22, 0x4b, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x4b, 0x45, - 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x45, 0x4d, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x4e, 0x49, 0x53, 0x54, 0x5f, 0x50, 0x51, 0x43, 0x10, 0x03, 0x3a, 0xae, 0x01, - 0xea, 0x41, 0xaa, 0x01, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x84, 0x01, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, - 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, - 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0xd4, - 0x09, 0x0a, 0x09, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x0a, 0x04, + 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x0b, 0x63, 0x65, 0x72, + 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x1a, + 0x98, 0x01, 0x0a, 0x11, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x76, 0x69, 0x75, 0x6d, 0x5f, + 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x76, + 0x69, 0x75, 0x6d, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x43, 0x61, 0x72, 0x64, 0x43, + 0x65, 0x72, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x73, 0x22, 0x6b, 0x0a, 0x11, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, + 0x22, 0x0a, 0x1e, 0x41, 0x54, 0x54, 0x45, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x56, 0x49, 0x55, 0x4d, 0x5f, 0x56, 0x31, + 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, + 0x14, 0x43, 0x41, 0x56, 0x49, 0x55, 0x4d, 0x5f, 0x56, 0x32, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, + 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x04, 0x22, 0xef, 0x15, 0x0a, 0x10, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x2e, 0x49, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, - 0x05, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x57, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, - 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x40, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x70, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x62, + 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x12, 0x53, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, + 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x42, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x5f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x40, 0x0a, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x69, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x13, 0x69, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x23, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x65, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x21, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x69, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x72, 0x65, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x22, 0xc8, 0x08, 0x0a, 0x19, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, + 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, + 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x53, + 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, + 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x29, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, + 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x13, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x31, + 0x32, 0x38, 0x5f, 0x43, 0x42, 0x43, 0x10, 0x2a, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, + 0x32, 0x35, 0x36, 0x5f, 0x43, 0x42, 0x43, 0x10, 0x2b, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, + 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x43, 0x54, 0x52, 0x10, 0x2c, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x45, + 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x43, 0x54, 0x52, 0x10, 0x2d, 0x12, 0x1c, 0x0a, 0x18, 0x52, + 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x32, 0x30, 0x34, 0x38, + 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, + 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, + 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, + 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, + 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, + 0x4e, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, + 0x32, 0x10, 0x0f, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, + 0x36, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, + 0x36, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, + 0x36, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, + 0x32, 0x10, 0x10, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x52, 0x41, 0x57, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x10, 0x1c, + 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x57, + 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x10, 0x1d, 0x12, 0x1b, 0x0a, + 0x17, 0x52, 0x53, 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x4b, + 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x10, 0x1e, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, + 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x32, + 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, + 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, + 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x09, 0x12, 0x20, + 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, 0x4f, 0x41, + 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0a, + 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x5f, + 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, + 0x10, 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, + 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x31, + 0x10, 0x25, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, + 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x31, + 0x10, 0x26, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, + 0x54, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x31, + 0x10, 0x27, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x32, + 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x45, + 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x5f, 0x53, 0x48, 0x41, 0x33, + 0x38, 0x34, 0x10, 0x0d, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, + 0x10, 0x1f, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x44, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x28, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, + 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x20, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x4d, 0x41, 0x43, + 0x5f, 0x53, 0x48, 0x41, 0x31, 0x10, 0x21, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, 0x5f, + 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x22, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, 0x43, + 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x23, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x4d, 0x41, + 0x43, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x32, 0x34, 0x10, 0x24, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x58, + 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x59, 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, + 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x12, 0x12, 0x0e, 0x0a, + 0x0a, 0x4d, 0x4c, 0x5f, 0x4b, 0x45, 0x4d, 0x5f, 0x37, 0x36, 0x38, 0x10, 0x2f, 0x12, 0x0f, 0x0a, + 0x0b, 0x4d, 0x4c, 0x5f, 0x4b, 0x45, 0x4d, 0x5f, 0x31, 0x30, 0x32, 0x34, 0x10, 0x30, 0x12, 0x0d, + 0x0a, 0x09, 0x4b, 0x45, 0x4d, 0x5f, 0x58, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x3f, 0x12, 0x15, 0x0a, + 0x11, 0x50, 0x51, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x4d, 0x4c, 0x5f, 0x44, 0x53, 0x41, 0x5f, + 0x36, 0x35, 0x10, 0x38, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x51, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, + 0x53, 0x4c, 0x48, 0x5f, 0x44, 0x53, 0x41, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x5f, 0x31, 0x32, 0x38, + 0x53, 0x10, 0x39, 0x22, 0x9b, 0x02, 0x0a, 0x15, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, + 0x24, 0x43, 0x52, 0x59, 0x50, 0x54, 0x4f, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, + 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, + 0x53, 0x54, 0x52, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x53, + 0x54, 0x52, 0x4f, 0x59, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x04, + 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4d, 0x50, 0x4f, + 0x52, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4e, 0x45, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x20, + 0x0a, 0x1c, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, + 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, + 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x45, 0x53, + 0x54, 0x52, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x0a, 0x22, 0x49, 0x0a, 0x14, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x69, 0x65, 0x77, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x52, 0x59, + 0x50, 0x54, 0x4f, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x3a, 0xaa, 0x01, 0xea, + 0x41, 0xa6, 0x01, 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, + 0x79, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x44, 0x0a, 0x0f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, + 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xda, 0x05, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x70, 0x65, 0x6d, 0x12, 0x5d, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, + 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x3a, 0x0a, 0x0a, 0x70, 0x65, 0x6d, 0x5f, 0x63, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, + 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x65, 0x6d, 0x43, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x5a, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x69, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x55, + 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x50, 0x45, 0x4d, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x4e, 0x49, 0x53, 0x54, 0x5f, 0x50, 0x51, 0x43, 0x10, 0x03, 0x12, 0x13, 0x0a, + 0x0f, 0x58, 0x57, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x41, 0x57, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, + 0x10, 0x04, 0x3a, 0xae, 0x01, 0xea, 0x41, 0xaa, 0x01, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x84, 0x01, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, + 0x79, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x22, 0x8d, 0x0a, 0x0a, 0x09, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, + 0x62, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x69, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, + 0x62, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x06, + 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x57, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x2e, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x2e, 0x57, 0x72, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x53, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x25, 0x0a, 0x11, 0x57, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x65, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x65, 0x6d, 0x22, 0xe5, 0x01, 0x0a, 0x0c, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x19, - 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x52, - 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, - 0x31, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x44, 0x0a, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x4a, 0x6f, 0x62, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x54, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, + 0x6f, 0x62, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x12, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x03, 0x0a, 0x01, 0x2a, + 0x52, 0x10, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x1a, 0x25, 0x0a, 0x11, 0x57, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x65, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x65, 0x6d, 0x22, 0xe5, 0x01, 0x0a, 0x0c, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4d, + 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, + 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x5f, + 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, 0x41, + 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x31, 0x5f, + 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, + 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, + 0x36, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, - 0x31, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x52, - 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x03, 0x12, 0x20, 0x0a, - 0x1c, 0x52, 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, - 0x48, 0x41, 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, - 0x18, 0x0a, 0x14, 0x52, 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, - 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x53, 0x41, - 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, - 0x36, 0x10, 0x06, 0x22, 0x63, 0x0a, 0x0e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, - 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x4e, 0x44, 0x49, - 0x4e, 0x47, 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x45, - 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x7b, 0xea, 0x41, 0x78, 0x0a, 0x21, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, - 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x69, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x5f, 0x6a, 0x6f, 0x62, 0x7d, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x55, - 0x72, 0x69, 0x12, 0x35, 0x0a, 0x17, 0x65, 0x6b, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x14, 0x65, 0x6b, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x22, 0x78, 0x0a, 0x1d, 0x4b, 0x65, 0x79, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x57, 0x0a, 0x16, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x14, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x73, 0x2a, 0x6a, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4f, 0x46, 0x54, - 0x57, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x53, 0x4d, 0x10, 0x02, 0x12, - 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x10, 0x0a, - 0x0c, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x56, 0x50, 0x43, 0x10, 0x04, 0x2a, - 0xab, 0x03, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x55, 0x53, 0x54, - 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, - 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x47, 0x4f, 0x4f, 0x47, - 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x45, 0x52, - 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, - 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, - 0x53, 0x54, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, - 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, - 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x05, - 0x12, 0x25, 0x0a, 0x21, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, - 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4f, 0x50, 0x45, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x07, - 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x43, 0x55, 0x53, - 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, - 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x08, 0x12, 0x2e, 0x0a, 0x2a, 0x4d, 0x4f, 0x44, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x5f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, - 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4f, 0x50, 0x45, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x27, 0x0a, 0x23, 0x47, 0x4f, 0x4f, 0x47, - 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x50, - 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, - 0x0a, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x41, 0x55, - 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, - 0x57, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x0b, 0x42, 0x85, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x4b, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x6b, 0x6d, - 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4b, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4b, - 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x35, 0x36, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x18, 0x0a, + 0x14, 0x52, 0x53, 0x41, 0x5f, 0x4f, 0x41, 0x45, 0x50, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, 0x53, + 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x53, 0x41, 0x5f, 0x4f, + 0x41, 0x45, 0x50, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, + 0x06, 0x22, 0x63, 0x0a, 0x0e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x4a, 0x4f, + 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x7b, 0xea, 0x41, 0x78, 0x0a, 0x21, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x53, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x69, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, + 0x6f, 0x62, 0x7d, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x55, 0x72, 0x69, + 0x12, 0x35, 0x0a, 0x17, 0x65, 0x6b, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x65, 0x6b, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x50, 0x61, 0x74, 0x68, 0x22, 0x78, 0x0a, 0x1d, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x57, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x14, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x73, 0x2a, 0x81, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4f, 0x46, 0x54, 0x57, + 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x48, 0x53, 0x4d, 0x10, 0x02, 0x12, 0x0c, + 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, + 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x56, 0x50, 0x43, 0x10, 0x04, 0x12, 0x15, + 0x0a, 0x11, 0x48, 0x53, 0x4d, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x54, 0x45, 0x4e, + 0x41, 0x4e, 0x54, 0x10, 0x05, 0x2a, 0xb3, 0x03, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, + 0x0a, 0x1a, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, + 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x01, 0x12, 0x1c, + 0x0a, 0x18, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, + 0x45, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, + 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x4f, + 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x52, + 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x55, 0x53, 0x54, 0x4f, + 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x05, 0x12, 0x25, 0x0a, 0x21, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, + 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, + 0x4d, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x17, 0x0a, + 0x13, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x50, 0x45, + 0x43, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x2a, 0x0a, 0x22, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, + 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x08, 0x1a, 0x02, + 0x08, 0x01, 0x12, 0x32, 0x0a, 0x2a, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x47, + 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x5f, + 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x09, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, + 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, + 0x44, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x0a, 0x12, + 0x2a, 0x0a, 0x26, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45, 0x52, 0x5f, 0x41, 0x55, 0x54, 0x48, + 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, + 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x0b, 0x42, 0x85, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x4b, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x6b, 0x6d, 0x73, 0x70, + 0x62, 0x3b, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4b, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4b, 0x6d, 0x73, + 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go index 0f8a7a94f0..bfdc116e48 100644 --- a/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service.pb.go @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,17 +21,14 @@ package kmspb import ( - context "context" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( @@ -2787,6 +2784,94 @@ func (x *MacVerifyRequest) GetMacCrc32C() *wrapperspb.Int64Value { return nil } +// Request message for +// [KeyManagementService.Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate]. +type DecapsulateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + // decapsulation. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The ciphertext produced from encapsulation with the + // named [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public + // key(s). + Ciphertext []byte `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` + // Optional. A CRC32C checksum of the + // [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. + // If specified, + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + // verify the integrity of the received + // [DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext] + // using this checksum. + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + // report an error if the checksum verification fails. If you receive a + // checksum error, your client should verify that + // CRC32C([DecapsulateRequest.ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]) + // is equal to + // [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c], + // and if so, perform a limited number of retries. A persistent mismatch may + // indicate an issue in your computation of the CRC32C checksum. Note: This + // field is defined as int64 for reasons of compatibility across different + // languages. However, it is a non-negative integer, which will never exceed + // 2^32-1, and can be safely downconverted to uint32 in languages that support + // this type. + CiphertextCrc32C *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=ciphertext_crc32c,json=ciphertextCrc32c,proto3" json:"ciphertext_crc32c,omitempty"` +} + +func (x *DecapsulateRequest) Reset() { + *x = DecapsulateRequest{} + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecapsulateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecapsulateRequest) ProtoMessage() {} + +func (x *DecapsulateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecapsulateRequest.ProtoReflect.Descriptor instead. +func (*DecapsulateRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{31} +} + +func (x *DecapsulateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DecapsulateRequest) GetCiphertext() []byte { + if x != nil { + return x.Ciphertext + } + return nil +} + +func (x *DecapsulateRequest) GetCiphertextCrc32C() *wrapperspb.Int64Value { + if x != nil { + return x.CiphertextCrc32C + } + return nil +} + // Request message for // [KeyManagementService.GenerateRandomBytes][google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes]. type GenerateRandomBytesRequest struct { @@ -2809,7 +2894,7 @@ type GenerateRandomBytesRequest struct { func (x *GenerateRandomBytesRequest) Reset() { *x = GenerateRandomBytesRequest{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2821,7 +2906,7 @@ func (x *GenerateRandomBytesRequest) String() string { func (*GenerateRandomBytesRequest) ProtoMessage() {} func (x *GenerateRandomBytesRequest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[31] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2834,7 +2919,7 @@ func (x *GenerateRandomBytesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GenerateRandomBytesRequest.ProtoReflect.Descriptor instead. func (*GenerateRandomBytesRequest) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{31} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{32} } func (x *GenerateRandomBytesRequest) GetLocation() string { @@ -2924,7 +3009,7 @@ type EncryptResponse struct { func (x *EncryptResponse) Reset() { *x = EncryptResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2936,7 +3021,7 @@ func (x *EncryptResponse) String() string { func (*EncryptResponse) ProtoMessage() {} func (x *EncryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[32] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2949,7 +3034,7 @@ func (x *EncryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead. func (*EncryptResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{32} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{33} } func (x *EncryptResponse) GetName() string { @@ -3032,7 +3117,7 @@ type DecryptResponse struct { func (x *DecryptResponse) Reset() { *x = DecryptResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3044,7 +3129,7 @@ func (x *DecryptResponse) String() string { func (*DecryptResponse) ProtoMessage() {} func (x *DecryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[33] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3057,7 +3142,7 @@ func (x *DecryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DecryptResponse.ProtoReflect.Descriptor instead. func (*DecryptResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{33} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{34} } func (x *DecryptResponse) GetPlaintext() []byte { @@ -3184,7 +3269,7 @@ type RawEncryptResponse struct { func (x *RawEncryptResponse) Reset() { *x = RawEncryptResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3196,7 +3281,7 @@ func (x *RawEncryptResponse) String() string { func (*RawEncryptResponse) ProtoMessage() {} func (x *RawEncryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[34] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3209,7 +3294,7 @@ func (x *RawEncryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RawEncryptResponse.ProtoReflect.Descriptor instead. func (*RawEncryptResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{34} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{35} } func (x *RawEncryptResponse) GetCiphertext() []byte { @@ -3357,7 +3442,7 @@ type RawDecryptResponse struct { func (x *RawDecryptResponse) Reset() { *x = RawDecryptResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3369,7 +3454,7 @@ func (x *RawDecryptResponse) String() string { func (*RawDecryptResponse) ProtoMessage() {} func (x *RawDecryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[35] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3382,7 +3467,7 @@ func (x *RawDecryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RawDecryptResponse.ProtoReflect.Descriptor instead. func (*RawDecryptResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{35} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{36} } func (x *RawDecryptResponse) GetPlaintext() []byte { @@ -3491,7 +3576,7 @@ type AsymmetricSignResponse struct { func (x *AsymmetricSignResponse) Reset() { *x = AsymmetricSignResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3503,7 +3588,7 @@ func (x *AsymmetricSignResponse) String() string { func (*AsymmetricSignResponse) ProtoMessage() {} func (x *AsymmetricSignResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[36] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3516,7 +3601,7 @@ func (x *AsymmetricSignResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AsymmetricSignResponse.ProtoReflect.Descriptor instead. func (*AsymmetricSignResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{36} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{37} } func (x *AsymmetricSignResponse) GetSignature() []byte { @@ -3607,7 +3692,7 @@ type AsymmetricDecryptResponse struct { func (x *AsymmetricDecryptResponse) Reset() { *x = AsymmetricDecryptResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3619,7 +3704,7 @@ func (x *AsymmetricDecryptResponse) String() string { func (*AsymmetricDecryptResponse) ProtoMessage() {} func (x *AsymmetricDecryptResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[37] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3632,7 +3717,7 @@ func (x *AsymmetricDecryptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AsymmetricDecryptResponse.ProtoReflect.Descriptor instead. func (*AsymmetricDecryptResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{37} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{38} } func (x *AsymmetricDecryptResponse) GetPlaintext() []byte { @@ -3712,7 +3797,7 @@ type MacSignResponse struct { func (x *MacSignResponse) Reset() { *x = MacSignResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3724,7 +3809,7 @@ func (x *MacSignResponse) String() string { func (*MacSignResponse) ProtoMessage() {} func (x *MacSignResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[38] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3737,7 +3822,7 @@ func (x *MacSignResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MacSignResponse.ProtoReflect.Descriptor instead. func (*MacSignResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{38} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{39} } func (x *MacSignResponse) GetName() string { @@ -3835,7 +3920,7 @@ type MacVerifyResponse struct { func (x *MacVerifyResponse) Reset() { *x = MacVerifyResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3847,7 +3932,7 @@ func (x *MacVerifyResponse) String() string { func (*MacVerifyResponse) ProtoMessage() {} func (x *MacVerifyResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[39] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3860,7 +3945,7 @@ func (x *MacVerifyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MacVerifyResponse.ProtoReflect.Descriptor instead. func (*MacVerifyResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{39} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{40} } func (x *MacVerifyResponse) GetName() string { @@ -3905,6 +3990,125 @@ func (x *MacVerifyResponse) GetProtectionLevel() ProtectionLevel { return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED } +// Response message for +// [KeyManagementService.Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate]. +type DecapsulateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + // decapsulation. Check this field to verify that the intended resource was + // used for decapsulation. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The decapsulated shared_secret originally encapsulated with the matching + // public key. + SharedSecret []byte `protobuf:"bytes,2,opt,name=shared_secret,json=sharedSecret,proto3" json:"shared_secret,omitempty"` + // Integrity verification field. A CRC32C checksum of the returned + // [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret]. + // An integrity check of + // [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + // can be performed by computing the CRC32C checksum of + // [DecapsulateResponse.shared_secret][google.cloud.kms.v1.DecapsulateResponse.shared_secret] + // and comparing your results to this field. Discard the response in case of + // non-matching checksum values, and perform a limited number of retries. A + // persistent mismatch may indicate an issue in your computation of the CRC32C + // checksum. Note: receiving this response message indicates that + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + // successfully decrypt the + // [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. Note: This + // field is defined as int64 for reasons of compatibility across different + // languages. However, it is a non-negative integer, which will never exceed + // 2^32-1, and can be safely downconverted to uint32 in languages that support + // this type. + SharedSecretCrc32C *int64 `protobuf:"varint,3,opt,name=shared_secret_crc32c,json=sharedSecretCrc32c,proto3,oneof" json:"shared_secret_crc32c,omitempty"` + // Integrity verification field. A flag indicating whether + // [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + // was received by + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + // for the integrity verification of the + // [ciphertext][google.cloud.kms.v1.DecapsulateRequest.ciphertext]. A false + // value of this field indicates either that + // [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + // was left unset or that it was not delivered to + // [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + // set + // [DecapsulateRequest.ciphertext_crc32c][google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c] + // but this field is still false, discard the response and perform a limited + // number of retries. + VerifiedCiphertextCrc32C bool `protobuf:"varint,4,opt,name=verified_ciphertext_crc32c,json=verifiedCiphertextCrc32c,proto3" json:"verified_ciphertext_crc32c,omitempty"` + // The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + // decapsulation. + ProtectionLevel ProtectionLevel `protobuf:"varint,5,opt,name=protection_level,json=protectionLevel,proto3,enum=google.cloud.kms.v1.ProtectionLevel" json:"protection_level,omitempty"` +} + +func (x *DecapsulateResponse) Reset() { + *x = DecapsulateResponse{} + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecapsulateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecapsulateResponse) ProtoMessage() {} + +func (x *DecapsulateResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecapsulateResponse.ProtoReflect.Descriptor instead. +func (*DecapsulateResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{41} +} + +func (x *DecapsulateResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DecapsulateResponse) GetSharedSecret() []byte { + if x != nil { + return x.SharedSecret + } + return nil +} + +func (x *DecapsulateResponse) GetSharedSecretCrc32C() int64 { + if x != nil && x.SharedSecretCrc32C != nil { + return *x.SharedSecretCrc32C + } + return 0 +} + +func (x *DecapsulateResponse) GetVerifiedCiphertextCrc32C() bool { + if x != nil { + return x.VerifiedCiphertextCrc32C + } + return false +} + +func (x *DecapsulateResponse) GetProtectionLevel() ProtectionLevel { + if x != nil { + return x.ProtectionLevel + } + return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED +} + // Response message for // [KeyManagementService.GenerateRandomBytes][google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes]. type GenerateRandomBytesResponse struct { @@ -3932,7 +4136,7 @@ type GenerateRandomBytesResponse struct { func (x *GenerateRandomBytesResponse) Reset() { *x = GenerateRandomBytesResponse{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3944,7 +4148,7 @@ func (x *GenerateRandomBytesResponse) String() string { func (*GenerateRandomBytesResponse) ProtoMessage() {} func (x *GenerateRandomBytesResponse) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[40] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3957,7 +4161,7 @@ func (x *GenerateRandomBytesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GenerateRandomBytesResponse.ProtoReflect.Descriptor instead. func (*GenerateRandomBytesResponse) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{40} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{42} } func (x *GenerateRandomBytesResponse) GetData() []byte { @@ -3992,7 +4196,7 @@ type Digest struct { func (x *Digest) Reset() { *x = Digest{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4004,7 +4208,7 @@ func (x *Digest) String() string { func (*Digest) ProtoMessage() {} func (x *Digest) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[41] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4017,7 +4221,7 @@ func (x *Digest) ProtoReflect() protoreflect.Message { // Deprecated: Use Digest.ProtoReflect.Descriptor instead. func (*Digest) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{41} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{43} } func (m *Digest) GetDigest() isDigest_Digest { @@ -4090,11 +4294,16 @@ type LocationMetadata struct { // [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in // this location. EkmAvailable bool `protobuf:"varint,2,opt,name=ekm_available,json=ekmAvailable,proto3" json:"ekm_available,omitempty"` + // Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + // [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + // [HSM_SINGLE_TENANT][google.cloud.kms.v1.ProtectionLevel.HSM_SINGLE_TENANT] + // can be created in this location. + HsmSingleTenantAvailable bool `protobuf:"varint,3,opt,name=hsm_single_tenant_available,json=hsmSingleTenantAvailable,proto3" json:"hsm_single_tenant_available,omitempty"` } func (x *LocationMetadata) Reset() { *x = LocationMetadata{} - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4106,7 +4315,7 @@ func (x *LocationMetadata) String() string { func (*LocationMetadata) ProtoMessage() {} func (x *LocationMetadata) ProtoReflect() protoreflect.Message { - mi := &file_google_cloud_kms_v1_service_proto_msgTypes[42] + mi := &file_google_cloud_kms_v1_service_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4119,7 +4328,7 @@ func (x *LocationMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use LocationMetadata.ProtoReflect.Descriptor instead. func (*LocationMetadata) Descriptor() ([]byte, []int) { - return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{42} + return file_google_cloud_kms_v1_service_proto_rawDescGZIP(), []int{44} } func (x *LocationMetadata) GetHsmAvailable() bool { @@ -4136,6 +4345,13 @@ func (x *LocationMetadata) GetEkmAvailable() bool { return false } +func (x *LocationMetadata) GetHsmSingleTenantAvailable() bool { + if x != nil { + return x.HsmSingleTenantAvailable + } + return false +} + var File_google_cloud_kms_v1_service_proto protoreflect.FileDescriptor var file_google_cloud_kms_v1_service_proto_rawDesc = []byte{ @@ -4598,147 +4814,55 @@ var file_google_cloud_kms_v1_service_proto_rawDesc = []byte{ 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x43, 0x72, - 0x63, 0x33, 0x32, 0x63, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x22, 0xfe, 0x02, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x48, 0x0a, 0x11, 0x63, - 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, - 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x3a, 0x0a, 0x19, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, - 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, - 0x63, 0x12, 0x60, 0x0a, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, - 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x29, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, + 0x63, 0x33, 0x32, 0x63, 0x22, 0xce, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2a, 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, + 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xac, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x22, 0xeb, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x69, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x21, - 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x22, 0x87, 0x05, 0x0a, 0x12, 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, - 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x74, 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x48, 0x0a, - 0x11, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, - 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, - 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x5d, 0x0a, 0x1c, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x65, 0x76, 0x65, 0x6c, 0x22, 0xfe, 0x02, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x48, 0x0a, 0x11, + 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x3a, 0x0a, 0x19, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x33, 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x60, 0x0a, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x29, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x33, 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x29, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, - 0x63, 0x33, 0x32, 0x63, 0x12, 0x51, 0x0a, 0x25, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x22, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xbe, 0x03, 0x0a, - 0x12, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, - 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, - 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, - 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x60, 0x0a, 0x2d, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x29, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x51, 0x0a, 0x25, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xcb, 0x02, - 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x34, - 0x0a, 0x16, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x43, 0x72, - 0x63, 0x33, 0x32, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, - 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x90, 0x02, 0x0a, 0x19, - 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, + 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xeb, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x69, 0x6e, @@ -4746,304 +4870,418 @@ var file_google_cloud_kms_v1_service_proto_rawDesc = []byte{ 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, - 0x3c, 0x0a, 0x1a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x69, 0x70, 0x68, - 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, - 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xf6, - 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x5f, - 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x43, 0x72, - 0x63, 0x33, 0x32, 0x63, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xb2, 0x02, 0x0a, 0x11, 0x4d, 0x61, 0x63, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x2e, 0x0a, - 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x63, 0x72, - 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x4d, 0x61, 0x63, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x3c, 0x0a, - 0x1a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x4f, 0x0a, 0x10, 0x70, - 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x72, 0x69, 0x6d, 0x61, + 0x72, 0x79, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x22, 0x87, 0x05, 0x0a, 0x12, 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x61, 0x67, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x48, + 0x0a, 0x11, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, + 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x5d, 0x0a, 0x1c, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x3a, 0x0a, 0x19, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, + 0x63, 0x33, 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x12, 0x60, 0x0a, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, + 0x63, 0x33, 0x32, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x29, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x51, 0x0a, 0x25, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x10, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xbe, 0x03, + 0x0a, 0x12, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x3c, 0x0a, 0x1a, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x60, 0x0a, 0x2d, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x29, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x51, 0x0a, 0x25, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x72, + 0x63, 0x33, 0x32, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xcb, + 0x02, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, + 0x34, 0x0a, 0x16, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x43, + 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x6f, 0x0a, 0x1b, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x3c, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0x60, 0x0a, - 0x06, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, - 0x36, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x68, 0x61, 0x32, 0x35, - 0x36, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x33, 0x38, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x68, 0x61, 0x33, 0x38, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x73, - 0x68, 0x61, 0x35, 0x31, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, - 0x68, 0x61, 0x35, 0x31, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, - 0x5c, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x73, 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x73, 0x6d, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6b, 0x6d, 0x5f, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0c, 0x65, 0x6b, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x32, 0x90, 0x2e, - 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4b, - 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda, 0x41, - 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, - 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xb5, 0x01, 0x0a, 0x0e, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, - 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, - 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x73, 0x12, 0xde, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x90, 0x02, 0x0a, + 0x19, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, + 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x63, 0x69, 0x70, + 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, + 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, + 0xf6, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x3a, 0x0a, 0x0a, 0x6d, 0x61, 0x63, + 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x43, + 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xb2, 0x02, 0x0a, 0x11, 0x4d, 0x61, 0x63, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, + 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x2e, + 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x63, 0x5f, 0x63, + 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x4d, 0x61, 0x63, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x12, 0x3c, + 0x0a, 0x1a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x4f, 0x0a, 0x10, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xad, 0x02, + 0x0a, 0x13, 0x44, 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x35, + 0x0a, 0x14, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, + 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x12, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x72, 0x63, 0x33, + 0x32, 0x63, 0x88, 0x01, 0x01, 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x43, 0x72, 0x63, + 0x33, 0x32, 0x63, 0x12, 0x4f, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, - 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x12, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb5, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x4a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x8f, 0x01, 0x0a, - 0x0a, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, - 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0x6f, 0x0a, + 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x3c, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0x60, + 0x0a, 0x06, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x32, + 0x35, 0x36, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x68, 0x61, 0x32, + 0x35, 0x36, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x33, 0x38, 0x34, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x68, 0x61, 0x33, 0x38, 0x34, 0x12, 0x18, 0x0a, 0x06, + 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x73, 0x6d, 0x5f, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x73, + 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6b, + 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x65, 0x6b, 0x6d, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x3d, 0x0a, 0x1b, 0x68, 0x73, 0x6d, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x68, 0x73, 0x6d, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x32, 0xd9, + 0x2f, 0x0a, 0x14, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, + 0x52, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, + 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa2, - 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, - 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x48, 0xda, 0x41, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, - 0x2f, 0x2a, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x4f, 0x12, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, - 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x66, 0xda, 0x41, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x12, 0x57, 0x2f, 0x76, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, - 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, - 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x22, - 0x48, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, - 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, - 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x0d, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x67, 0x6f, + 0x2f, 0x2a, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xb5, 0x01, 0x0a, + 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x12, + 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, - 0x52, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, - 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x2c, 0x6b, 0x65, 0x79, 0x5f, - 0x72, 0x69, 0x6e, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x08, 0x6b, 0x65, 0x79, 0x5f, - 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0xcf, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x22, 0x6f, 0xda, 0x41, 0x1f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x2c, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x0a, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x73, 0x12, 0xfb, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, 0xda, 0x41, 0x19, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x63, 0x3a, - 0x12, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x7d, - 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0xd4, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, - 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, - 0x3a, 0x01, 0x2a, 0x22, 0x54, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x7d, - 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0xcf, 0x01, 0x0a, 0x0f, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x2b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x22, 0x6f, 0xda, 0x41, 0x1f, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, - 0x5f, 0x69, 0x64, 0x2c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, - 0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, - 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0xd1, 0x01, 0x0a, 0x0f, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, - 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x71, 0xda, 0x41, - 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x0a, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x32, 0x44, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0xde, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x12, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb5, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x7d, 0x12, - 0x93, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x2a, 0x7d, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x8f, 0x01, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x69, + 0x6e, 0x67, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, + 0xa2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9d, 0x01, 0xda, 0x41, 0x1e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x76, 0x3a, - 0x12, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x32, 0x60, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x48, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, + 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4f, 0x12, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x66, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x12, 0x57, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, + 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, + 0x22, 0x48, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, + 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x0d, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, + 0x79, 0x52, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x2c, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x2c, 0x6b, 0x65, 0x79, + 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x08, 0x6b, 0x65, 0x79, + 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0xcf, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x6f, 0xda, 0x41, 0x1f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x2c, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x0a, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, + 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x12, 0xfb, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x01, 0xda, 0x41, + 0x19, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x63, + 0x3a, 0x12, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, - 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xf2, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0xd4, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, - 0x65, 0x79, 0x22, 0x76, 0xda, 0x41, 0x1a, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x3a, 0x01, 0x2a, 0x22, 0x4e, 0x2f, 0x76, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, - 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, - 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, - 0x79, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xde, 0x01, 0x0a, 0x17, 0x44, - 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x73, - 0x74, 0x72, 0x6f, 0x79, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, + 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x59, 0x3a, 0x01, 0x2a, 0x22, 0x54, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, + 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0xcf, 0x01, 0x0a, 0x0f, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x2b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x67, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x5a, 0x3a, 0x01, 0x2a, 0x22, 0x55, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0xde, 0x01, 0x0a, 0x17, - 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x22, 0x6f, 0xda, 0x41, 0x1f, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x2c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6a, 0x6f, + 0x62, 0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0xd1, 0x01, 0x0a, + 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x22, 0x71, 0xda, + 0x41, 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x0a, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x32, 0x44, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x7d, + 0x12, 0x93, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9d, 0x01, 0xda, 0x41, 0x1e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x76, + 0x3a, 0x12, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x60, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, + 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, + 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xf2, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x4b, 0x65, 0x79, 0x22, 0x76, 0xda, 0x41, 0x1a, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x3a, 0x01, 0x2a, 0x22, 0x4e, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, + 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xde, 0x01, 0x0a, 0x17, + 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x73, 0x74, 0x72, 0x6f, 0x79, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, @@ -5053,140 +5291,166 @@ var file_google_cloud_kms_v1_service_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0xb4, 0x01, 0x0a, - 0x07, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x12, 0xde, 0x01, 0x0a, + 0x17, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x01, 0x2a, 0x22, - 0x42, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2a, 0x7d, 0x3a, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x12, 0xb4, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, - 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, - 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x0f, 0x6e, - 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x46, 0x3a, 0x01, 0x2a, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, - 0x2a, 0x7d, 0x3a, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x0a, 0x52, - 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x67, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x5a, 0x3a, 0x01, 0x2a, 0x22, 0x55, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, + 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0xb4, 0x01, + 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x5d, 0x3a, 0x01, 0x2a, 0x22, 0x58, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, - 0xc2, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x26, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, - 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x3a, 0x01, 0x2a, 0x22, 0x58, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x3a, 0x01, 0x2a, + 0x22, 0x42, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2a, 0x7d, 0x3a, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x12, 0xb4, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0xda, 0x41, 0x0f, + 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x3a, 0x01, 0x2a, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x0a, + 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x5d, 0x3a, 0x01, 0x2a, 0x22, 0x58, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, + 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x12, 0xc2, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, + 0x77, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x3a, 0x01, 0x2a, 0x22, 0x58, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, + 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x44, 0x65, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0xe0, 0x01, 0x0a, 0x0e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6d, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x75, 0xda, 0x41, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x61, 0x3a, 0x01, 0x2a, 0x22, 0x5c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x61, 0x77, 0x44, 0x65, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x12, 0xe0, 0x01, 0x0a, 0x0e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, - 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x75, 0xda, 0x41, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x61, 0x3a, 0x01, 0x2a, 0x22, 0x5c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, - 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0xf0, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6d, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x2d, 0x2e, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x73, 0x79, 0x6d, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0xf0, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, + 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, + 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0xda, + 0x41, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, + 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, 0x3a, 0x01, 0x2a, 0x22, 0x5f, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, + 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, + 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x73, 0x79, 0x6d, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x07, + 0x4d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0xda, 0x41, - 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, 0x3a, 0x01, 0x2a, 0x22, 0x5f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x6c, 0xda, 0x41, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x61, 0x74, 0x61, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x3a, 0x01, 0x2a, 0x22, 0x55, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x73, 0x79, 0x6d, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x07, 0x4d, - 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, - 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6c, 0xda, 0x41, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x3a, 0x01, 0x2a, 0x22, 0x55, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, + 0x12, 0xce, 0x01, 0x0a, 0x09, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0xda, + 0x41, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6d, 0x61, 0x63, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x3a, 0x01, 0x2a, 0x22, 0x57, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x61, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x12, - 0xce, 0x01, 0x0a, 0x09, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x25, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0xda, 0x41, - 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6d, 0x61, 0x63, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x5c, 0x3a, 0x01, 0x2a, 0x22, 0x57, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, - 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, - 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x12, 0xe7, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, - 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x12, 0xc6, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x3a, 0x01, 0x2a, 0x22, + 0x59, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, + 0x65, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xe7, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0xda, 0x41, 0x26, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x22, - 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, - 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x74, 0xca, 0x41, 0x17, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x57, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, - 0x42, 0x7c, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4b, 0x6d, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, - 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d, 0x73, - 0x70, 0x62, 0xaa, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x4b, 0x6d, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4b, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0xda, 0x41, 0x26, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2c, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2c, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a, 0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x1a, 0x74, 0xca, 0x41, 0x17, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0xd2, 0x41, 0x57, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x42, 0x7c, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6b, + 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4b, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x6d, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, + 0x2f, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0x3b, 0x6b, 0x6d, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x13, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4b, 0x6d, 0x73, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x5c, 0x4b, 0x6d, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5201,7 +5465,7 @@ func file_google_cloud_kms_v1_service_proto_rawDescGZIP() []byte { return file_google_cloud_kms_v1_service_proto_rawDescData } -var file_google_cloud_kms_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_google_cloud_kms_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 45) var file_google_cloud_kms_v1_service_proto_goTypes = []any{ (*ListKeyRingsRequest)(nil), // 0: google.cloud.kms.v1.ListKeyRingsRequest (*ListCryptoKeysRequest)(nil), // 1: google.cloud.kms.v1.ListCryptoKeysRequest @@ -5234,143 +5498,149 @@ var file_google_cloud_kms_v1_service_proto_goTypes = []any{ (*AsymmetricDecryptRequest)(nil), // 28: google.cloud.kms.v1.AsymmetricDecryptRequest (*MacSignRequest)(nil), // 29: google.cloud.kms.v1.MacSignRequest (*MacVerifyRequest)(nil), // 30: google.cloud.kms.v1.MacVerifyRequest - (*GenerateRandomBytesRequest)(nil), // 31: google.cloud.kms.v1.GenerateRandomBytesRequest - (*EncryptResponse)(nil), // 32: google.cloud.kms.v1.EncryptResponse - (*DecryptResponse)(nil), // 33: google.cloud.kms.v1.DecryptResponse - (*RawEncryptResponse)(nil), // 34: google.cloud.kms.v1.RawEncryptResponse - (*RawDecryptResponse)(nil), // 35: google.cloud.kms.v1.RawDecryptResponse - (*AsymmetricSignResponse)(nil), // 36: google.cloud.kms.v1.AsymmetricSignResponse - (*AsymmetricDecryptResponse)(nil), // 37: google.cloud.kms.v1.AsymmetricDecryptResponse - (*MacSignResponse)(nil), // 38: google.cloud.kms.v1.MacSignResponse - (*MacVerifyResponse)(nil), // 39: google.cloud.kms.v1.MacVerifyResponse - (*GenerateRandomBytesResponse)(nil), // 40: google.cloud.kms.v1.GenerateRandomBytesResponse - (*Digest)(nil), // 41: google.cloud.kms.v1.Digest - (*LocationMetadata)(nil), // 42: google.cloud.kms.v1.LocationMetadata - (CryptoKeyVersion_CryptoKeyVersionView)(0), // 43: google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView - (*KeyRing)(nil), // 44: google.cloud.kms.v1.KeyRing - (*CryptoKey)(nil), // 45: google.cloud.kms.v1.CryptoKey - (*CryptoKeyVersion)(nil), // 46: google.cloud.kms.v1.CryptoKeyVersion - (*ImportJob)(nil), // 47: google.cloud.kms.v1.ImportJob - (PublicKey_PublicKeyFormat)(0), // 48: google.cloud.kms.v1.PublicKey.PublicKeyFormat - (CryptoKeyVersion_CryptoKeyVersionAlgorithm)(0), // 49: google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm - (*fieldmaskpb.FieldMask)(nil), // 50: google.protobuf.FieldMask - (*wrapperspb.Int64Value)(nil), // 51: google.protobuf.Int64Value - (ProtectionLevel)(0), // 52: google.cloud.kms.v1.ProtectionLevel - (*PublicKey)(nil), // 53: google.cloud.kms.v1.PublicKey + (*DecapsulateRequest)(nil), // 31: google.cloud.kms.v1.DecapsulateRequest + (*GenerateRandomBytesRequest)(nil), // 32: google.cloud.kms.v1.GenerateRandomBytesRequest + (*EncryptResponse)(nil), // 33: google.cloud.kms.v1.EncryptResponse + (*DecryptResponse)(nil), // 34: google.cloud.kms.v1.DecryptResponse + (*RawEncryptResponse)(nil), // 35: google.cloud.kms.v1.RawEncryptResponse + (*RawDecryptResponse)(nil), // 36: google.cloud.kms.v1.RawDecryptResponse + (*AsymmetricSignResponse)(nil), // 37: google.cloud.kms.v1.AsymmetricSignResponse + (*AsymmetricDecryptResponse)(nil), // 38: google.cloud.kms.v1.AsymmetricDecryptResponse + (*MacSignResponse)(nil), // 39: google.cloud.kms.v1.MacSignResponse + (*MacVerifyResponse)(nil), // 40: google.cloud.kms.v1.MacVerifyResponse + (*DecapsulateResponse)(nil), // 41: google.cloud.kms.v1.DecapsulateResponse + (*GenerateRandomBytesResponse)(nil), // 42: google.cloud.kms.v1.GenerateRandomBytesResponse + (*Digest)(nil), // 43: google.cloud.kms.v1.Digest + (*LocationMetadata)(nil), // 44: google.cloud.kms.v1.LocationMetadata + (CryptoKeyVersion_CryptoKeyVersionView)(0), // 45: google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + (*KeyRing)(nil), // 46: google.cloud.kms.v1.KeyRing + (*CryptoKey)(nil), // 47: google.cloud.kms.v1.CryptoKey + (*CryptoKeyVersion)(nil), // 48: google.cloud.kms.v1.CryptoKeyVersion + (*ImportJob)(nil), // 49: google.cloud.kms.v1.ImportJob + (PublicKey_PublicKeyFormat)(0), // 50: google.cloud.kms.v1.PublicKey.PublicKeyFormat + (CryptoKeyVersion_CryptoKeyVersionAlgorithm)(0), // 51: google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm + (*fieldmaskpb.FieldMask)(nil), // 52: google.protobuf.FieldMask + (*wrapperspb.Int64Value)(nil), // 53: google.protobuf.Int64Value + (ProtectionLevel)(0), // 54: google.cloud.kms.v1.ProtectionLevel + (*PublicKey)(nil), // 55: google.cloud.kms.v1.PublicKey } var file_google_cloud_kms_v1_service_proto_depIdxs = []int32{ - 43, // 0: google.cloud.kms.v1.ListCryptoKeysRequest.version_view:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView - 43, // 1: google.cloud.kms.v1.ListCryptoKeyVersionsRequest.view:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView - 44, // 2: google.cloud.kms.v1.ListKeyRingsResponse.key_rings:type_name -> google.cloud.kms.v1.KeyRing - 45, // 3: google.cloud.kms.v1.ListCryptoKeysResponse.crypto_keys:type_name -> google.cloud.kms.v1.CryptoKey - 46, // 4: google.cloud.kms.v1.ListCryptoKeyVersionsResponse.crypto_key_versions:type_name -> google.cloud.kms.v1.CryptoKeyVersion - 47, // 5: google.cloud.kms.v1.ListImportJobsResponse.import_jobs:type_name -> google.cloud.kms.v1.ImportJob - 48, // 6: google.cloud.kms.v1.GetPublicKeyRequest.public_key_format:type_name -> google.cloud.kms.v1.PublicKey.PublicKeyFormat - 44, // 7: google.cloud.kms.v1.CreateKeyRingRequest.key_ring:type_name -> google.cloud.kms.v1.KeyRing - 45, // 8: google.cloud.kms.v1.CreateCryptoKeyRequest.crypto_key:type_name -> google.cloud.kms.v1.CryptoKey - 46, // 9: google.cloud.kms.v1.CreateCryptoKeyVersionRequest.crypto_key_version:type_name -> google.cloud.kms.v1.CryptoKeyVersion - 49, // 10: google.cloud.kms.v1.ImportCryptoKeyVersionRequest.algorithm:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm - 47, // 11: google.cloud.kms.v1.CreateImportJobRequest.import_job:type_name -> google.cloud.kms.v1.ImportJob - 45, // 12: google.cloud.kms.v1.UpdateCryptoKeyRequest.crypto_key:type_name -> google.cloud.kms.v1.CryptoKey - 50, // 13: google.cloud.kms.v1.UpdateCryptoKeyRequest.update_mask:type_name -> google.protobuf.FieldMask - 46, // 14: google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.crypto_key_version:type_name -> google.cloud.kms.v1.CryptoKeyVersion - 50, // 15: google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.update_mask:type_name -> google.protobuf.FieldMask - 51, // 16: google.cloud.kms.v1.EncryptRequest.plaintext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 17: google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 18: google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 19: google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 20: google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 21: google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 22: google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value - 51, // 23: google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 24: google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 25: google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value - 41, // 26: google.cloud.kms.v1.AsymmetricSignRequest.digest:type_name -> google.cloud.kms.v1.Digest - 51, // 27: google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c:type_name -> google.protobuf.Int64Value - 51, // 28: google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 29: google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 30: google.cloud.kms.v1.MacSignRequest.data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 31: google.cloud.kms.v1.MacVerifyRequest.data_crc32c:type_name -> google.protobuf.Int64Value - 51, // 32: google.cloud.kms.v1.MacVerifyRequest.mac_crc32c:type_name -> google.protobuf.Int64Value - 52, // 33: google.cloud.kms.v1.GenerateRandomBytesRequest.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 34: google.cloud.kms.v1.EncryptResponse.ciphertext_crc32c:type_name -> google.protobuf.Int64Value - 52, // 35: google.cloud.kms.v1.EncryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 36: google.cloud.kms.v1.DecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value - 52, // 37: google.cloud.kms.v1.DecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 38: google.cloud.kms.v1.RawEncryptResponse.ciphertext_crc32c:type_name -> google.protobuf.Int64Value - 51, // 39: google.cloud.kms.v1.RawEncryptResponse.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value - 52, // 40: google.cloud.kms.v1.RawEncryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 41: google.cloud.kms.v1.RawDecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value - 52, // 42: google.cloud.kms.v1.RawDecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 43: google.cloud.kms.v1.AsymmetricSignResponse.signature_crc32c:type_name -> google.protobuf.Int64Value - 52, // 44: google.cloud.kms.v1.AsymmetricSignResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 45: google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value - 52, // 46: google.cloud.kms.v1.AsymmetricDecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 47: google.cloud.kms.v1.MacSignResponse.mac_crc32c:type_name -> google.protobuf.Int64Value - 52, // 48: google.cloud.kms.v1.MacSignResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 52, // 49: google.cloud.kms.v1.MacVerifyResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel - 51, // 50: google.cloud.kms.v1.GenerateRandomBytesResponse.data_crc32c:type_name -> google.protobuf.Int64Value - 0, // 51: google.cloud.kms.v1.KeyManagementService.ListKeyRings:input_type -> google.cloud.kms.v1.ListKeyRingsRequest - 1, // 52: google.cloud.kms.v1.KeyManagementService.ListCryptoKeys:input_type -> google.cloud.kms.v1.ListCryptoKeysRequest - 2, // 53: google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions:input_type -> google.cloud.kms.v1.ListCryptoKeyVersionsRequest - 3, // 54: google.cloud.kms.v1.KeyManagementService.ListImportJobs:input_type -> google.cloud.kms.v1.ListImportJobsRequest - 8, // 55: google.cloud.kms.v1.KeyManagementService.GetKeyRing:input_type -> google.cloud.kms.v1.GetKeyRingRequest - 9, // 56: google.cloud.kms.v1.KeyManagementService.GetCryptoKey:input_type -> google.cloud.kms.v1.GetCryptoKeyRequest - 10, // 57: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion:input_type -> google.cloud.kms.v1.GetCryptoKeyVersionRequest - 11, // 58: google.cloud.kms.v1.KeyManagementService.GetPublicKey:input_type -> google.cloud.kms.v1.GetPublicKeyRequest - 12, // 59: google.cloud.kms.v1.KeyManagementService.GetImportJob:input_type -> google.cloud.kms.v1.GetImportJobRequest - 13, // 60: google.cloud.kms.v1.KeyManagementService.CreateKeyRing:input_type -> google.cloud.kms.v1.CreateKeyRingRequest - 14, // 61: google.cloud.kms.v1.KeyManagementService.CreateCryptoKey:input_type -> google.cloud.kms.v1.CreateCryptoKeyRequest - 15, // 62: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion:input_type -> google.cloud.kms.v1.CreateCryptoKeyVersionRequest - 16, // 63: google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion:input_type -> google.cloud.kms.v1.ImportCryptoKeyVersionRequest - 17, // 64: google.cloud.kms.v1.KeyManagementService.CreateImportJob:input_type -> google.cloud.kms.v1.CreateImportJobRequest - 18, // 65: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey:input_type -> google.cloud.kms.v1.UpdateCryptoKeyRequest - 19, // 66: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion:input_type -> google.cloud.kms.v1.UpdateCryptoKeyVersionRequest - 20, // 67: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion:input_type -> google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest - 21, // 68: google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion:input_type -> google.cloud.kms.v1.DestroyCryptoKeyVersionRequest - 22, // 69: google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion:input_type -> google.cloud.kms.v1.RestoreCryptoKeyVersionRequest - 23, // 70: google.cloud.kms.v1.KeyManagementService.Encrypt:input_type -> google.cloud.kms.v1.EncryptRequest - 24, // 71: google.cloud.kms.v1.KeyManagementService.Decrypt:input_type -> google.cloud.kms.v1.DecryptRequest - 25, // 72: google.cloud.kms.v1.KeyManagementService.RawEncrypt:input_type -> google.cloud.kms.v1.RawEncryptRequest - 26, // 73: google.cloud.kms.v1.KeyManagementService.RawDecrypt:input_type -> google.cloud.kms.v1.RawDecryptRequest - 27, // 74: google.cloud.kms.v1.KeyManagementService.AsymmetricSign:input_type -> google.cloud.kms.v1.AsymmetricSignRequest - 28, // 75: google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt:input_type -> google.cloud.kms.v1.AsymmetricDecryptRequest - 29, // 76: google.cloud.kms.v1.KeyManagementService.MacSign:input_type -> google.cloud.kms.v1.MacSignRequest - 30, // 77: google.cloud.kms.v1.KeyManagementService.MacVerify:input_type -> google.cloud.kms.v1.MacVerifyRequest - 31, // 78: google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes:input_type -> google.cloud.kms.v1.GenerateRandomBytesRequest - 4, // 79: google.cloud.kms.v1.KeyManagementService.ListKeyRings:output_type -> google.cloud.kms.v1.ListKeyRingsResponse - 5, // 80: google.cloud.kms.v1.KeyManagementService.ListCryptoKeys:output_type -> google.cloud.kms.v1.ListCryptoKeysResponse - 6, // 81: google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions:output_type -> google.cloud.kms.v1.ListCryptoKeyVersionsResponse - 7, // 82: google.cloud.kms.v1.KeyManagementService.ListImportJobs:output_type -> google.cloud.kms.v1.ListImportJobsResponse - 44, // 83: google.cloud.kms.v1.KeyManagementService.GetKeyRing:output_type -> google.cloud.kms.v1.KeyRing - 45, // 84: google.cloud.kms.v1.KeyManagementService.GetCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey - 46, // 85: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 53, // 86: google.cloud.kms.v1.KeyManagementService.GetPublicKey:output_type -> google.cloud.kms.v1.PublicKey - 47, // 87: google.cloud.kms.v1.KeyManagementService.GetImportJob:output_type -> google.cloud.kms.v1.ImportJob - 44, // 88: google.cloud.kms.v1.KeyManagementService.CreateKeyRing:output_type -> google.cloud.kms.v1.KeyRing - 45, // 89: google.cloud.kms.v1.KeyManagementService.CreateCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey - 46, // 90: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 46, // 91: google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 47, // 92: google.cloud.kms.v1.KeyManagementService.CreateImportJob:output_type -> google.cloud.kms.v1.ImportJob - 45, // 93: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey - 46, // 94: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 45, // 95: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion:output_type -> google.cloud.kms.v1.CryptoKey - 46, // 96: google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 46, // 97: google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion - 32, // 98: google.cloud.kms.v1.KeyManagementService.Encrypt:output_type -> google.cloud.kms.v1.EncryptResponse - 33, // 99: google.cloud.kms.v1.KeyManagementService.Decrypt:output_type -> google.cloud.kms.v1.DecryptResponse - 34, // 100: google.cloud.kms.v1.KeyManagementService.RawEncrypt:output_type -> google.cloud.kms.v1.RawEncryptResponse - 35, // 101: google.cloud.kms.v1.KeyManagementService.RawDecrypt:output_type -> google.cloud.kms.v1.RawDecryptResponse - 36, // 102: google.cloud.kms.v1.KeyManagementService.AsymmetricSign:output_type -> google.cloud.kms.v1.AsymmetricSignResponse - 37, // 103: google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt:output_type -> google.cloud.kms.v1.AsymmetricDecryptResponse - 38, // 104: google.cloud.kms.v1.KeyManagementService.MacSign:output_type -> google.cloud.kms.v1.MacSignResponse - 39, // 105: google.cloud.kms.v1.KeyManagementService.MacVerify:output_type -> google.cloud.kms.v1.MacVerifyResponse - 40, // 106: google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes:output_type -> google.cloud.kms.v1.GenerateRandomBytesResponse - 79, // [79:107] is the sub-list for method output_type - 51, // [51:79] is the sub-list for method input_type - 51, // [51:51] is the sub-list for extension type_name - 51, // [51:51] is the sub-list for extension extendee - 0, // [0:51] is the sub-list for field type_name + 45, // 0: google.cloud.kms.v1.ListCryptoKeysRequest.version_view:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + 45, // 1: google.cloud.kms.v1.ListCryptoKeyVersionsRequest.view:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + 46, // 2: google.cloud.kms.v1.ListKeyRingsResponse.key_rings:type_name -> google.cloud.kms.v1.KeyRing + 47, // 3: google.cloud.kms.v1.ListCryptoKeysResponse.crypto_keys:type_name -> google.cloud.kms.v1.CryptoKey + 48, // 4: google.cloud.kms.v1.ListCryptoKeyVersionsResponse.crypto_key_versions:type_name -> google.cloud.kms.v1.CryptoKeyVersion + 49, // 5: google.cloud.kms.v1.ListImportJobsResponse.import_jobs:type_name -> google.cloud.kms.v1.ImportJob + 50, // 6: google.cloud.kms.v1.GetPublicKeyRequest.public_key_format:type_name -> google.cloud.kms.v1.PublicKey.PublicKeyFormat + 46, // 7: google.cloud.kms.v1.CreateKeyRingRequest.key_ring:type_name -> google.cloud.kms.v1.KeyRing + 47, // 8: google.cloud.kms.v1.CreateCryptoKeyRequest.crypto_key:type_name -> google.cloud.kms.v1.CryptoKey + 48, // 9: google.cloud.kms.v1.CreateCryptoKeyVersionRequest.crypto_key_version:type_name -> google.cloud.kms.v1.CryptoKeyVersion + 51, // 10: google.cloud.kms.v1.ImportCryptoKeyVersionRequest.algorithm:type_name -> google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm + 49, // 11: google.cloud.kms.v1.CreateImportJobRequest.import_job:type_name -> google.cloud.kms.v1.ImportJob + 47, // 12: google.cloud.kms.v1.UpdateCryptoKeyRequest.crypto_key:type_name -> google.cloud.kms.v1.CryptoKey + 52, // 13: google.cloud.kms.v1.UpdateCryptoKeyRequest.update_mask:type_name -> google.protobuf.FieldMask + 48, // 14: google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.crypto_key_version:type_name -> google.cloud.kms.v1.CryptoKeyVersion + 52, // 15: google.cloud.kms.v1.UpdateCryptoKeyVersionRequest.update_mask:type_name -> google.protobuf.FieldMask + 53, // 16: google.cloud.kms.v1.EncryptRequest.plaintext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 17: google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 18: google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 19: google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 20: google.cloud.kms.v1.RawEncryptRequest.plaintext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 21: google.cloud.kms.v1.RawEncryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 22: google.cloud.kms.v1.RawEncryptRequest.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value + 53, // 23: google.cloud.kms.v1.RawDecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 24: google.cloud.kms.v1.RawDecryptRequest.additional_authenticated_data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 25: google.cloud.kms.v1.RawDecryptRequest.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value + 43, // 26: google.cloud.kms.v1.AsymmetricSignRequest.digest:type_name -> google.cloud.kms.v1.Digest + 53, // 27: google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c:type_name -> google.protobuf.Int64Value + 53, // 28: google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 29: google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 30: google.cloud.kms.v1.MacSignRequest.data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 31: google.cloud.kms.v1.MacVerifyRequest.data_crc32c:type_name -> google.protobuf.Int64Value + 53, // 32: google.cloud.kms.v1.MacVerifyRequest.mac_crc32c:type_name -> google.protobuf.Int64Value + 53, // 33: google.cloud.kms.v1.DecapsulateRequest.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 54, // 34: google.cloud.kms.v1.GenerateRandomBytesRequest.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 35: google.cloud.kms.v1.EncryptResponse.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 54, // 36: google.cloud.kms.v1.EncryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 37: google.cloud.kms.v1.DecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value + 54, // 38: google.cloud.kms.v1.DecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 39: google.cloud.kms.v1.RawEncryptResponse.ciphertext_crc32c:type_name -> google.protobuf.Int64Value + 53, // 40: google.cloud.kms.v1.RawEncryptResponse.initialization_vector_crc32c:type_name -> google.protobuf.Int64Value + 54, // 41: google.cloud.kms.v1.RawEncryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 42: google.cloud.kms.v1.RawDecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value + 54, // 43: google.cloud.kms.v1.RawDecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 44: google.cloud.kms.v1.AsymmetricSignResponse.signature_crc32c:type_name -> google.protobuf.Int64Value + 54, // 45: google.cloud.kms.v1.AsymmetricSignResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 46: google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext_crc32c:type_name -> google.protobuf.Int64Value + 54, // 47: google.cloud.kms.v1.AsymmetricDecryptResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 48: google.cloud.kms.v1.MacSignResponse.mac_crc32c:type_name -> google.protobuf.Int64Value + 54, // 49: google.cloud.kms.v1.MacSignResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 54, // 50: google.cloud.kms.v1.MacVerifyResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 54, // 51: google.cloud.kms.v1.DecapsulateResponse.protection_level:type_name -> google.cloud.kms.v1.ProtectionLevel + 53, // 52: google.cloud.kms.v1.GenerateRandomBytesResponse.data_crc32c:type_name -> google.protobuf.Int64Value + 0, // 53: google.cloud.kms.v1.KeyManagementService.ListKeyRings:input_type -> google.cloud.kms.v1.ListKeyRingsRequest + 1, // 54: google.cloud.kms.v1.KeyManagementService.ListCryptoKeys:input_type -> google.cloud.kms.v1.ListCryptoKeysRequest + 2, // 55: google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions:input_type -> google.cloud.kms.v1.ListCryptoKeyVersionsRequest + 3, // 56: google.cloud.kms.v1.KeyManagementService.ListImportJobs:input_type -> google.cloud.kms.v1.ListImportJobsRequest + 8, // 57: google.cloud.kms.v1.KeyManagementService.GetKeyRing:input_type -> google.cloud.kms.v1.GetKeyRingRequest + 9, // 58: google.cloud.kms.v1.KeyManagementService.GetCryptoKey:input_type -> google.cloud.kms.v1.GetCryptoKeyRequest + 10, // 59: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion:input_type -> google.cloud.kms.v1.GetCryptoKeyVersionRequest + 11, // 60: google.cloud.kms.v1.KeyManagementService.GetPublicKey:input_type -> google.cloud.kms.v1.GetPublicKeyRequest + 12, // 61: google.cloud.kms.v1.KeyManagementService.GetImportJob:input_type -> google.cloud.kms.v1.GetImportJobRequest + 13, // 62: google.cloud.kms.v1.KeyManagementService.CreateKeyRing:input_type -> google.cloud.kms.v1.CreateKeyRingRequest + 14, // 63: google.cloud.kms.v1.KeyManagementService.CreateCryptoKey:input_type -> google.cloud.kms.v1.CreateCryptoKeyRequest + 15, // 64: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion:input_type -> google.cloud.kms.v1.CreateCryptoKeyVersionRequest + 16, // 65: google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion:input_type -> google.cloud.kms.v1.ImportCryptoKeyVersionRequest + 17, // 66: google.cloud.kms.v1.KeyManagementService.CreateImportJob:input_type -> google.cloud.kms.v1.CreateImportJobRequest + 18, // 67: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey:input_type -> google.cloud.kms.v1.UpdateCryptoKeyRequest + 19, // 68: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion:input_type -> google.cloud.kms.v1.UpdateCryptoKeyVersionRequest + 20, // 69: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion:input_type -> google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest + 21, // 70: google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion:input_type -> google.cloud.kms.v1.DestroyCryptoKeyVersionRequest + 22, // 71: google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion:input_type -> google.cloud.kms.v1.RestoreCryptoKeyVersionRequest + 23, // 72: google.cloud.kms.v1.KeyManagementService.Encrypt:input_type -> google.cloud.kms.v1.EncryptRequest + 24, // 73: google.cloud.kms.v1.KeyManagementService.Decrypt:input_type -> google.cloud.kms.v1.DecryptRequest + 25, // 74: google.cloud.kms.v1.KeyManagementService.RawEncrypt:input_type -> google.cloud.kms.v1.RawEncryptRequest + 26, // 75: google.cloud.kms.v1.KeyManagementService.RawDecrypt:input_type -> google.cloud.kms.v1.RawDecryptRequest + 27, // 76: google.cloud.kms.v1.KeyManagementService.AsymmetricSign:input_type -> google.cloud.kms.v1.AsymmetricSignRequest + 28, // 77: google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt:input_type -> google.cloud.kms.v1.AsymmetricDecryptRequest + 29, // 78: google.cloud.kms.v1.KeyManagementService.MacSign:input_type -> google.cloud.kms.v1.MacSignRequest + 30, // 79: google.cloud.kms.v1.KeyManagementService.MacVerify:input_type -> google.cloud.kms.v1.MacVerifyRequest + 31, // 80: google.cloud.kms.v1.KeyManagementService.Decapsulate:input_type -> google.cloud.kms.v1.DecapsulateRequest + 32, // 81: google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes:input_type -> google.cloud.kms.v1.GenerateRandomBytesRequest + 4, // 82: google.cloud.kms.v1.KeyManagementService.ListKeyRings:output_type -> google.cloud.kms.v1.ListKeyRingsResponse + 5, // 83: google.cloud.kms.v1.KeyManagementService.ListCryptoKeys:output_type -> google.cloud.kms.v1.ListCryptoKeysResponse + 6, // 84: google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions:output_type -> google.cloud.kms.v1.ListCryptoKeyVersionsResponse + 7, // 85: google.cloud.kms.v1.KeyManagementService.ListImportJobs:output_type -> google.cloud.kms.v1.ListImportJobsResponse + 46, // 86: google.cloud.kms.v1.KeyManagementService.GetKeyRing:output_type -> google.cloud.kms.v1.KeyRing + 47, // 87: google.cloud.kms.v1.KeyManagementService.GetCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey + 48, // 88: google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 55, // 89: google.cloud.kms.v1.KeyManagementService.GetPublicKey:output_type -> google.cloud.kms.v1.PublicKey + 49, // 90: google.cloud.kms.v1.KeyManagementService.GetImportJob:output_type -> google.cloud.kms.v1.ImportJob + 46, // 91: google.cloud.kms.v1.KeyManagementService.CreateKeyRing:output_type -> google.cloud.kms.v1.KeyRing + 47, // 92: google.cloud.kms.v1.KeyManagementService.CreateCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey + 48, // 93: google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 48, // 94: google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 49, // 95: google.cloud.kms.v1.KeyManagementService.CreateImportJob:output_type -> google.cloud.kms.v1.ImportJob + 47, // 96: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKey:output_type -> google.cloud.kms.v1.CryptoKey + 48, // 97: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 47, // 98: google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion:output_type -> google.cloud.kms.v1.CryptoKey + 48, // 99: google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 48, // 100: google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion:output_type -> google.cloud.kms.v1.CryptoKeyVersion + 33, // 101: google.cloud.kms.v1.KeyManagementService.Encrypt:output_type -> google.cloud.kms.v1.EncryptResponse + 34, // 102: google.cloud.kms.v1.KeyManagementService.Decrypt:output_type -> google.cloud.kms.v1.DecryptResponse + 35, // 103: google.cloud.kms.v1.KeyManagementService.RawEncrypt:output_type -> google.cloud.kms.v1.RawEncryptResponse + 36, // 104: google.cloud.kms.v1.KeyManagementService.RawDecrypt:output_type -> google.cloud.kms.v1.RawDecryptResponse + 37, // 105: google.cloud.kms.v1.KeyManagementService.AsymmetricSign:output_type -> google.cloud.kms.v1.AsymmetricSignResponse + 38, // 106: google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt:output_type -> google.cloud.kms.v1.AsymmetricDecryptResponse + 39, // 107: google.cloud.kms.v1.KeyManagementService.MacSign:output_type -> google.cloud.kms.v1.MacSignResponse + 40, // 108: google.cloud.kms.v1.KeyManagementService.MacVerify:output_type -> google.cloud.kms.v1.MacVerifyResponse + 41, // 109: google.cloud.kms.v1.KeyManagementService.Decapsulate:output_type -> google.cloud.kms.v1.DecapsulateResponse + 42, // 110: google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes:output_type -> google.cloud.kms.v1.GenerateRandomBytesResponse + 82, // [82:111] is the sub-list for method output_type + 53, // [53:82] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name } func init() { file_google_cloud_kms_v1_service_proto_init() } @@ -5382,7 +5652,8 @@ func file_google_cloud_kms_v1_service_proto_init() { file_google_cloud_kms_v1_service_proto_msgTypes[16].OneofWrappers = []any{ (*ImportCryptoKeyVersionRequest_RsaAesWrappedKey)(nil), } - file_google_cloud_kms_v1_service_proto_msgTypes[41].OneofWrappers = []any{ + file_google_cloud_kms_v1_service_proto_msgTypes[41].OneofWrappers = []any{} + file_google_cloud_kms_v1_service_proto_msgTypes[43].OneofWrappers = []any{ (*Digest_Sha256)(nil), (*Digest_Sha384)(nil), (*Digest_Sha512)(nil), @@ -5393,7 +5664,7 @@ func file_google_cloud_kms_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_cloud_kms_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 43, + NumMessages: 45, NumExtensions: 0, NumServices: 1, }, @@ -5406,1315 +5677,3 @@ func file_google_cloud_kms_v1_service_proto_init() { file_google_cloud_kms_v1_service_proto_goTypes = nil file_google_cloud_kms_v1_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// KeyManagementServiceClient is the client API for KeyManagementService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KeyManagementServiceClient interface { - // Lists [KeyRings][google.cloud.kms.v1.KeyRing]. - ListKeyRings(ctx context.Context, in *ListKeyRingsRequest, opts ...grpc.CallOption) (*ListKeyRingsResponse, error) - // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - ListCryptoKeys(ctx context.Context, in *ListCryptoKeysRequest, opts ...grpc.CallOption) (*ListCryptoKeysResponse, error) - // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - ListCryptoKeyVersions(ctx context.Context, in *ListCryptoKeyVersionsRequest, opts ...grpc.CallOption) (*ListCryptoKeyVersionsResponse, error) - // Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. - ListImportJobs(ctx context.Context, in *ListImportJobsRequest, opts ...grpc.CallOption) (*ListImportJobsResponse, error) - // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. - GetKeyRing(ctx context.Context, in *GetKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) - // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as - // well as its [primary][google.cloud.kms.v1.CryptoKey.primary] - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - GetCryptoKey(ctx context.Context, in *GetCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) - // Returns metadata for a given - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - GetCryptoKeyVersion(ctx context.Context, in *GetCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Returns the public key for the given - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] - // or - // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. - GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*PublicKey, error) - // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. - GetImportJob(ctx context.Context, in *GetImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) - // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and - // Location. - CreateKeyRing(ctx context.Context, in *CreateKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) - // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a - // [KeyRing][google.cloud.kms.v1.KeyRing]. - // - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and - // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] - // are required. - CreateCryptoKey(ctx context.Context, in *CreateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) - // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a - // [CryptoKey][google.cloud.kms.v1.CryptoKey]. - // - // The server will assign the next sequential id. If unset, - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. - CreateCryptoKeyVersion(ctx context.Context, in *CreateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Import wrapped key material into a - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - // - // All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If - // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally - // specified in the request, key material will be reimported into that - // version. Otherwise, a new version will be created, and will be assigned the - // next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. - ImportCryptoKeyVersion(ctx context.Context, in *ImportCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a - // [KeyRing][google.cloud.kms.v1.KeyRing]. - // - // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is - // required. - CreateImportJob(ctx context.Context, in *CreateImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) - // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. - UpdateCryptoKey(ctx context.Context, in *UpdateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) - // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s - // metadata. - // - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between - // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - // and - // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - // using this method. See - // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] - // and - // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - // to move between other states. - UpdateCryptoKeyVersion(ctx context.Context, in *UpdateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that - // will be used in - // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. - // - // Returns an error if called on a key whose purpose is not - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - UpdateCryptoKeyPrimaryVersion(ctx context.Context, in *UpdateCryptoKeyPrimaryVersionRequest, opts ...grpc.CallOption) (*CryptoKey, error) - // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for - // destruction. - // - // Upon calling this method, - // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will - // be set to - // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], - // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - // be set to the time - // [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] - // in the future. At that time, the - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically - // change to - // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], - // and the key material will be irrevocably destroyed. - // - // Before the - // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is - // reached, - // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - // may be called to reverse the process. - DestroyCryptoKeyVersion(ctx context.Context, in *DestroyCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - // state. - // - // Upon restoration of the CryptoKeyVersion, - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], - // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - // be cleared. - RestoreCryptoKeyVersion(ctx context.Context, in *RestoreCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) - // Encrypts data, so that it can only be recovered by a call to - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) - // Decrypts data that was protected by - // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error) - // Encrypts data using portable cryptographic primitives. Most users should - // choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than - // their raw counterparts. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - RawEncrypt(ctx context.Context, in *RawEncryptRequest, opts ...grpc.CallOption) (*RawEncryptResponse, error) - // Decrypts data that was originally encrypted using a raw cryptographic - // mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // must be - // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - RawDecrypt(ctx context.Context, in *RawDecryptRequest, opts ...grpc.CallOption) (*RawDecryptResponse, error) - // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // ASYMMETRIC_SIGN, producing a signature that can be verified with the public - // key retrieved from - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - AsymmetricSign(ctx context.Context, in *AsymmetricSignRequest, opts ...grpc.CallOption) (*AsymmetricSignResponse, error) - // Decrypts data that was encrypted with a public key retrieved from - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // ASYMMETRIC_DECRYPT. - AsymmetricDecrypt(ctx context.Context, in *AsymmetricDecryptRequest, opts ...grpc.CallOption) (*AsymmetricDecryptResponse, error) - // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, - // producing a tag that can be verified by another source with the same key. - MacSign(ctx context.Context, in *MacSignRequest, opts ...grpc.CallOption) (*MacSignResponse, error) - // Verifies MAC tag using a - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns - // a response that indicates whether or not the verification was successful. - MacVerify(ctx context.Context, in *MacVerifyRequest, opts ...grpc.CallOption) (*MacVerifyResponse, error) - // Generate random bytes using the Cloud KMS randomness source in the provided - // location. - GenerateRandomBytes(ctx context.Context, in *GenerateRandomBytesRequest, opts ...grpc.CallOption) (*GenerateRandomBytesResponse, error) -} - -type keyManagementServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewKeyManagementServiceClient(cc grpc.ClientConnInterface) KeyManagementServiceClient { - return &keyManagementServiceClient{cc} -} - -func (c *keyManagementServiceClient) ListKeyRings(ctx context.Context, in *ListKeyRingsRequest, opts ...grpc.CallOption) (*ListKeyRingsResponse, error) { - out := new(ListKeyRingsResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/ListKeyRings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) ListCryptoKeys(ctx context.Context, in *ListCryptoKeysRequest, opts ...grpc.CallOption) (*ListCryptoKeysResponse, error) { - out := new(ListCryptoKeysResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) ListCryptoKeyVersions(ctx context.Context, in *ListCryptoKeyVersionsRequest, opts ...grpc.CallOption) (*ListCryptoKeyVersionsResponse, error) { - out := new(ListCryptoKeyVersionsResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) ListImportJobs(ctx context.Context, in *ListImportJobsRequest, opts ...grpc.CallOption) (*ListImportJobsResponse, error) { - out := new(ListImportJobsResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/ListImportJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GetKeyRing(ctx context.Context, in *GetKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) { - out := new(KeyRing) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GetKeyRing", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GetCryptoKey(ctx context.Context, in *GetCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { - out := new(CryptoKey) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GetCryptoKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GetCryptoKeyVersion(ctx context.Context, in *GetCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*PublicKey, error) { - out := new(PublicKey) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GetPublicKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GetImportJob(ctx context.Context, in *GetImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) { - out := new(ImportJob) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GetImportJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) CreateKeyRing(ctx context.Context, in *CreateKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) { - out := new(KeyRing) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/CreateKeyRing", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) CreateCryptoKey(ctx context.Context, in *CreateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { - out := new(CryptoKey) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) CreateCryptoKeyVersion(ctx context.Context, in *CreateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) ImportCryptoKeyVersion(ctx context.Context, in *ImportCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) CreateImportJob(ctx context.Context, in *CreateImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) { - out := new(ImportJob) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/CreateImportJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) UpdateCryptoKey(ctx context.Context, in *UpdateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { - out := new(CryptoKey) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) UpdateCryptoKeyVersion(ctx context.Context, in *UpdateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) UpdateCryptoKeyPrimaryVersion(ctx context.Context, in *UpdateCryptoKeyPrimaryVersionRequest, opts ...grpc.CallOption) (*CryptoKey, error) { - out := new(CryptoKey) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) DestroyCryptoKeyVersion(ctx context.Context, in *DestroyCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) RestoreCryptoKeyVersion(ctx context.Context, in *RestoreCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { - out := new(CryptoKeyVersion) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) { - out := new(EncryptResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/Encrypt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error) { - out := new(DecryptResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/Decrypt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) RawEncrypt(ctx context.Context, in *RawEncryptRequest, opts ...grpc.CallOption) (*RawEncryptResponse, error) { - out := new(RawEncryptResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/RawEncrypt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) RawDecrypt(ctx context.Context, in *RawDecryptRequest, opts ...grpc.CallOption) (*RawDecryptResponse, error) { - out := new(RawDecryptResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/RawDecrypt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) AsymmetricSign(ctx context.Context, in *AsymmetricSignRequest, opts ...grpc.CallOption) (*AsymmetricSignResponse, error) { - out := new(AsymmetricSignResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/AsymmetricSign", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) AsymmetricDecrypt(ctx context.Context, in *AsymmetricDecryptRequest, opts ...grpc.CallOption) (*AsymmetricDecryptResponse, error) { - out := new(AsymmetricDecryptResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) MacSign(ctx context.Context, in *MacSignRequest, opts ...grpc.CallOption) (*MacSignResponse, error) { - out := new(MacSignResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/MacSign", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) MacVerify(ctx context.Context, in *MacVerifyRequest, opts ...grpc.CallOption) (*MacVerifyResponse, error) { - out := new(MacVerifyResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/MacVerify", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementServiceClient) GenerateRandomBytes(ctx context.Context, in *GenerateRandomBytesRequest, opts ...grpc.CallOption) (*GenerateRandomBytesResponse, error) { - out := new(GenerateRandomBytesResponse) - err := c.cc.Invoke(ctx, "/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KeyManagementServiceServer is the server API for KeyManagementService service. -type KeyManagementServiceServer interface { - // Lists [KeyRings][google.cloud.kms.v1.KeyRing]. - ListKeyRings(context.Context, *ListKeyRingsRequest) (*ListKeyRingsResponse, error) - // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - ListCryptoKeys(context.Context, *ListCryptoKeysRequest) (*ListCryptoKeysResponse, error) - // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - ListCryptoKeyVersions(context.Context, *ListCryptoKeyVersionsRequest) (*ListCryptoKeyVersionsResponse, error) - // Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. - ListImportJobs(context.Context, *ListImportJobsRequest) (*ListImportJobsResponse, error) - // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. - GetKeyRing(context.Context, *GetKeyRingRequest) (*KeyRing, error) - // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as - // well as its [primary][google.cloud.kms.v1.CryptoKey.primary] - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - GetCryptoKey(context.Context, *GetCryptoKeyRequest) (*CryptoKey, error) - // Returns metadata for a given - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - GetCryptoKeyVersion(context.Context, *GetCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Returns the public key for the given - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] - // or - // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. - GetPublicKey(context.Context, *GetPublicKeyRequest) (*PublicKey, error) - // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. - GetImportJob(context.Context, *GetImportJobRequest) (*ImportJob, error) - // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and - // Location. - CreateKeyRing(context.Context, *CreateKeyRingRequest) (*KeyRing, error) - // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a - // [KeyRing][google.cloud.kms.v1.KeyRing]. - // - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and - // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] - // are required. - CreateCryptoKey(context.Context, *CreateCryptoKeyRequest) (*CryptoKey, error) - // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a - // [CryptoKey][google.cloud.kms.v1.CryptoKey]. - // - // The server will assign the next sequential id. If unset, - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. - CreateCryptoKeyVersion(context.Context, *CreateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Import wrapped key material into a - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - // - // All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If - // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally - // specified in the request, key material will be reimported into that - // version. Otherwise, a new version will be created, and will be assigned the - // next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. - ImportCryptoKeyVersion(context.Context, *ImportCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a - // [KeyRing][google.cloud.kms.v1.KeyRing]. - // - // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is - // required. - CreateImportJob(context.Context, *CreateImportJobRequest) (*ImportJob, error) - // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. - UpdateCryptoKey(context.Context, *UpdateCryptoKeyRequest) (*CryptoKey, error) - // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s - // metadata. - // - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between - // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - // and - // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - // using this method. See - // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] - // and - // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - // to move between other states. - UpdateCryptoKeyVersion(context.Context, *UpdateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that - // will be used in - // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. - // - // Returns an error if called on a key whose purpose is not - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - UpdateCryptoKeyPrimaryVersion(context.Context, *UpdateCryptoKeyPrimaryVersionRequest) (*CryptoKey, error) - // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for - // destruction. - // - // Upon calling this method, - // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will - // be set to - // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], - // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - // be set to the time - // [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] - // in the future. At that time, the - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically - // change to - // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], - // and the key material will be irrevocably destroyed. - // - // Before the - // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is - // reached, - // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - // may be called to reverse the process. - DestroyCryptoKeyVersion(context.Context, *DestroyCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - // state. - // - // Upon restoration of the CryptoKeyVersion, - // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], - // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - // be cleared. - RestoreCryptoKeyVersion(context.Context, *RestoreCryptoKeyVersionRequest) (*CryptoKeyVersion, error) - // Encrypts data, so that it can only be recovered by a call to - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) - // Decrypts data that was protected by - // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) - // Encrypts data using portable cryptographic primitives. Most users should - // choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than - // their raw counterparts. The - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - RawEncrypt(context.Context, *RawEncryptRequest) (*RawEncryptResponse, error) - // Decrypts data that was originally encrypted using a raw cryptographic - // mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // must be - // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. - RawDecrypt(context.Context, *RawDecryptRequest) (*RawDecryptResponse, error) - // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // ASYMMETRIC_SIGN, producing a signature that can be verified with the public - // key retrieved from - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - AsymmetricSign(context.Context, *AsymmetricSignRequest) (*AsymmetricSignResponse, error) - // Decrypts data that was encrypted with a public key retrieved from - // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - // ASYMMETRIC_DECRYPT. - AsymmetricDecrypt(context.Context, *AsymmetricDecryptRequest) (*AsymmetricDecryptResponse, error) - // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, - // producing a tag that can be verified by another source with the same key. - MacSign(context.Context, *MacSignRequest) (*MacSignResponse, error) - // Verifies MAC tag using a - // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns - // a response that indicates whether or not the verification was successful. - MacVerify(context.Context, *MacVerifyRequest) (*MacVerifyResponse, error) - // Generate random bytes using the Cloud KMS randomness source in the provided - // location. - GenerateRandomBytes(context.Context, *GenerateRandomBytesRequest) (*GenerateRandomBytesResponse, error) -} - -// UnimplementedKeyManagementServiceServer can be embedded to have forward compatible implementations. -type UnimplementedKeyManagementServiceServer struct { -} - -func (*UnimplementedKeyManagementServiceServer) ListKeyRings(context.Context, *ListKeyRingsRequest) (*ListKeyRingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKeyRings not implemented") -} -func (*UnimplementedKeyManagementServiceServer) ListCryptoKeys(context.Context, *ListCryptoKeysRequest) (*ListCryptoKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListCryptoKeys not implemented") -} -func (*UnimplementedKeyManagementServiceServer) ListCryptoKeyVersions(context.Context, *ListCryptoKeyVersionsRequest) (*ListCryptoKeyVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListCryptoKeyVersions not implemented") -} -func (*UnimplementedKeyManagementServiceServer) ListImportJobs(context.Context, *ListImportJobsRequest) (*ListImportJobsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListImportJobs not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GetKeyRing(context.Context, *GetKeyRingRequest) (*KeyRing, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKeyRing not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GetCryptoKey(context.Context, *GetCryptoKeyRequest) (*CryptoKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCryptoKey not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GetCryptoKeyVersion(context.Context, *GetCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GetPublicKey(context.Context, *GetPublicKeyRequest) (*PublicKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPublicKey not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GetImportJob(context.Context, *GetImportJobRequest) (*ImportJob, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetImportJob not implemented") -} -func (*UnimplementedKeyManagementServiceServer) CreateKeyRing(context.Context, *CreateKeyRingRequest) (*KeyRing, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateKeyRing not implemented") -} -func (*UnimplementedKeyManagementServiceServer) CreateCryptoKey(context.Context, *CreateCryptoKeyRequest) (*CryptoKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCryptoKey not implemented") -} -func (*UnimplementedKeyManagementServiceServer) CreateCryptoKeyVersion(context.Context, *CreateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) ImportCryptoKeyVersion(context.Context, *ImportCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) CreateImportJob(context.Context, *CreateImportJobRequest) (*ImportJob, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateImportJob not implemented") -} -func (*UnimplementedKeyManagementServiceServer) UpdateCryptoKey(context.Context, *UpdateCryptoKeyRequest) (*CryptoKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKey not implemented") -} -func (*UnimplementedKeyManagementServiceServer) UpdateCryptoKeyVersion(context.Context, *UpdateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) UpdateCryptoKeyPrimaryVersion(context.Context, *UpdateCryptoKeyPrimaryVersionRequest) (*CryptoKey, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKeyPrimaryVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) DestroyCryptoKeyVersion(context.Context, *DestroyCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method DestroyCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) RestoreCryptoKeyVersion(context.Context, *RestoreCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestoreCryptoKeyVersion not implemented") -} -func (*UnimplementedKeyManagementServiceServer) Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Encrypt not implemented") -} -func (*UnimplementedKeyManagementServiceServer) Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Decrypt not implemented") -} -func (*UnimplementedKeyManagementServiceServer) RawEncrypt(context.Context, *RawEncryptRequest) (*RawEncryptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RawEncrypt not implemented") -} -func (*UnimplementedKeyManagementServiceServer) RawDecrypt(context.Context, *RawDecryptRequest) (*RawDecryptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RawDecrypt not implemented") -} -func (*UnimplementedKeyManagementServiceServer) AsymmetricSign(context.Context, *AsymmetricSignRequest) (*AsymmetricSignResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AsymmetricSign not implemented") -} -func (*UnimplementedKeyManagementServiceServer) AsymmetricDecrypt(context.Context, *AsymmetricDecryptRequest) (*AsymmetricDecryptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AsymmetricDecrypt not implemented") -} -func (*UnimplementedKeyManagementServiceServer) MacSign(context.Context, *MacSignRequest) (*MacSignResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MacSign not implemented") -} -func (*UnimplementedKeyManagementServiceServer) MacVerify(context.Context, *MacVerifyRequest) (*MacVerifyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MacVerify not implemented") -} -func (*UnimplementedKeyManagementServiceServer) GenerateRandomBytes(context.Context, *GenerateRandomBytesRequest) (*GenerateRandomBytesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateRandomBytes not implemented") -} - -func RegisterKeyManagementServiceServer(s *grpc.Server, srv KeyManagementServiceServer) { - s.RegisterService(&_KeyManagementService_serviceDesc, srv) -} - -func _KeyManagementService_ListKeyRings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKeyRingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).ListKeyRings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/ListKeyRings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).ListKeyRings(ctx, req.(*ListKeyRingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_ListCryptoKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCryptoKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).ListCryptoKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).ListCryptoKeys(ctx, req.(*ListCryptoKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_ListCryptoKeyVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCryptoKeyVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).ListCryptoKeyVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).ListCryptoKeyVersions(ctx, req.(*ListCryptoKeyVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_ListImportJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListImportJobsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).ListImportJobs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/ListImportJobs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).ListImportJobs(ctx, req.(*ListImportJobsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GetKeyRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKeyRingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GetKeyRing(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GetKeyRing", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GetKeyRing(ctx, req.(*GetKeyRingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GetCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCryptoKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GetCryptoKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GetCryptoKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GetCryptoKey(ctx, req.(*GetCryptoKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GetCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GetCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GetCryptoKeyVersion(ctx, req.(*GetCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPublicKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GetPublicKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GetPublicKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GetPublicKey(ctx, req.(*GetPublicKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GetImportJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetImportJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GetImportJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GetImportJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GetImportJob(ctx, req.(*GetImportJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_CreateKeyRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateKeyRingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).CreateKeyRing(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/CreateKeyRing", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).CreateKeyRing(ctx, req.(*CreateKeyRingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_CreateCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCryptoKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).CreateCryptoKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).CreateCryptoKey(ctx, req.(*CreateCryptoKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_CreateCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).CreateCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).CreateCryptoKeyVersion(ctx, req.(*CreateCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_ImportCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).ImportCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).ImportCryptoKeyVersion(ctx, req.(*ImportCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_CreateImportJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateImportJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).CreateImportJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/CreateImportJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).CreateImportJob(ctx, req.(*CreateImportJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_UpdateCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCryptoKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).UpdateCryptoKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).UpdateCryptoKey(ctx, req.(*UpdateCryptoKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_UpdateCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).UpdateCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).UpdateCryptoKeyVersion(ctx, req.(*UpdateCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_UpdateCryptoKeyPrimaryVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCryptoKeyPrimaryVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).UpdateCryptoKeyPrimaryVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).UpdateCryptoKeyPrimaryVersion(ctx, req.(*UpdateCryptoKeyPrimaryVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_DestroyCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DestroyCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).DestroyCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).DestroyCryptoKeyVersion(ctx, req.(*DestroyCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_RestoreCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RestoreCryptoKeyVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).RestoreCryptoKeyVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).RestoreCryptoKeyVersion(ctx, req.(*RestoreCryptoKeyVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_Encrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EncryptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).Encrypt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/Encrypt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).Encrypt(ctx, req.(*EncryptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_Decrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DecryptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).Decrypt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/Decrypt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).Decrypt(ctx, req.(*DecryptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_RawEncrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RawEncryptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).RawEncrypt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/RawEncrypt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).RawEncrypt(ctx, req.(*RawEncryptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_RawDecrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RawDecryptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).RawDecrypt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/RawDecrypt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).RawDecrypt(ctx, req.(*RawDecryptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_AsymmetricSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AsymmetricSignRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).AsymmetricSign(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/AsymmetricSign", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).AsymmetricSign(ctx, req.(*AsymmetricSignRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_AsymmetricDecrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AsymmetricDecryptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).AsymmetricDecrypt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).AsymmetricDecrypt(ctx, req.(*AsymmetricDecryptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_MacSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MacSignRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).MacSign(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/MacSign", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).MacSign(ctx, req.(*MacSignRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_MacVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MacVerifyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).MacVerify(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/MacVerify", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).MacVerify(ctx, req.(*MacVerifyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagementService_GenerateRandomBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateRandomBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServiceServer).GenerateRandomBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServiceServer).GenerateRandomBytes(ctx, req.(*GenerateRandomBytesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _KeyManagementService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.cloud.kms.v1.KeyManagementService", - HandlerType: (*KeyManagementServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListKeyRings", - Handler: _KeyManagementService_ListKeyRings_Handler, - }, - { - MethodName: "ListCryptoKeys", - Handler: _KeyManagementService_ListCryptoKeys_Handler, - }, - { - MethodName: "ListCryptoKeyVersions", - Handler: _KeyManagementService_ListCryptoKeyVersions_Handler, - }, - { - MethodName: "ListImportJobs", - Handler: _KeyManagementService_ListImportJobs_Handler, - }, - { - MethodName: "GetKeyRing", - Handler: _KeyManagementService_GetKeyRing_Handler, - }, - { - MethodName: "GetCryptoKey", - Handler: _KeyManagementService_GetCryptoKey_Handler, - }, - { - MethodName: "GetCryptoKeyVersion", - Handler: _KeyManagementService_GetCryptoKeyVersion_Handler, - }, - { - MethodName: "GetPublicKey", - Handler: _KeyManagementService_GetPublicKey_Handler, - }, - { - MethodName: "GetImportJob", - Handler: _KeyManagementService_GetImportJob_Handler, - }, - { - MethodName: "CreateKeyRing", - Handler: _KeyManagementService_CreateKeyRing_Handler, - }, - { - MethodName: "CreateCryptoKey", - Handler: _KeyManagementService_CreateCryptoKey_Handler, - }, - { - MethodName: "CreateCryptoKeyVersion", - Handler: _KeyManagementService_CreateCryptoKeyVersion_Handler, - }, - { - MethodName: "ImportCryptoKeyVersion", - Handler: _KeyManagementService_ImportCryptoKeyVersion_Handler, - }, - { - MethodName: "CreateImportJob", - Handler: _KeyManagementService_CreateImportJob_Handler, - }, - { - MethodName: "UpdateCryptoKey", - Handler: _KeyManagementService_UpdateCryptoKey_Handler, - }, - { - MethodName: "UpdateCryptoKeyVersion", - Handler: _KeyManagementService_UpdateCryptoKeyVersion_Handler, - }, - { - MethodName: "UpdateCryptoKeyPrimaryVersion", - Handler: _KeyManagementService_UpdateCryptoKeyPrimaryVersion_Handler, - }, - { - MethodName: "DestroyCryptoKeyVersion", - Handler: _KeyManagementService_DestroyCryptoKeyVersion_Handler, - }, - { - MethodName: "RestoreCryptoKeyVersion", - Handler: _KeyManagementService_RestoreCryptoKeyVersion_Handler, - }, - { - MethodName: "Encrypt", - Handler: _KeyManagementService_Encrypt_Handler, - }, - { - MethodName: "Decrypt", - Handler: _KeyManagementService_Decrypt_Handler, - }, - { - MethodName: "RawEncrypt", - Handler: _KeyManagementService_RawEncrypt_Handler, - }, - { - MethodName: "RawDecrypt", - Handler: _KeyManagementService_RawDecrypt_Handler, - }, - { - MethodName: "AsymmetricSign", - Handler: _KeyManagementService_AsymmetricSign_Handler, - }, - { - MethodName: "AsymmetricDecrypt", - Handler: _KeyManagementService_AsymmetricDecrypt_Handler, - }, - { - MethodName: "MacSign", - Handler: _KeyManagementService_MacSign_Handler, - }, - { - MethodName: "MacVerify", - Handler: _KeyManagementService_MacVerify_Handler, - }, - { - MethodName: "GenerateRandomBytes", - Handler: _KeyManagementService_GenerateRandomBytes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/cloud/kms/v1/service.proto", -} diff --git a/vendor/cloud.google.com/go/kms/apiv1/kmspb/service_grpc.pb.go b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service_grpc.pb.go new file mode 100644 index 0000000000..7db4aad105 --- /dev/null +++ b/vendor/cloud.google.com/go/kms/apiv1/kmspb/service_grpc.pb.go @@ -0,0 +1,1428 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/kms/v1/service.proto + +package kmspb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + KeyManagementService_ListKeyRings_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/ListKeyRings" + KeyManagementService_ListCryptoKeys_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys" + KeyManagementService_ListCryptoKeyVersions_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions" + KeyManagementService_ListImportJobs_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/ListImportJobs" + KeyManagementService_GetKeyRing_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GetKeyRing" + KeyManagementService_GetCryptoKey_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GetCryptoKey" + KeyManagementService_GetCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion" + KeyManagementService_GetPublicKey_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GetPublicKey" + KeyManagementService_GetImportJob_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GetImportJob" + KeyManagementService_CreateKeyRing_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/CreateKeyRing" + KeyManagementService_CreateCryptoKey_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey" + KeyManagementService_CreateCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion" + KeyManagementService_ImportCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion" + KeyManagementService_CreateImportJob_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/CreateImportJob" + KeyManagementService_UpdateCryptoKey_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey" + KeyManagementService_UpdateCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion" + KeyManagementService_UpdateCryptoKeyPrimaryVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion" + KeyManagementService_DestroyCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion" + KeyManagementService_RestoreCryptoKeyVersion_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion" + KeyManagementService_Encrypt_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/Encrypt" + KeyManagementService_Decrypt_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/Decrypt" + KeyManagementService_RawEncrypt_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/RawEncrypt" + KeyManagementService_RawDecrypt_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/RawDecrypt" + KeyManagementService_AsymmetricSign_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/AsymmetricSign" + KeyManagementService_AsymmetricDecrypt_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt" + KeyManagementService_MacSign_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/MacSign" + KeyManagementService_MacVerify_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/MacVerify" + KeyManagementService_Decapsulate_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/Decapsulate" + KeyManagementService_GenerateRandomBytes_FullMethodName = "/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes" +) + +// KeyManagementServiceClient is the client API for KeyManagementService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type KeyManagementServiceClient interface { + // Lists [KeyRings][google.cloud.kms.v1.KeyRing]. + ListKeyRings(ctx context.Context, in *ListKeyRingsRequest, opts ...grpc.CallOption) (*ListKeyRingsResponse, error) + // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + ListCryptoKeys(ctx context.Context, in *ListCryptoKeysRequest, opts ...grpc.CallOption) (*ListCryptoKeysResponse, error) + // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + ListCryptoKeyVersions(ctx context.Context, in *ListCryptoKeyVersionsRequest, opts ...grpc.CallOption) (*ListCryptoKeyVersionsResponse, error) + // Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + ListImportJobs(ctx context.Context, in *ListImportJobsRequest, opts ...grpc.CallOption) (*ListImportJobsResponse, error) + // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. + GetKeyRing(ctx context.Context, in *GetKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) + // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + // well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + GetCryptoKey(ctx context.Context, in *GetCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) + // Returns metadata for a given + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + GetCryptoKeyVersion(ctx context.Context, in *GetCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Returns the public key for the given + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + // or + // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*PublicKey, error) + // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + GetImportJob(ctx context.Context, in *GetImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) + // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + // Location. + CreateKeyRing(ctx context.Context, in *CreateKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) + // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + // [KeyRing][google.cloud.kms.v1.KeyRing]. + // + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + // are required. + CreateCryptoKey(ctx context.Context, in *CreateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) + // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + // + // The server will assign the next sequential id. If unset, + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. + CreateCryptoKeyVersion(ctx context.Context, in *CreateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Import wrapped key material into a + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + // + // All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If + // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally + // specified in the request, key material will be reimported into that + // version. Otherwise, a new version will be created, and will be assigned the + // next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. + ImportCryptoKeyVersion(ctx context.Context, in *ImportCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + // [KeyRing][google.cloud.kms.v1.KeyRing]. + // + // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + // required. + CreateImportJob(ctx context.Context, in *CreateImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) + // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. + UpdateCryptoKey(ctx context.Context, in *UpdateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) + // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + // metadata. + // + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // and + // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + // using this method. See + // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + // and + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to move between other states. + UpdateCryptoKeyVersion(ctx context.Context, in *UpdateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + // will be used in + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + // + // Returns an error if called on a key whose purpose is not + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + UpdateCryptoKeyPrimaryVersion(ctx context.Context, in *UpdateCryptoKeyPrimaryVersionRequest, opts ...grpc.CallOption) (*CryptoKey, error) + // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + // destruction. + // + // Upon calling this method, + // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + // be set to + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + // be set to the time + // [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] + // in the future. At that time, the + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically + // change to + // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + // and the key material will be irrevocably destroyed. + // + // Before the + // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + // reached, + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // may be called to reverse the process. + DestroyCryptoKeyVersion(ctx context.Context, in *DestroyCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + // state. + // + // Upon restoration of the CryptoKeyVersion, + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + // be cleared. + RestoreCryptoKeyVersion(ctx context.Context, in *RestoreCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) + // Encrypts data, so that it can only be recovered by a call to + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) + // Decrypts data that was protected by + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error) + // Encrypts data using portable cryptographic primitives. Most users should + // choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than + // their raw counterparts. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + RawEncrypt(ctx context.Context, in *RawEncryptRequest, opts ...grpc.CallOption) (*RawEncryptResponse, error) + // Decrypts data that was originally encrypted using a raw cryptographic + // mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // must be + // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + RawDecrypt(ctx context.Context, in *RawDecryptRequest, opts ...grpc.CallOption) (*RawDecryptResponse, error) + // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // ASYMMETRIC_SIGN, producing a signature that can be verified with the public + // key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + AsymmetricSign(ctx context.Context, in *AsymmetricSignRequest, opts ...grpc.CallOption) (*AsymmetricSignResponse, error) + // Decrypts data that was encrypted with a public key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // ASYMMETRIC_DECRYPT. + AsymmetricDecrypt(ctx context.Context, in *AsymmetricDecryptRequest, opts ...grpc.CallOption) (*AsymmetricDecryptResponse, error) + // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, + // producing a tag that can be verified by another source with the same key. + MacSign(ctx context.Context, in *MacSignRequest, opts ...grpc.CallOption) (*MacSignResponse, error) + // Verifies MAC tag using a + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns + // a response that indicates whether or not the verification was successful. + MacVerify(ctx context.Context, in *MacVerifyRequest, opts ...grpc.CallOption) (*MacVerifyResponse, error) + // Decapsulates data that was encapsulated with a public key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // KEY_ENCAPSULATION. + Decapsulate(ctx context.Context, in *DecapsulateRequest, opts ...grpc.CallOption) (*DecapsulateResponse, error) + // Generate random bytes using the Cloud KMS randomness source in the provided + // location. + GenerateRandomBytes(ctx context.Context, in *GenerateRandomBytesRequest, opts ...grpc.CallOption) (*GenerateRandomBytesResponse, error) +} + +type keyManagementServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewKeyManagementServiceClient(cc grpc.ClientConnInterface) KeyManagementServiceClient { + return &keyManagementServiceClient{cc} +} + +func (c *keyManagementServiceClient) ListKeyRings(ctx context.Context, in *ListKeyRingsRequest, opts ...grpc.CallOption) (*ListKeyRingsResponse, error) { + out := new(ListKeyRingsResponse) + err := c.cc.Invoke(ctx, KeyManagementService_ListKeyRings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) ListCryptoKeys(ctx context.Context, in *ListCryptoKeysRequest, opts ...grpc.CallOption) (*ListCryptoKeysResponse, error) { + out := new(ListCryptoKeysResponse) + err := c.cc.Invoke(ctx, KeyManagementService_ListCryptoKeys_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) ListCryptoKeyVersions(ctx context.Context, in *ListCryptoKeyVersionsRequest, opts ...grpc.CallOption) (*ListCryptoKeyVersionsResponse, error) { + out := new(ListCryptoKeyVersionsResponse) + err := c.cc.Invoke(ctx, KeyManagementService_ListCryptoKeyVersions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) ListImportJobs(ctx context.Context, in *ListImportJobsRequest, opts ...grpc.CallOption) (*ListImportJobsResponse, error) { + out := new(ListImportJobsResponse) + err := c.cc.Invoke(ctx, KeyManagementService_ListImportJobs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GetKeyRing(ctx context.Context, in *GetKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) { + out := new(KeyRing) + err := c.cc.Invoke(ctx, KeyManagementService_GetKeyRing_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GetCryptoKey(ctx context.Context, in *GetCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { + out := new(CryptoKey) + err := c.cc.Invoke(ctx, KeyManagementService_GetCryptoKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GetCryptoKeyVersion(ctx context.Context, in *GetCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_GetCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*PublicKey, error) { + out := new(PublicKey) + err := c.cc.Invoke(ctx, KeyManagementService_GetPublicKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GetImportJob(ctx context.Context, in *GetImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) { + out := new(ImportJob) + err := c.cc.Invoke(ctx, KeyManagementService_GetImportJob_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) CreateKeyRing(ctx context.Context, in *CreateKeyRingRequest, opts ...grpc.CallOption) (*KeyRing, error) { + out := new(KeyRing) + err := c.cc.Invoke(ctx, KeyManagementService_CreateKeyRing_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) CreateCryptoKey(ctx context.Context, in *CreateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { + out := new(CryptoKey) + err := c.cc.Invoke(ctx, KeyManagementService_CreateCryptoKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) CreateCryptoKeyVersion(ctx context.Context, in *CreateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_CreateCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) ImportCryptoKeyVersion(ctx context.Context, in *ImportCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_ImportCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) CreateImportJob(ctx context.Context, in *CreateImportJobRequest, opts ...grpc.CallOption) (*ImportJob, error) { + out := new(ImportJob) + err := c.cc.Invoke(ctx, KeyManagementService_CreateImportJob_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) UpdateCryptoKey(ctx context.Context, in *UpdateCryptoKeyRequest, opts ...grpc.CallOption) (*CryptoKey, error) { + out := new(CryptoKey) + err := c.cc.Invoke(ctx, KeyManagementService_UpdateCryptoKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) UpdateCryptoKeyVersion(ctx context.Context, in *UpdateCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_UpdateCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) UpdateCryptoKeyPrimaryVersion(ctx context.Context, in *UpdateCryptoKeyPrimaryVersionRequest, opts ...grpc.CallOption) (*CryptoKey, error) { + out := new(CryptoKey) + err := c.cc.Invoke(ctx, KeyManagementService_UpdateCryptoKeyPrimaryVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) DestroyCryptoKeyVersion(ctx context.Context, in *DestroyCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_DestroyCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) RestoreCryptoKeyVersion(ctx context.Context, in *RestoreCryptoKeyVersionRequest, opts ...grpc.CallOption) (*CryptoKeyVersion, error) { + out := new(CryptoKeyVersion) + err := c.cc.Invoke(ctx, KeyManagementService_RestoreCryptoKeyVersion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error) { + out := new(EncryptResponse) + err := c.cc.Invoke(ctx, KeyManagementService_Encrypt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) Decrypt(ctx context.Context, in *DecryptRequest, opts ...grpc.CallOption) (*DecryptResponse, error) { + out := new(DecryptResponse) + err := c.cc.Invoke(ctx, KeyManagementService_Decrypt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) RawEncrypt(ctx context.Context, in *RawEncryptRequest, opts ...grpc.CallOption) (*RawEncryptResponse, error) { + out := new(RawEncryptResponse) + err := c.cc.Invoke(ctx, KeyManagementService_RawEncrypt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) RawDecrypt(ctx context.Context, in *RawDecryptRequest, opts ...grpc.CallOption) (*RawDecryptResponse, error) { + out := new(RawDecryptResponse) + err := c.cc.Invoke(ctx, KeyManagementService_RawDecrypt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) AsymmetricSign(ctx context.Context, in *AsymmetricSignRequest, opts ...grpc.CallOption) (*AsymmetricSignResponse, error) { + out := new(AsymmetricSignResponse) + err := c.cc.Invoke(ctx, KeyManagementService_AsymmetricSign_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) AsymmetricDecrypt(ctx context.Context, in *AsymmetricDecryptRequest, opts ...grpc.CallOption) (*AsymmetricDecryptResponse, error) { + out := new(AsymmetricDecryptResponse) + err := c.cc.Invoke(ctx, KeyManagementService_AsymmetricDecrypt_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) MacSign(ctx context.Context, in *MacSignRequest, opts ...grpc.CallOption) (*MacSignResponse, error) { + out := new(MacSignResponse) + err := c.cc.Invoke(ctx, KeyManagementService_MacSign_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) MacVerify(ctx context.Context, in *MacVerifyRequest, opts ...grpc.CallOption) (*MacVerifyResponse, error) { + out := new(MacVerifyResponse) + err := c.cc.Invoke(ctx, KeyManagementService_MacVerify_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) Decapsulate(ctx context.Context, in *DecapsulateRequest, opts ...grpc.CallOption) (*DecapsulateResponse, error) { + out := new(DecapsulateResponse) + err := c.cc.Invoke(ctx, KeyManagementService_Decapsulate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyManagementServiceClient) GenerateRandomBytes(ctx context.Context, in *GenerateRandomBytesRequest, opts ...grpc.CallOption) (*GenerateRandomBytesResponse, error) { + out := new(GenerateRandomBytesResponse) + err := c.cc.Invoke(ctx, KeyManagementService_GenerateRandomBytes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeyManagementServiceServer is the server API for KeyManagementService service. +// All implementations should embed UnimplementedKeyManagementServiceServer +// for forward compatibility +type KeyManagementServiceServer interface { + // Lists [KeyRings][google.cloud.kms.v1.KeyRing]. + ListKeyRings(context.Context, *ListKeyRingsRequest) (*ListKeyRingsResponse, error) + // Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + ListCryptoKeys(context.Context, *ListCryptoKeysRequest) (*ListCryptoKeysResponse, error) + // Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + ListCryptoKeyVersions(context.Context, *ListCryptoKeyVersionsRequest) (*ListCryptoKeyVersionsResponse, error) + // Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + ListImportJobs(context.Context, *ListImportJobsRequest) (*ListImportJobsResponse, error) + // Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. + GetKeyRing(context.Context, *GetKeyRingRequest) (*KeyRing, error) + // Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + // well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + GetCryptoKey(context.Context, *GetCryptoKeyRequest) (*CryptoKey, error) + // Returns metadata for a given + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + GetCryptoKeyVersion(context.Context, *GetCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Returns the public key for the given + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + // or + // [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + GetPublicKey(context.Context, *GetPublicKeyRequest) (*PublicKey, error) + // Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + GetImportJob(context.Context, *GetImportJobRequest) (*ImportJob, error) + // Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + // Location. + CreateKeyRing(context.Context, *CreateKeyRingRequest) (*KeyRing, error) + // Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + // [KeyRing][google.cloud.kms.v1.KeyRing]. + // + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + // [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + // are required. + CreateCryptoKey(context.Context, *CreateCryptoKeyRequest) (*CryptoKey, error) + // Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + // [CryptoKey][google.cloud.kms.v1.CryptoKey]. + // + // The server will assign the next sequential id. If unset, + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. + CreateCryptoKeyVersion(context.Context, *CreateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Import wrapped key material into a + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + // + // All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If + // a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally + // specified in the request, key material will be reimported into that + // version. Otherwise, a new version will be created, and will be assigned the + // next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. + ImportCryptoKeyVersion(context.Context, *ImportCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + // [KeyRing][google.cloud.kms.v1.KeyRing]. + // + // [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + // required. + CreateImportJob(context.Context, *CreateImportJobRequest) (*ImportJob, error) + // Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. + UpdateCryptoKey(context.Context, *UpdateCryptoKeyRequest) (*CryptoKey, error) + // Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + // metadata. + // + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + // [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + // and + // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + // using this method. See + // [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + // and + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // to move between other states. + UpdateCryptoKeyVersion(context.Context, *UpdateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + // will be used in + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + // + // Returns an error if called on a key whose purpose is not + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + UpdateCryptoKeyPrimaryVersion(context.Context, *UpdateCryptoKeyPrimaryVersionRequest) (*CryptoKey, error) + // Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + // destruction. + // + // Upon calling this method, + // [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + // be set to + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + // be set to the time + // [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] + // in the future. At that time, the + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically + // change to + // [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + // and the key material will be irrevocably destroyed. + // + // Before the + // [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + // reached, + // [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + // may be called to reverse the process. + DestroyCryptoKeyVersion(context.Context, *DestroyCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + // [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + // state. + // + // Upon restoration of the CryptoKeyVersion, + // [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + // [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + // and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + // be cleared. + RestoreCryptoKeyVersion(context.Context, *RestoreCryptoKeyVersionRequest) (*CryptoKeyVersion, error) + // Encrypts data, so that it can only be recovered by a call to + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) + // Decrypts data that was protected by + // [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) + // Encrypts data using portable cryptographic primitives. Most users should + // choose [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + // [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt] rather than + // their raw counterparts. The + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + RawEncrypt(context.Context, *RawEncryptRequest) (*RawEncryptResponse, error) + // Decrypts data that was originally encrypted using a raw cryptographic + // mechanism. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // must be + // [RAW_ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.RAW_ENCRYPT_DECRYPT]. + RawDecrypt(context.Context, *RawDecryptRequest) (*RawDecryptResponse, error) + // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // ASYMMETRIC_SIGN, producing a signature that can be verified with the public + // key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + AsymmetricSign(context.Context, *AsymmetricSignRequest) (*AsymmetricSignResponse, error) + // Decrypts data that was encrypted with a public key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // ASYMMETRIC_DECRYPT. + AsymmetricDecrypt(context.Context, *AsymmetricDecryptRequest) (*AsymmetricDecryptResponse, error) + // Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, + // producing a tag that can be verified by another source with the same key. + MacSign(context.Context, *MacSignRequest) (*MacSignResponse, error) + // Verifies MAC tag using a + // [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + // [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns + // a response that indicates whether or not the verification was successful. + MacVerify(context.Context, *MacVerifyRequest) (*MacVerifyResponse, error) + // Decapsulates data that was encapsulated with a public key retrieved from + // [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + // corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + // with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + // KEY_ENCAPSULATION. + Decapsulate(context.Context, *DecapsulateRequest) (*DecapsulateResponse, error) + // Generate random bytes using the Cloud KMS randomness source in the provided + // location. + GenerateRandomBytes(context.Context, *GenerateRandomBytesRequest) (*GenerateRandomBytesResponse, error) +} + +// UnimplementedKeyManagementServiceServer should be embedded to have forward compatible implementations. +type UnimplementedKeyManagementServiceServer struct { +} + +func (UnimplementedKeyManagementServiceServer) ListKeyRings(context.Context, *ListKeyRingsRequest) (*ListKeyRingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyRings not implemented") +} +func (UnimplementedKeyManagementServiceServer) ListCryptoKeys(context.Context, *ListCryptoKeysRequest) (*ListCryptoKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCryptoKeys not implemented") +} +func (UnimplementedKeyManagementServiceServer) ListCryptoKeyVersions(context.Context, *ListCryptoKeyVersionsRequest) (*ListCryptoKeyVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCryptoKeyVersions not implemented") +} +func (UnimplementedKeyManagementServiceServer) ListImportJobs(context.Context, *ListImportJobsRequest) (*ListImportJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListImportJobs not implemented") +} +func (UnimplementedKeyManagementServiceServer) GetKeyRing(context.Context, *GetKeyRingRequest) (*KeyRing, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKeyRing not implemented") +} +func (UnimplementedKeyManagementServiceServer) GetCryptoKey(context.Context, *GetCryptoKeyRequest) (*CryptoKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCryptoKey not implemented") +} +func (UnimplementedKeyManagementServiceServer) GetCryptoKeyVersion(context.Context, *GetCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) GetPublicKey(context.Context, *GetPublicKeyRequest) (*PublicKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPublicKey not implemented") +} +func (UnimplementedKeyManagementServiceServer) GetImportJob(context.Context, *GetImportJobRequest) (*ImportJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetImportJob not implemented") +} +func (UnimplementedKeyManagementServiceServer) CreateKeyRing(context.Context, *CreateKeyRingRequest) (*KeyRing, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateKeyRing not implemented") +} +func (UnimplementedKeyManagementServiceServer) CreateCryptoKey(context.Context, *CreateCryptoKeyRequest) (*CryptoKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCryptoKey not implemented") +} +func (UnimplementedKeyManagementServiceServer) CreateCryptoKeyVersion(context.Context, *CreateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) ImportCryptoKeyVersion(context.Context, *ImportCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) CreateImportJob(context.Context, *CreateImportJobRequest) (*ImportJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateImportJob not implemented") +} +func (UnimplementedKeyManagementServiceServer) UpdateCryptoKey(context.Context, *UpdateCryptoKeyRequest) (*CryptoKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKey not implemented") +} +func (UnimplementedKeyManagementServiceServer) UpdateCryptoKeyVersion(context.Context, *UpdateCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) UpdateCryptoKeyPrimaryVersion(context.Context, *UpdateCryptoKeyPrimaryVersionRequest) (*CryptoKey, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCryptoKeyPrimaryVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) DestroyCryptoKeyVersion(context.Context, *DestroyCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method DestroyCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) RestoreCryptoKeyVersion(context.Context, *RestoreCryptoKeyVersionRequest) (*CryptoKeyVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreCryptoKeyVersion not implemented") +} +func (UnimplementedKeyManagementServiceServer) Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Encrypt not implemented") +} +func (UnimplementedKeyManagementServiceServer) Decrypt(context.Context, *DecryptRequest) (*DecryptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Decrypt not implemented") +} +func (UnimplementedKeyManagementServiceServer) RawEncrypt(context.Context, *RawEncryptRequest) (*RawEncryptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RawEncrypt not implemented") +} +func (UnimplementedKeyManagementServiceServer) RawDecrypt(context.Context, *RawDecryptRequest) (*RawDecryptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RawDecrypt not implemented") +} +func (UnimplementedKeyManagementServiceServer) AsymmetricSign(context.Context, *AsymmetricSignRequest) (*AsymmetricSignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AsymmetricSign not implemented") +} +func (UnimplementedKeyManagementServiceServer) AsymmetricDecrypt(context.Context, *AsymmetricDecryptRequest) (*AsymmetricDecryptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AsymmetricDecrypt not implemented") +} +func (UnimplementedKeyManagementServiceServer) MacSign(context.Context, *MacSignRequest) (*MacSignResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MacSign not implemented") +} +func (UnimplementedKeyManagementServiceServer) MacVerify(context.Context, *MacVerifyRequest) (*MacVerifyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MacVerify not implemented") +} +func (UnimplementedKeyManagementServiceServer) Decapsulate(context.Context, *DecapsulateRequest) (*DecapsulateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Decapsulate not implemented") +} +func (UnimplementedKeyManagementServiceServer) GenerateRandomBytes(context.Context, *GenerateRandomBytesRequest) (*GenerateRandomBytesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateRandomBytes not implemented") +} + +// UnsafeKeyManagementServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeyManagementServiceServer will +// result in compilation errors. +type UnsafeKeyManagementServiceServer interface { + mustEmbedUnimplementedKeyManagementServiceServer() +} + +func RegisterKeyManagementServiceServer(s grpc.ServiceRegistrar, srv KeyManagementServiceServer) { + s.RegisterService(&KeyManagementService_ServiceDesc, srv) +} + +func _KeyManagementService_ListKeyRings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeyRingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).ListKeyRings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_ListKeyRings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).ListKeyRings(ctx, req.(*ListKeyRingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_ListCryptoKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCryptoKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).ListCryptoKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_ListCryptoKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).ListCryptoKeys(ctx, req.(*ListCryptoKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_ListCryptoKeyVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCryptoKeyVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).ListCryptoKeyVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_ListCryptoKeyVersions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).ListCryptoKeyVersions(ctx, req.(*ListCryptoKeyVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_ListImportJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListImportJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).ListImportJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_ListImportJobs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).ListImportJobs(ctx, req.(*ListImportJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GetKeyRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKeyRingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GetKeyRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GetKeyRing_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GetKeyRing(ctx, req.(*GetKeyRingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GetCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCryptoKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GetCryptoKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GetCryptoKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GetCryptoKey(ctx, req.(*GetCryptoKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GetCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GetCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GetCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GetCryptoKeyVersion(ctx, req.(*GetCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GetPublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GetPublicKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GetPublicKey(ctx, req.(*GetPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GetImportJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImportJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GetImportJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GetImportJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GetImportJob(ctx, req.(*GetImportJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_CreateKeyRing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateKeyRingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).CreateKeyRing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_CreateKeyRing_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).CreateKeyRing(ctx, req.(*CreateKeyRingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_CreateCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCryptoKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).CreateCryptoKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_CreateCryptoKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).CreateCryptoKey(ctx, req.(*CreateCryptoKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_CreateCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).CreateCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_CreateCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).CreateCryptoKeyVersion(ctx, req.(*CreateCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_ImportCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).ImportCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_ImportCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).ImportCryptoKeyVersion(ctx, req.(*ImportCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_CreateImportJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateImportJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).CreateImportJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_CreateImportJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).CreateImportJob(ctx, req.(*CreateImportJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_UpdateCryptoKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCryptoKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).UpdateCryptoKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_UpdateCryptoKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).UpdateCryptoKey(ctx, req.(*UpdateCryptoKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_UpdateCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).UpdateCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_UpdateCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).UpdateCryptoKeyVersion(ctx, req.(*UpdateCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_UpdateCryptoKeyPrimaryVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCryptoKeyPrimaryVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).UpdateCryptoKeyPrimaryVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_UpdateCryptoKeyPrimaryVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).UpdateCryptoKeyPrimaryVersion(ctx, req.(*UpdateCryptoKeyPrimaryVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_DestroyCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).DestroyCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_DestroyCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).DestroyCryptoKeyVersion(ctx, req.(*DestroyCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_RestoreCryptoKeyVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreCryptoKeyVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).RestoreCryptoKeyVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_RestoreCryptoKeyVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).RestoreCryptoKeyVersion(ctx, req.(*RestoreCryptoKeyVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_Encrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EncryptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).Encrypt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_Encrypt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).Encrypt(ctx, req.(*EncryptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_Decrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DecryptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).Decrypt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_Decrypt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).Decrypt(ctx, req.(*DecryptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_RawEncrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawEncryptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).RawEncrypt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_RawEncrypt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).RawEncrypt(ctx, req.(*RawEncryptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_RawDecrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawDecryptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).RawDecrypt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_RawDecrypt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).RawDecrypt(ctx, req.(*RawDecryptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_AsymmetricSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AsymmetricSignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).AsymmetricSign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_AsymmetricSign_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).AsymmetricSign(ctx, req.(*AsymmetricSignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_AsymmetricDecrypt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AsymmetricDecryptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).AsymmetricDecrypt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_AsymmetricDecrypt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).AsymmetricDecrypt(ctx, req.(*AsymmetricDecryptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_MacSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MacSignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).MacSign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_MacSign_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).MacSign(ctx, req.(*MacSignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_MacVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MacVerifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).MacVerify(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_MacVerify_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).MacVerify(ctx, req.(*MacVerifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_Decapsulate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DecapsulateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).Decapsulate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_Decapsulate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).Decapsulate(ctx, req.(*DecapsulateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyManagementService_GenerateRandomBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateRandomBytesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyManagementServiceServer).GenerateRandomBytes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyManagementService_GenerateRandomBytes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyManagementServiceServer).GenerateRandomBytes(ctx, req.(*GenerateRandomBytesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KeyManagementService_ServiceDesc is the grpc.ServiceDesc for KeyManagementService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KeyManagementService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.kms.v1.KeyManagementService", + HandlerType: (*KeyManagementServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListKeyRings", + Handler: _KeyManagementService_ListKeyRings_Handler, + }, + { + MethodName: "ListCryptoKeys", + Handler: _KeyManagementService_ListCryptoKeys_Handler, + }, + { + MethodName: "ListCryptoKeyVersions", + Handler: _KeyManagementService_ListCryptoKeyVersions_Handler, + }, + { + MethodName: "ListImportJobs", + Handler: _KeyManagementService_ListImportJobs_Handler, + }, + { + MethodName: "GetKeyRing", + Handler: _KeyManagementService_GetKeyRing_Handler, + }, + { + MethodName: "GetCryptoKey", + Handler: _KeyManagementService_GetCryptoKey_Handler, + }, + { + MethodName: "GetCryptoKeyVersion", + Handler: _KeyManagementService_GetCryptoKeyVersion_Handler, + }, + { + MethodName: "GetPublicKey", + Handler: _KeyManagementService_GetPublicKey_Handler, + }, + { + MethodName: "GetImportJob", + Handler: _KeyManagementService_GetImportJob_Handler, + }, + { + MethodName: "CreateKeyRing", + Handler: _KeyManagementService_CreateKeyRing_Handler, + }, + { + MethodName: "CreateCryptoKey", + Handler: _KeyManagementService_CreateCryptoKey_Handler, + }, + { + MethodName: "CreateCryptoKeyVersion", + Handler: _KeyManagementService_CreateCryptoKeyVersion_Handler, + }, + { + MethodName: "ImportCryptoKeyVersion", + Handler: _KeyManagementService_ImportCryptoKeyVersion_Handler, + }, + { + MethodName: "CreateImportJob", + Handler: _KeyManagementService_CreateImportJob_Handler, + }, + { + MethodName: "UpdateCryptoKey", + Handler: _KeyManagementService_UpdateCryptoKey_Handler, + }, + { + MethodName: "UpdateCryptoKeyVersion", + Handler: _KeyManagementService_UpdateCryptoKeyVersion_Handler, + }, + { + MethodName: "UpdateCryptoKeyPrimaryVersion", + Handler: _KeyManagementService_UpdateCryptoKeyPrimaryVersion_Handler, + }, + { + MethodName: "DestroyCryptoKeyVersion", + Handler: _KeyManagementService_DestroyCryptoKeyVersion_Handler, + }, + { + MethodName: "RestoreCryptoKeyVersion", + Handler: _KeyManagementService_RestoreCryptoKeyVersion_Handler, + }, + { + MethodName: "Encrypt", + Handler: _KeyManagementService_Encrypt_Handler, + }, + { + MethodName: "Decrypt", + Handler: _KeyManagementService_Decrypt_Handler, + }, + { + MethodName: "RawEncrypt", + Handler: _KeyManagementService_RawEncrypt_Handler, + }, + { + MethodName: "RawDecrypt", + Handler: _KeyManagementService_RawDecrypt_Handler, + }, + { + MethodName: "AsymmetricSign", + Handler: _KeyManagementService_AsymmetricSign_Handler, + }, + { + MethodName: "AsymmetricDecrypt", + Handler: _KeyManagementService_AsymmetricDecrypt_Handler, + }, + { + MethodName: "MacSign", + Handler: _KeyManagementService_MacSign_Handler, + }, + { + MethodName: "MacVerify", + Handler: _KeyManagementService_MacVerify_Handler, + }, + { + MethodName: "Decapsulate", + Handler: _KeyManagementService_Decapsulate_Handler, + }, + { + MethodName: "GenerateRandomBytes", + Handler: _KeyManagementService_GenerateRandomBytes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/kms/v1/service.proto", +} diff --git a/vendor/cloud.google.com/go/kms/internal/version.go b/vendor/cloud.google.com/go/kms/internal/version.go index eddfee04b0..4db2871b8e 100644 --- a/vendor/cloud.google.com/go/kms/internal/version.go +++ b/vendor/cloud.google.com/go/kms/internal/version.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Code generated by gapicgen. DO NOT EDIT. + package internal // Version is the current tagged release of the library. -const Version = "1.22.0" +const Version = "1.25.0" diff --git a/vendor/cloud.google.com/go/longrunning/CHANGES.md b/vendor/cloud.google.com/go/longrunning/CHANGES.md index ca0d28f167..8f4b6459c5 100644 --- a/vendor/cloud.google.com/go/longrunning/CHANGES.md +++ b/vendor/cloud.google.com/go/longrunning/CHANGES.md @@ -1,5 +1,18 @@ # Changes +## [0.8.0](https://github.com/googleapis/google-cloud-go/releases/tag/longrunning%2Fv0.8.0) (2026-01-08) + +### Bug Fixes + +* upgrade gRPC service registration func An update to Go gRPC Protobuf generation will change service registration function signatures to use an interface instead of a concrete type in generated .pb.go service files. This change should affect very few client library users. See release notes advisories in https://github.com/googleapis/google-cloud-go/pull/11025. ([185951b](https://github.com/googleapis/google-cloud-go/commit/185951b3bea9fb942979e81ce248ccdebb40d94b)) + +## [0.7.0](https://github.com/googleapis/google-cloud-go/releases/tag/longrunning%2Fv0.7.0) (2025-10-14) + +### Features + +* add ListOperations partial success flag +* add ListOperations unreachable resources + ## [0.6.7](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.6...longrunning/v0.6.7) (2025-04-15) @@ -180,3 +193,4 @@ ## v0.1.0 Initial release. + diff --git a/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json b/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json new file mode 100644 index 0000000000..23ee6e63f7 --- /dev/null +++ b/vendor/cloud.google.com/go/longrunning/autogen/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "longrunning", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/longrunning/latest/autogen", + "client_library_type": "generated", + "description": "Long Running Operations API", + "distribution_name": "cloud.google.com/go/longrunning/autogen", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "stable" +} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/helpers.go b/vendor/cloud.google.com/go/longrunning/autogen/helpers.go index 4ff8ce8b5e..e81363c9da 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/helpers.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/helpers.go @@ -18,6 +18,7 @@ package longrunning import ( "context" + "fmt" "io" "log/slog" "net/http" @@ -28,10 +29,13 @@ import ( "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" ) const serviceName = "longrunning.googleapis.com" +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go index d1a53c6792..cc84c0f14c 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go @@ -15,21 +15,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/longrunning/operations.proto package longrunningpb import ( - context "context" reflect "reflect" sync "sync" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" @@ -237,6 +233,17 @@ type ListOperationsRequest struct { PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // The standard list page token. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // When set to `true`, operations that are reachable are returned as normal, + // and those that are unreachable are returned in the + // [ListOperationsResponse.unreachable] field. + // + // This can only be `true` when reading across collections e.g. when `parent` + // is set to `"projects/example/locations/-"`. + // + // This field is not by default supported and will result in an + // `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + // service or product specific documentation. + ReturnPartialSuccess bool `protobuf:"varint,5,opt,name=return_partial_success,json=returnPartialSuccess,proto3" json:"return_partial_success,omitempty"` } func (x *ListOperationsRequest) Reset() { @@ -297,6 +304,13 @@ func (x *ListOperationsRequest) GetPageToken() string { return "" } +func (x *ListOperationsRequest) GetReturnPartialSuccess() bool { + if x != nil { + return x.ReturnPartialSuccess + } + return false +} + // The response message for // [Operations.ListOperations][google.longrunning.Operations.ListOperations]. type ListOperationsResponse struct { @@ -308,6 +322,11 @@ type ListOperationsResponse struct { Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` // The standard List next-page token. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Unordered list. Unreachable resources. Populated when the request sets + // `ListOperationsRequest.return_partial_success` and reads across + // collections e.g. when attempting to list all resources across all supported + // locations. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` } func (x *ListOperationsResponse) Reset() { @@ -354,6 +373,13 @@ func (x *ListOperationsResponse) GetNextPageToken() string { return "" } +func (x *ListOperationsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + // The request message for // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. type CancelOperationRequest struct { @@ -621,48 +647,56 @@ var file_google_longrunning_operations_proto_rawDesc = []byte{ 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, - 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x7f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x7f, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x4c, 0x69, + 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x25, 0x0a, 0x0b, 0x75, + 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x06, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, @@ -729,18 +763,17 @@ var file_google_longrunning_operations_proto_rawDesc = []byte{ 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0xa5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x66, 0x6f, 0x42, 0xa2, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x62, 0x3b, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x05, 0x47, 0x4c, 0x52, 0x55, 0x4e, - 0xaa, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x4c, - 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x6e, 0x67, 0x70, 0x62, 0xa2, 0x02, 0x05, 0x47, 0x4c, 0x52, 0x55, 0x4e, 0xaa, 0x02, 0x12, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0xca, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x4c, 0x6f, 0x6e, 0x67, + 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -825,285 +858,3 @@ func file_google_longrunning_operations_proto_init() { file_google_longrunning_operations_proto_goTypes = nil file_google_longrunning_operations_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// OperationsClient is the client API for Operations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type OperationsClient interface { - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - // `Code.CANCELLED`. - CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) -} - -type operationsClient struct { - cc grpc.ClientConnInterface -} - -func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient { - return &operationsClient{cc} -} - -func (c *operationsClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { - out := new(ListOperationsResponse) - err := c.cc.Invoke(ctx, "/google.longrunning.Operations/ListOperations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, "/google.longrunning.Operations/GetOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.longrunning.Operations/DeleteOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.longrunning.Operations/CancelOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *operationsClient) WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) { - out := new(Operation) - err := c.cc.Invoke(ctx, "/google.longrunning.Operations/WaitOperation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OperationsServer is the server API for Operations service. -type OperationsServer interface { - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - GetOperation(context.Context, *GetOperationRequest) (*Operation, error) - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - // `Code.CANCELLED`. - CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) -} - -// UnimplementedOperationsServer can be embedded to have forward compatible implementations. -type UnimplementedOperationsServer struct { -} - -func (*UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListOperations not implemented") -} -func (*UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetOperation not implemented") -} -func (*UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteOperation not implemented") -} -func (*UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CancelOperation not implemented") -} -func (*UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) { - return nil, status1.Errorf(codes.Unimplemented, "method WaitOperation not implemented") -} - -func RegisterOperationsServer(s *grpc.Server, srv OperationsServer) { - s.RegisterService(&_Operations_serviceDesc, srv) -} - -func _Operations_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListOperationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).ListOperations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.longrunning.Operations/ListOperations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).ListOperations(ctx, req.(*ListOperationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).GetOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.longrunning.Operations/GetOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).GetOperation(ctx, req.(*GetOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_DeleteOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).DeleteOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.longrunning.Operations/DeleteOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).DeleteOperation(ctx, req.(*DeleteOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).CancelOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.longrunning.Operations/CancelOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).CancelOperation(ctx, req.(*CancelOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Operations_WaitOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WaitOperationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OperationsServer).WaitOperation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.longrunning.Operations/WaitOperation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperationsServer).WaitOperation(ctx, req.(*WaitOperationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Operations_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.longrunning.Operations", - HandlerType: (*OperationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListOperations", - Handler: _Operations_ListOperations_Handler, - }, - { - MethodName: "GetOperation", - Handler: _Operations_GetOperation_Handler, - }, - { - MethodName: "DeleteOperation", - Handler: _Operations_DeleteOperation_Handler, - }, - { - MethodName: "CancelOperation", - Handler: _Operations_CancelOperation_Handler, - }, - { - MethodName: "WaitOperation", - Handler: _Operations_WaitOperation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/longrunning/operations.proto", -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go new file mode 100644 index 0000000000..2b6407e49b --- /dev/null +++ b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations_grpc.pb.go @@ -0,0 +1,329 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/longrunning/operations.proto + +package longrunningpb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Operations_ListOperations_FullMethodName = "/google.longrunning.Operations/ListOperations" + Operations_GetOperation_FullMethodName = "/google.longrunning.Operations/GetOperation" + Operations_DeleteOperation_FullMethodName = "/google.longrunning.Operations/DeleteOperation" + Operations_CancelOperation_FullMethodName = "/google.longrunning.Operations/CancelOperation" + Operations_WaitOperation_FullMethodName = "/google.longrunning.Operations/WaitOperation" +) + +// OperationsClient is the client API for Operations service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OperationsClient interface { + // Lists operations that match the specified filter in the request. If the + // server doesn't support this method, it returns `UNIMPLEMENTED`. + ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) + // Gets the latest state of a long-running operation. Clients can use this + // method to poll the operation result at intervals as recommended by the API + // service. + GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) + // Deletes a long-running operation. This method indicates that the client is + // no longer interested in the operation result. It does not cancel the + // operation. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not + // guaranteed. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to + // `Code.CANCELLED`. + CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Waits until the specified long-running operation is done or reaches at most + // a specified timeout, returning the latest state. If the operation is + // already done, the latest state is immediately returned. If the timeout + // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + // timeout is used. If the server does not support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + // Note that this method is on a best-effort basis. It may return the latest + // state before the specified timeout (including immediately), meaning even an + // immediate response is no guarantee that the operation is done. + WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) +} + +type operationsClient struct { + cc grpc.ClientConnInterface +} + +func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient { + return &operationsClient{cc} +} + +func (c *operationsClient) ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) { + out := new(ListOperationsResponse) + err := c.cc.Invoke(ctx, Operations_ListOperations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, Operations_GetOperation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Operations_DeleteOperation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Operations_CancelOperation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *operationsClient) WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error) { + out := new(Operation) + err := c.cc.Invoke(ctx, Operations_WaitOperation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OperationsServer is the server API for Operations service. +// All implementations should embed UnimplementedOperationsServer +// for forward compatibility +type OperationsServer interface { + // Lists operations that match the specified filter in the request. If the + // server doesn't support this method, it returns `UNIMPLEMENTED`. + ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) + // Gets the latest state of a long-running operation. Clients can use this + // method to poll the operation result at intervals as recommended by the API + // service. + GetOperation(context.Context, *GetOperationRequest) (*Operation, error) + // Deletes a long-running operation. This method indicates that the client is + // no longer interested in the operation result. It does not cancel the + // operation. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) + // Starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not + // guaranteed. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to + // `Code.CANCELLED`. + CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) + // Waits until the specified long-running operation is done or reaches at most + // a specified timeout, returning the latest state. If the operation is + // already done, the latest state is immediately returned. If the timeout + // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + // timeout is used. If the server does not support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + // Note that this method is on a best-effort basis. It may return the latest + // state before the specified timeout (including immediately), meaning even an + // immediate response is no guarantee that the operation is done. + WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) +} + +// UnimplementedOperationsServer should be embedded to have forward compatible implementations. +type UnimplementedOperationsServer struct { +} + +func (UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListOperations not implemented") +} +func (UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperation not implemented") +} +func (UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOperation not implemented") +} +func (UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelOperation not implemented") +} +func (UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method WaitOperation not implemented") +} + +// UnsafeOperationsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OperationsServer will +// result in compilation errors. +type UnsafeOperationsServer interface { + mustEmbedUnimplementedOperationsServer() +} + +func RegisterOperationsServer(s grpc.ServiceRegistrar, srv OperationsServer) { + s.RegisterService(&Operations_ServiceDesc, srv) +} + +func _Operations_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).ListOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Operations_ListOperations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).ListOperations(ctx, req.(*ListOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_GetOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).GetOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Operations_GetOperation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).GetOperation(ctx, req.(*GetOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_DeleteOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).DeleteOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Operations_DeleteOperation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).DeleteOperation(ctx, req.(*DeleteOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).CancelOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Operations_CancelOperation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).CancelOperation(ctx, req.(*CancelOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Operations_WaitOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WaitOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OperationsServer).WaitOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Operations_WaitOperation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OperationsServer).WaitOperation(ctx, req.(*WaitOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Operations_ServiceDesc is the grpc.ServiceDesc for Operations service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Operations_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.longrunning.Operations", + HandlerType: (*OperationsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListOperations", + Handler: _Operations_ListOperations_Handler, + }, + { + MethodName: "GetOperation", + Handler: _Operations_GetOperation_Handler, + }, + { + MethodName: "DeleteOperation", + Handler: _Operations_DeleteOperation_Handler, + }, + { + MethodName: "CancelOperation", + Handler: _Operations_CancelOperation_Handler, + }, + { + MethodName: "WaitOperation", + Handler: _Operations_WaitOperation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/longrunning/operations.proto", +} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go index 57c8173e92..c445784895 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go @@ -346,7 +346,7 @@ func (c *operationsGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *operationsGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -422,7 +422,7 @@ func defaultOperationsRESTClientOptions() []option.ClientOption { // use by Google-written clients. func (c *operationsRESTClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } @@ -581,6 +581,9 @@ func (c *operationsRESTClient) ListOperations(ctx context.Context, req *longrunn if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } + if req.GetReturnPartialSuccess() { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } baseUrl.RawQuery = params.Encode() diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/alert_policy_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/alert_policy_client.go index 9a9408f19b..cc8c69c240 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/alert_policy_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/alert_policy_client.go @@ -276,7 +276,7 @@ func (c *alertPolicyGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *alertPolicyGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/group_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/group_client.go index a45e1aec27..7a9e076093 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/group_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/group_client.go @@ -297,7 +297,7 @@ func (c *groupGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *groupGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/helpers.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/helpers.go index 6719cac863..b97da685e9 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/helpers.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/helpers.go @@ -18,16 +18,20 @@ package monitoring import ( "context" + "fmt" "log/slog" "github.com/googleapis/gax-go/v2/internallog/grpclog" "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" ) const serviceName = "monitoring.googleapis.com" +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + // For more information on implementing a client constructor hook, see // https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. type clientHookParams struct{} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/metric_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/metric_client.go index 29eb4849d2..2ed8ccc133 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/metric_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/metric_client.go @@ -335,7 +335,7 @@ func (c *metricGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *metricGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert.pb.go index 24ca1414bb..f735f03253 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert.pb.go @@ -15,15 +15,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/alert.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" timeofday "google.golang.org/genproto/googleapis/type/timeofday" @@ -31,6 +28,8 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go index ba0c4f65f2..5edc4a06df 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service.pb.go @@ -15,24 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/alert_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" ) const ( @@ -695,267 +690,3 @@ func file_google_monitoring_v3_alert_service_proto_init() { file_google_monitoring_v3_alert_service_proto_goTypes = nil file_google_monitoring_v3_alert_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AlertPolicyServiceClient is the client API for AlertPolicyService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AlertPolicyServiceClient interface { - // Lists the existing alerting policies for the workspace. - ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error) - // Gets a single alerting policy. - GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) - // Creates a new alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) - // Deletes an alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Updates an alerting policy. You can either replace the entire policy with - // a new one or replace only certain fields in the current alerting policy by - // specifying the fields to be updated via `updateMask`. Returns the - // updated alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) -} - -type alertPolicyServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAlertPolicyServiceClient(cc grpc.ClientConnInterface) AlertPolicyServiceClient { - return &alertPolicyServiceClient{cc} -} - -func (c *alertPolicyServiceClient) ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error) { - out := new(ListAlertPoliciesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/ListAlertPolicies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *alertPolicyServiceClient) GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { - out := new(AlertPolicy) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/GetAlertPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *alertPolicyServiceClient) CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { - out := new(AlertPolicy) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *alertPolicyServiceClient) DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *alertPolicyServiceClient) UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { - out := new(AlertPolicy) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AlertPolicyServiceServer is the server API for AlertPolicyService service. -type AlertPolicyServiceServer interface { - // Lists the existing alerting policies for the workspace. - ListAlertPolicies(context.Context, *ListAlertPoliciesRequest) (*ListAlertPoliciesResponse, error) - // Gets a single alerting policy. - GetAlertPolicy(context.Context, *GetAlertPolicyRequest) (*AlertPolicy, error) - // Creates a new alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - CreateAlertPolicy(context.Context, *CreateAlertPolicyRequest) (*AlertPolicy, error) - // Deletes an alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - DeleteAlertPolicy(context.Context, *DeleteAlertPolicyRequest) (*emptypb.Empty, error) - // Updates an alerting policy. You can either replace the entire policy with - // a new one or replace only certain fields in the current alerting policy by - // specifying the fields to be updated via `updateMask`. Returns the - // updated alerting policy. - // - // Design your application to single-thread API calls that modify the state of - // alerting policies in a single project. This includes calls to - // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - UpdateAlertPolicy(context.Context, *UpdateAlertPolicyRequest) (*AlertPolicy, error) -} - -// UnimplementedAlertPolicyServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAlertPolicyServiceServer struct { -} - -func (*UnimplementedAlertPolicyServiceServer) ListAlertPolicies(context.Context, *ListAlertPoliciesRequest) (*ListAlertPoliciesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAlertPolicies not implemented") -} -func (*UnimplementedAlertPolicyServiceServer) GetAlertPolicy(context.Context, *GetAlertPolicyRequest) (*AlertPolicy, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAlertPolicy not implemented") -} -func (*UnimplementedAlertPolicyServiceServer) CreateAlertPolicy(context.Context, *CreateAlertPolicyRequest) (*AlertPolicy, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAlertPolicy not implemented") -} -func (*UnimplementedAlertPolicyServiceServer) DeleteAlertPolicy(context.Context, *DeleteAlertPolicyRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAlertPolicy not implemented") -} -func (*UnimplementedAlertPolicyServiceServer) UpdateAlertPolicy(context.Context, *UpdateAlertPolicyRequest) (*AlertPolicy, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAlertPolicy not implemented") -} - -func RegisterAlertPolicyServiceServer(s *grpc.Server, srv AlertPolicyServiceServer) { - s.RegisterService(&_AlertPolicyService_serviceDesc, srv) -} - -func _AlertPolicyService_ListAlertPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAlertPoliciesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.AlertPolicyService/ListAlertPolicies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, req.(*ListAlertPoliciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AlertPolicyService_GetAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAlertPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.AlertPolicyService/GetAlertPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, req.(*GetAlertPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AlertPolicyService_CreateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAlertPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, req.(*CreateAlertPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AlertPolicyService_DeleteAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAlertPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, req.(*DeleteAlertPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AlertPolicyService_UpdateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAlertPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, req.(*UpdateAlertPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AlertPolicyService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.AlertPolicyService", - HandlerType: (*AlertPolicyServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListAlertPolicies", - Handler: _AlertPolicyService_ListAlertPolicies_Handler, - }, - { - MethodName: "GetAlertPolicy", - Handler: _AlertPolicyService_GetAlertPolicy_Handler, - }, - { - MethodName: "CreateAlertPolicy", - Handler: _AlertPolicyService_CreateAlertPolicy_Handler, - }, - { - MethodName: "DeleteAlertPolicy", - Handler: _AlertPolicyService_DeleteAlertPolicy_Handler, - }, - { - MethodName: "UpdateAlertPolicy", - Handler: _AlertPolicyService_UpdateAlertPolicy_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/alert_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service_grpc.pb.go new file mode 100644 index 0000000000..ff3412fb4c --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/alert_service_grpc.pb.go @@ -0,0 +1,310 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/alert_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + AlertPolicyService_ListAlertPolicies_FullMethodName = "/google.monitoring.v3.AlertPolicyService/ListAlertPolicies" + AlertPolicyService_GetAlertPolicy_FullMethodName = "/google.monitoring.v3.AlertPolicyService/GetAlertPolicy" + AlertPolicyService_CreateAlertPolicy_FullMethodName = "/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy" + AlertPolicyService_DeleteAlertPolicy_FullMethodName = "/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy" + AlertPolicyService_UpdateAlertPolicy_FullMethodName = "/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy" +) + +// AlertPolicyServiceClient is the client API for AlertPolicyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AlertPolicyServiceClient interface { + // Lists the existing alerting policies for the workspace. + ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error) + // Gets a single alerting policy. + GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) + // Creates a new alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) + // Deletes an alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates an alerting policy. You can either replace the entire policy with + // a new one or replace only certain fields in the current alerting policy by + // specifying the fields to be updated via `updateMask`. Returns the + // updated alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) +} + +type alertPolicyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAlertPolicyServiceClient(cc grpc.ClientConnInterface) AlertPolicyServiceClient { + return &alertPolicyServiceClient{cc} +} + +func (c *alertPolicyServiceClient) ListAlertPolicies(ctx context.Context, in *ListAlertPoliciesRequest, opts ...grpc.CallOption) (*ListAlertPoliciesResponse, error) { + out := new(ListAlertPoliciesResponse) + err := c.cc.Invoke(ctx, AlertPolicyService_ListAlertPolicies_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertPolicyServiceClient) GetAlertPolicy(ctx context.Context, in *GetAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { + out := new(AlertPolicy) + err := c.cc.Invoke(ctx, AlertPolicyService_GetAlertPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertPolicyServiceClient) CreateAlertPolicy(ctx context.Context, in *CreateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { + out := new(AlertPolicy) + err := c.cc.Invoke(ctx, AlertPolicyService_CreateAlertPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertPolicyServiceClient) DeleteAlertPolicy(ctx context.Context, in *DeleteAlertPolicyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AlertPolicyService_DeleteAlertPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alertPolicyServiceClient) UpdateAlertPolicy(ctx context.Context, in *UpdateAlertPolicyRequest, opts ...grpc.CallOption) (*AlertPolicy, error) { + out := new(AlertPolicy) + err := c.cc.Invoke(ctx, AlertPolicyService_UpdateAlertPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AlertPolicyServiceServer is the server API for AlertPolicyService service. +// All implementations should embed UnimplementedAlertPolicyServiceServer +// for forward compatibility +type AlertPolicyServiceServer interface { + // Lists the existing alerting policies for the workspace. + ListAlertPolicies(context.Context, *ListAlertPoliciesRequest) (*ListAlertPoliciesResponse, error) + // Gets a single alerting policy. + GetAlertPolicy(context.Context, *GetAlertPolicyRequest) (*AlertPolicy, error) + // Creates a new alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + CreateAlertPolicy(context.Context, *CreateAlertPolicyRequest) (*AlertPolicy, error) + // Deletes an alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + DeleteAlertPolicy(context.Context, *DeleteAlertPolicyRequest) (*emptypb.Empty, error) + // Updates an alerting policy. You can either replace the entire policy with + // a new one or replace only certain fields in the current alerting policy by + // specifying the fields to be updated via `updateMask`. Returns the + // updated alerting policy. + // + // Design your application to single-thread API calls that modify the state of + // alerting policies in a single project. This includes calls to + // CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + UpdateAlertPolicy(context.Context, *UpdateAlertPolicyRequest) (*AlertPolicy, error) +} + +// UnimplementedAlertPolicyServiceServer should be embedded to have forward compatible implementations. +type UnimplementedAlertPolicyServiceServer struct { +} + +func (UnimplementedAlertPolicyServiceServer) ListAlertPolicies(context.Context, *ListAlertPoliciesRequest) (*ListAlertPoliciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAlertPolicies not implemented") +} +func (UnimplementedAlertPolicyServiceServer) GetAlertPolicy(context.Context, *GetAlertPolicyRequest) (*AlertPolicy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAlertPolicy not implemented") +} +func (UnimplementedAlertPolicyServiceServer) CreateAlertPolicy(context.Context, *CreateAlertPolicyRequest) (*AlertPolicy, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAlertPolicy not implemented") +} +func (UnimplementedAlertPolicyServiceServer) DeleteAlertPolicy(context.Context, *DeleteAlertPolicyRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAlertPolicy not implemented") +} +func (UnimplementedAlertPolicyServiceServer) UpdateAlertPolicy(context.Context, *UpdateAlertPolicyRequest) (*AlertPolicy, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAlertPolicy not implemented") +} + +// UnsafeAlertPolicyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AlertPolicyServiceServer will +// result in compilation errors. +type UnsafeAlertPolicyServiceServer interface { + mustEmbedUnimplementedAlertPolicyServiceServer() +} + +func RegisterAlertPolicyServiceServer(s grpc.ServiceRegistrar, srv AlertPolicyServiceServer) { + s.RegisterService(&AlertPolicyService_ServiceDesc, srv) +} + +func _AlertPolicyService_ListAlertPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAlertPoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertPolicyService_ListAlertPolicies_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertPolicyServiceServer).ListAlertPolicies(ctx, req.(*ListAlertPoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertPolicyService_GetAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAlertPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertPolicyService_GetAlertPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertPolicyServiceServer).GetAlertPolicy(ctx, req.(*GetAlertPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertPolicyService_CreateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAlertPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertPolicyService_CreateAlertPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertPolicyServiceServer).CreateAlertPolicy(ctx, req.(*CreateAlertPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertPolicyService_DeleteAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAlertPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertPolicyService_DeleteAlertPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertPolicyServiceServer).DeleteAlertPolicy(ctx, req.(*DeleteAlertPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AlertPolicyService_UpdateAlertPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAlertPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AlertPolicyService_UpdateAlertPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlertPolicyServiceServer).UpdateAlertPolicy(ctx, req.(*UpdateAlertPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AlertPolicyService_ServiceDesc is the grpc.ServiceDesc for AlertPolicyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AlertPolicyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.AlertPolicyService", + HandlerType: (*AlertPolicyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListAlertPolicies", + Handler: _AlertPolicyService_ListAlertPolicies_Handler, + }, + { + MethodName: "GetAlertPolicy", + Handler: _AlertPolicyService_GetAlertPolicy_Handler, + }, + { + MethodName: "CreateAlertPolicy", + Handler: _AlertPolicyService_CreateAlertPolicy_Handler, + }, + { + MethodName: "DeleteAlertPolicy", + Handler: _AlertPolicyService_DeleteAlertPolicy_Handler, + }, + { + MethodName: "UpdateAlertPolicy", + Handler: _AlertPolicyService_UpdateAlertPolicy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/alert_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/common.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/common.pb.go index 81b8c8f5e4..d6d2047b67 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/common.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/common.pb.go @@ -15,20 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/common.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - distribution "google.golang.org/genproto/googleapis/api/distribution" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go index 0c3ac5a1c8..b9161423cb 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/dropped_labels.pb.go @@ -15,17 +15,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/dropped_labels.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group.pb.go index c35046ac71..6cb42d2922 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group.pb.go @@ -15,18 +15,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/group.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service.pb.go index fbdf9ef54f..a0552019c2 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service.pb.go @@ -15,24 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/group_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" ) const ( @@ -929,277 +924,3 @@ func file_google_monitoring_v3_group_service_proto_init() { file_google_monitoring_v3_group_service_proto_goTypes = nil file_google_monitoring_v3_group_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// GroupServiceClient is the client API for GroupService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GroupServiceClient interface { - // Lists the existing groups. - ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) - // Gets a single group. - GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) - // Creates a new group. - CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error) - // Updates an existing group. - // You can change any group attributes except `name`. - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error) - // Deletes an existing group. - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists the monitored resources that are members of a group. - ListGroupMembers(ctx context.Context, in *ListGroupMembersRequest, opts ...grpc.CallOption) (*ListGroupMembersResponse, error) -} - -type groupServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { - return &groupServiceClient{cc} -} - -func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { - out := new(ListGroupsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/ListGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/GetGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/CreateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error) { - out := new(Group) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/UpdateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/DeleteGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupServiceClient) ListGroupMembers(ctx context.Context, in *ListGroupMembersRequest, opts ...grpc.CallOption) (*ListGroupMembersResponse, error) { - out := new(ListGroupMembersResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.GroupService/ListGroupMembers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GroupServiceServer is the server API for GroupService service. -type GroupServiceServer interface { - // Lists the existing groups. - ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) - // Gets a single group. - GetGroup(context.Context, *GetGroupRequest) (*Group, error) - // Creates a new group. - CreateGroup(context.Context, *CreateGroupRequest) (*Group, error) - // Updates an existing group. - // You can change any group attributes except `name`. - UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error) - // Deletes an existing group. - DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error) - // Lists the monitored resources that are members of a group. - ListGroupMembers(context.Context, *ListGroupMembersRequest) (*ListGroupMembersResponse, error) -} - -// UnimplementedGroupServiceServer can be embedded to have forward compatible implementations. -type UnimplementedGroupServiceServer struct { -} - -func (*UnimplementedGroupServiceServer) ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListGroups not implemented") -} -func (*UnimplementedGroupServiceServer) GetGroup(context.Context, *GetGroupRequest) (*Group, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") -} -func (*UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroupRequest) (*Group, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") -} -func (*UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") -} -func (*UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") -} -func (*UnimplementedGroupServiceServer) ListGroupMembers(context.Context, *ListGroupMembersRequest) (*ListGroupMembersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListGroupMembers not implemented") -} - -func RegisterGroupServiceServer(s *grpc.Server, srv GroupServiceServer) { - s.RegisterService(&_GroupService_serviceDesc, srv) -} - -func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).ListGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/ListGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).GetGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/GetGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).CreateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/CreateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).UpdateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/UpdateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).DeleteGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/DeleteGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _GroupService_ListGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListGroupMembersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServiceServer).ListGroupMembers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.GroupService/ListGroupMembers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServiceServer).ListGroupMembers(ctx, req.(*ListGroupMembersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _GroupService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.GroupService", - HandlerType: (*GroupServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListGroups", - Handler: _GroupService_ListGroups_Handler, - }, - { - MethodName: "GetGroup", - Handler: _GroupService_GetGroup_Handler, - }, - { - MethodName: "CreateGroup", - Handler: _GroupService_CreateGroup_Handler, - }, - { - MethodName: "UpdateGroup", - Handler: _GroupService_UpdateGroup_Handler, - }, - { - MethodName: "DeleteGroup", - Handler: _GroupService_DeleteGroup_Handler, - }, - { - MethodName: "ListGroupMembers", - Handler: _GroupService_ListGroupMembers_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/group_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service_grpc.pb.go new file mode 100644 index 0000000000..2828587eae --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/group_service_grpc.pb.go @@ -0,0 +1,321 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/group_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + GroupService_ListGroups_FullMethodName = "/google.monitoring.v3.GroupService/ListGroups" + GroupService_GetGroup_FullMethodName = "/google.monitoring.v3.GroupService/GetGroup" + GroupService_CreateGroup_FullMethodName = "/google.monitoring.v3.GroupService/CreateGroup" + GroupService_UpdateGroup_FullMethodName = "/google.monitoring.v3.GroupService/UpdateGroup" + GroupService_DeleteGroup_FullMethodName = "/google.monitoring.v3.GroupService/DeleteGroup" + GroupService_ListGroupMembers_FullMethodName = "/google.monitoring.v3.GroupService/ListGroupMembers" +) + +// GroupServiceClient is the client API for GroupService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GroupServiceClient interface { + // Lists the existing groups. + ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) + // Gets a single group. + GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) + // Creates a new group. + CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error) + // Updates an existing group. + // You can change any group attributes except `name`. + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error) + // Deletes an existing group. + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists the monitored resources that are members of a group. + ListGroupMembers(ctx context.Context, in *ListGroupMembersRequest, opts ...grpc.CallOption) (*ListGroupMembersResponse, error) +} + +type groupServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGroupServiceClient(cc grpc.ClientConnInterface) GroupServiceClient { + return &groupServiceClient{cc} +} + +func (c *groupServiceClient) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { + out := new(ListGroupsResponse) + err := c.cc.Invoke(ctx, GroupService_ListGroups_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...grpc.CallOption) (*Group, error) { + out := new(Group) + err := c.cc.Invoke(ctx, GroupService_GetGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Group, error) { + out := new(Group) + err := c.cc.Invoke(ctx, GroupService_CreateGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Group, error) { + out := new(Group) + err := c.cc.Invoke(ctx, GroupService_UpdateGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, GroupService_DeleteGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupServiceClient) ListGroupMembers(ctx context.Context, in *ListGroupMembersRequest, opts ...grpc.CallOption) (*ListGroupMembersResponse, error) { + out := new(ListGroupMembersResponse) + err := c.cc.Invoke(ctx, GroupService_ListGroupMembers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GroupServiceServer is the server API for GroupService service. +// All implementations should embed UnimplementedGroupServiceServer +// for forward compatibility +type GroupServiceServer interface { + // Lists the existing groups. + ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) + // Gets a single group. + GetGroup(context.Context, *GetGroupRequest) (*Group, error) + // Creates a new group. + CreateGroup(context.Context, *CreateGroupRequest) (*Group, error) + // Updates an existing group. + // You can change any group attributes except `name`. + UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error) + // Deletes an existing group. + DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error) + // Lists the monitored resources that are members of a group. + ListGroupMembers(context.Context, *ListGroupMembersRequest) (*ListGroupMembersResponse, error) +} + +// UnimplementedGroupServiceServer should be embedded to have forward compatible implementations. +type UnimplementedGroupServiceServer struct { +} + +func (UnimplementedGroupServiceServer) ListGroups(context.Context, *ListGroupsRequest) (*ListGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGroups not implemented") +} +func (UnimplementedGroupServiceServer) GetGroup(context.Context, *GetGroupRequest) (*Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroup not implemented") +} +func (UnimplementedGroupServiceServer) CreateGroup(context.Context, *CreateGroupRequest) (*Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") +} +func (UnimplementedGroupServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*Group, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") +} +func (UnimplementedGroupServiceServer) DeleteGroup(context.Context, *DeleteGroupRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGroup not implemented") +} +func (UnimplementedGroupServiceServer) ListGroupMembers(context.Context, *ListGroupMembersRequest) (*ListGroupMembersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGroupMembers not implemented") +} + +// UnsafeGroupServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GroupServiceServer will +// result in compilation errors. +type UnsafeGroupServiceServer interface { + mustEmbedUnimplementedGroupServiceServer() +} + +func RegisterGroupServiceServer(s grpc.ServiceRegistrar, srv GroupServiceServer) { + s.RegisterService(&GroupService_ServiceDesc, srv) +} + +func _GroupService_ListGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).ListGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_ListGroups_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).ListGroups(ctx, req.(*ListGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_GetGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).GetGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_GetGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).GetGroup(ctx, req.(*GetGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).CreateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_CreateGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).CreateGroup(ctx, req.(*CreateGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).UpdateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_UpdateGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_DeleteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).DeleteGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_DeleteGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).DeleteGroup(ctx, req.(*DeleteGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GroupService_ListGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGroupMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServiceServer).ListGroupMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: GroupService_ListGroupMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServiceServer).ListGroupMembers(ctx, req.(*ListGroupMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GroupService_ServiceDesc is the grpc.ServiceDesc for GroupService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GroupService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.GroupService", + HandlerType: (*GroupServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListGroups", + Handler: _GroupService_ListGroups_Handler, + }, + { + MethodName: "GetGroup", + Handler: _GroupService_GetGroup_Handler, + }, + { + MethodName: "CreateGroup", + Handler: _GroupService_CreateGroup_Handler, + }, + { + MethodName: "UpdateGroup", + Handler: _GroupService_UpdateGroup_Handler, + }, + { + MethodName: "DeleteGroup", + Handler: _GroupService_DeleteGroup_Handler, + }, + { + MethodName: "ListGroupMembers", + Handler: _GroupService_ListGroupMembers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/group_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric.pb.go index ae7eea5b6f..7aefb0a5ec 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric.pb.go @@ -15,20 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/metric.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - label "google.golang.org/genproto/googleapis/api/label" metric "google.golang.org/genproto/googleapis/api/metric" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go index 39b9595241..d4067d8594 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service.pb.go @@ -15,26 +15,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/metric_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" metric "google.golang.org/genproto/googleapis/api/metric" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" ) const ( @@ -1863,431 +1858,3 @@ func file_google_monitoring_v3_metric_service_proto_init() { file_google_monitoring_v3_metric_service_proto_goTypes = nil file_google_monitoring_v3_metric_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MetricServiceClient is the client API for MetricService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricServiceClient interface { - // Lists monitored resource descriptors that match a filter. - ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) - // Gets a single monitored resource descriptor. - GetMonitoredResourceDescriptor(ctx context.Context, in *GetMonitoredResourceDescriptorRequest, opts ...grpc.CallOption) (*monitoredres.MonitoredResourceDescriptor, error) - // Lists metric descriptors that match a filter. - ListMetricDescriptors(ctx context.Context, in *ListMetricDescriptorsRequest, opts ...grpc.CallOption) (*ListMetricDescriptorsResponse, error) - // Gets a single metric descriptor. - GetMetricDescriptor(ctx context.Context, in *GetMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) - // Creates a new metric descriptor. - // The creation is executed asynchronously. - // User-created metric descriptors define - // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - // The metric descriptor is updated if it already exists, - // except that metric labels are never removed. - CreateMetricDescriptor(ctx context.Context, in *CreateMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) - // Deletes a metric descriptor. Only user-created - // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be - // deleted. - DeleteMetricDescriptor(ctx context.Context, in *DeleteMetricDescriptorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists time series that match a filter. - ListTimeSeries(ctx context.Context, in *ListTimeSeriesRequest, opts ...grpc.CallOption) (*ListTimeSeriesResponse, error) - // Creates or adds data to one or more time series. - // The response is empty if all time series in the request were written. - // If any time series could not be written, a corresponding failure message is - // included in the error response. - // This method does not support - // [resource locations constraint of an organization - // policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). - CreateTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Creates or adds data to one or more service time series. A service time - // series is a time series for a metric from a Google Cloud service. The - // response is empty if all time series in the request were written. If any - // time series could not be written, a corresponding failure message is - // included in the error response. This endpoint rejects writes to - // user-defined metrics. - // This method is only for use by Google Cloud services. Use - // [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] - // instead. - CreateServiceTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type metricServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewMetricServiceClient(cc grpc.ClientConnInterface) MetricServiceClient { - return &metricServiceClient{cc} -} - -func (c *metricServiceClient) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { - out := new(ListMonitoredResourceDescriptorsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) GetMonitoredResourceDescriptor(ctx context.Context, in *GetMonitoredResourceDescriptorRequest, opts ...grpc.CallOption) (*monitoredres.MonitoredResourceDescriptor, error) { - out := new(monitoredres.MonitoredResourceDescriptor) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) ListMetricDescriptors(ctx context.Context, in *ListMetricDescriptorsRequest, opts ...grpc.CallOption) (*ListMetricDescriptorsResponse, error) { - out := new(ListMetricDescriptorsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/ListMetricDescriptors", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) GetMetricDescriptor(ctx context.Context, in *GetMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) { - out := new(metric.MetricDescriptor) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/GetMetricDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) CreateMetricDescriptor(ctx context.Context, in *CreateMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) { - out := new(metric.MetricDescriptor) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/CreateMetricDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) DeleteMetricDescriptor(ctx context.Context, in *DeleteMetricDescriptorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/DeleteMetricDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) ListTimeSeries(ctx context.Context, in *ListTimeSeriesRequest, opts ...grpc.CallOption) (*ListTimeSeriesResponse, error) { - out := new(ListTimeSeriesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/ListTimeSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) CreateTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/CreateTimeSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metricServiceClient) CreateServiceTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.MetricService/CreateServiceTimeSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetricServiceServer is the server API for MetricService service. -type MetricServiceServer interface { - // Lists monitored resource descriptors that match a filter. - ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) - // Gets a single monitored resource descriptor. - GetMonitoredResourceDescriptor(context.Context, *GetMonitoredResourceDescriptorRequest) (*monitoredres.MonitoredResourceDescriptor, error) - // Lists metric descriptors that match a filter. - ListMetricDescriptors(context.Context, *ListMetricDescriptorsRequest) (*ListMetricDescriptorsResponse, error) - // Gets a single metric descriptor. - GetMetricDescriptor(context.Context, *GetMetricDescriptorRequest) (*metric.MetricDescriptor, error) - // Creates a new metric descriptor. - // The creation is executed asynchronously. - // User-created metric descriptors define - // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - // The metric descriptor is updated if it already exists, - // except that metric labels are never removed. - CreateMetricDescriptor(context.Context, *CreateMetricDescriptorRequest) (*metric.MetricDescriptor, error) - // Deletes a metric descriptor. Only user-created - // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be - // deleted. - DeleteMetricDescriptor(context.Context, *DeleteMetricDescriptorRequest) (*emptypb.Empty, error) - // Lists time series that match a filter. - ListTimeSeries(context.Context, *ListTimeSeriesRequest) (*ListTimeSeriesResponse, error) - // Creates or adds data to one or more time series. - // The response is empty if all time series in the request were written. - // If any time series could not be written, a corresponding failure message is - // included in the error response. - // This method does not support - // [resource locations constraint of an organization - // policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). - CreateTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) - // Creates or adds data to one or more service time series. A service time - // series is a time series for a metric from a Google Cloud service. The - // response is empty if all time series in the request were written. If any - // time series could not be written, a corresponding failure message is - // included in the error response. This endpoint rejects writes to - // user-defined metrics. - // This method is only for use by Google Cloud services. Use - // [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] - // instead. - CreateServiceTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) -} - -// UnimplementedMetricServiceServer can be embedded to have forward compatible implementations. -type UnimplementedMetricServiceServer struct { -} - -func (*UnimplementedMetricServiceServer) ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListMonitoredResourceDescriptors not implemented") -} -func (*UnimplementedMetricServiceServer) GetMonitoredResourceDescriptor(context.Context, *GetMonitoredResourceDescriptorRequest) (*monitoredres.MonitoredResourceDescriptor, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetMonitoredResourceDescriptor not implemented") -} -func (*UnimplementedMetricServiceServer) ListMetricDescriptors(context.Context, *ListMetricDescriptorsRequest) (*ListMetricDescriptorsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListMetricDescriptors not implemented") -} -func (*UnimplementedMetricServiceServer) GetMetricDescriptor(context.Context, *GetMetricDescriptorRequest) (*metric.MetricDescriptor, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetMetricDescriptor not implemented") -} -func (*UnimplementedMetricServiceServer) CreateMetricDescriptor(context.Context, *CreateMetricDescriptorRequest) (*metric.MetricDescriptor, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateMetricDescriptor not implemented") -} -func (*UnimplementedMetricServiceServer) DeleteMetricDescriptor(context.Context, *DeleteMetricDescriptorRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteMetricDescriptor not implemented") -} -func (*UnimplementedMetricServiceServer) ListTimeSeries(context.Context, *ListTimeSeriesRequest) (*ListTimeSeriesResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListTimeSeries not implemented") -} -func (*UnimplementedMetricServiceServer) CreateTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateTimeSeries not implemented") -} -func (*UnimplementedMetricServiceServer) CreateServiceTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateServiceTimeSeries not implemented") -} - -func RegisterMetricServiceServer(s *grpc.Server, srv MetricServiceServer) { - s.RegisterService(&_MetricService_serviceDesc, srv) -} - -func _MetricService_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMonitoredResourceDescriptorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).ListMonitoredResourceDescriptors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_GetMonitoredResourceDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMonitoredResourceDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).GetMonitoredResourceDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).GetMonitoredResourceDescriptor(ctx, req.(*GetMonitoredResourceDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_ListMetricDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMetricDescriptorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).ListMetricDescriptors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/ListMetricDescriptors", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).ListMetricDescriptors(ctx, req.(*ListMetricDescriptorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_GetMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMetricDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).GetMetricDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/GetMetricDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).GetMetricDescriptor(ctx, req.(*GetMetricDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_CreateMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateMetricDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).CreateMetricDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/CreateMetricDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).CreateMetricDescriptor(ctx, req.(*CreateMetricDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_DeleteMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMetricDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).DeleteMetricDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/DeleteMetricDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).DeleteMetricDescriptor(ctx, req.(*DeleteMetricDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_ListTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTimeSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).ListTimeSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/ListTimeSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).ListTimeSeries(ctx, req.(*ListTimeSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_CreateTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTimeSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).CreateTimeSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/CreateTimeSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).CreateTimeSeries(ctx, req.(*CreateTimeSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MetricService_CreateServiceTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTimeSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricServiceServer).CreateServiceTimeSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.MetricService/CreateServiceTimeSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricServiceServer).CreateServiceTimeSeries(ctx, req.(*CreateTimeSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MetricService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.MetricService", - HandlerType: (*MetricServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListMonitoredResourceDescriptors", - Handler: _MetricService_ListMonitoredResourceDescriptors_Handler, - }, - { - MethodName: "GetMonitoredResourceDescriptor", - Handler: _MetricService_GetMonitoredResourceDescriptor_Handler, - }, - { - MethodName: "ListMetricDescriptors", - Handler: _MetricService_ListMetricDescriptors_Handler, - }, - { - MethodName: "GetMetricDescriptor", - Handler: _MetricService_GetMetricDescriptor_Handler, - }, - { - MethodName: "CreateMetricDescriptor", - Handler: _MetricService_CreateMetricDescriptor_Handler, - }, - { - MethodName: "DeleteMetricDescriptor", - Handler: _MetricService_DeleteMetricDescriptor_Handler, - }, - { - MethodName: "ListTimeSeries", - Handler: _MetricService_ListTimeSeries_Handler, - }, - { - MethodName: "CreateTimeSeries", - Handler: _MetricService_CreateTimeSeries_Handler, - }, - { - MethodName: "CreateServiceTimeSeries", - Handler: _MetricService_CreateServiceTimeSeries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/metric_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service_grpc.pb.go new file mode 100644 index 0000000000..b4a5478cf6 --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/metric_service_grpc.pb.go @@ -0,0 +1,480 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/metric_service.proto + +package monitoringpb + +import ( + context "context" + metric "google.golang.org/genproto/googleapis/api/metric" + monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MetricService_ListMonitoredResourceDescriptors_FullMethodName = "/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors" + MetricService_GetMonitoredResourceDescriptor_FullMethodName = "/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor" + MetricService_ListMetricDescriptors_FullMethodName = "/google.monitoring.v3.MetricService/ListMetricDescriptors" + MetricService_GetMetricDescriptor_FullMethodName = "/google.monitoring.v3.MetricService/GetMetricDescriptor" + MetricService_CreateMetricDescriptor_FullMethodName = "/google.monitoring.v3.MetricService/CreateMetricDescriptor" + MetricService_DeleteMetricDescriptor_FullMethodName = "/google.monitoring.v3.MetricService/DeleteMetricDescriptor" + MetricService_ListTimeSeries_FullMethodName = "/google.monitoring.v3.MetricService/ListTimeSeries" + MetricService_CreateTimeSeries_FullMethodName = "/google.monitoring.v3.MetricService/CreateTimeSeries" + MetricService_CreateServiceTimeSeries_FullMethodName = "/google.monitoring.v3.MetricService/CreateServiceTimeSeries" +) + +// MetricServiceClient is the client API for MetricService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MetricServiceClient interface { + // Lists monitored resource descriptors that match a filter. + ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) + // Gets a single monitored resource descriptor. + GetMonitoredResourceDescriptor(ctx context.Context, in *GetMonitoredResourceDescriptorRequest, opts ...grpc.CallOption) (*monitoredres.MonitoredResourceDescriptor, error) + // Lists metric descriptors that match a filter. + ListMetricDescriptors(ctx context.Context, in *ListMetricDescriptorsRequest, opts ...grpc.CallOption) (*ListMetricDescriptorsResponse, error) + // Gets a single metric descriptor. + GetMetricDescriptor(ctx context.Context, in *GetMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) + // Creates a new metric descriptor. + // The creation is executed asynchronously. + // User-created metric descriptors define + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + // The metric descriptor is updated if it already exists, + // except that metric labels are never removed. + CreateMetricDescriptor(ctx context.Context, in *CreateMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) + // Deletes a metric descriptor. Only user-created + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + // deleted. + DeleteMetricDescriptor(ctx context.Context, in *DeleteMetricDescriptorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists time series that match a filter. + ListTimeSeries(ctx context.Context, in *ListTimeSeriesRequest, opts ...grpc.CallOption) (*ListTimeSeriesResponse, error) + // Creates or adds data to one or more time series. + // The response is empty if all time series in the request were written. + // If any time series could not be written, a corresponding failure message is + // included in the error response. + // This method does not support + // [resource locations constraint of an organization + // policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). + CreateTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates or adds data to one or more service time series. A service time + // series is a time series for a metric from a Google Cloud service. The + // response is empty if all time series in the request were written. If any + // time series could not be written, a corresponding failure message is + // included in the error response. This endpoint rejects writes to + // user-defined metrics. + // This method is only for use by Google Cloud services. Use + // [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] + // instead. + CreateServiceTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type metricServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMetricServiceClient(cc grpc.ClientConnInterface) MetricServiceClient { + return &metricServiceClient{cc} +} + +func (c *metricServiceClient) ListMonitoredResourceDescriptors(ctx context.Context, in *ListMonitoredResourceDescriptorsRequest, opts ...grpc.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { + out := new(ListMonitoredResourceDescriptorsResponse) + err := c.cc.Invoke(ctx, MetricService_ListMonitoredResourceDescriptors_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) GetMonitoredResourceDescriptor(ctx context.Context, in *GetMonitoredResourceDescriptorRequest, opts ...grpc.CallOption) (*monitoredres.MonitoredResourceDescriptor, error) { + out := new(monitoredres.MonitoredResourceDescriptor) + err := c.cc.Invoke(ctx, MetricService_GetMonitoredResourceDescriptor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) ListMetricDescriptors(ctx context.Context, in *ListMetricDescriptorsRequest, opts ...grpc.CallOption) (*ListMetricDescriptorsResponse, error) { + out := new(ListMetricDescriptorsResponse) + err := c.cc.Invoke(ctx, MetricService_ListMetricDescriptors_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) GetMetricDescriptor(ctx context.Context, in *GetMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) { + out := new(metric.MetricDescriptor) + err := c.cc.Invoke(ctx, MetricService_GetMetricDescriptor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) CreateMetricDescriptor(ctx context.Context, in *CreateMetricDescriptorRequest, opts ...grpc.CallOption) (*metric.MetricDescriptor, error) { + out := new(metric.MetricDescriptor) + err := c.cc.Invoke(ctx, MetricService_CreateMetricDescriptor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) DeleteMetricDescriptor(ctx context.Context, in *DeleteMetricDescriptorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MetricService_DeleteMetricDescriptor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) ListTimeSeries(ctx context.Context, in *ListTimeSeriesRequest, opts ...grpc.CallOption) (*ListTimeSeriesResponse, error) { + out := new(ListTimeSeriesResponse) + err := c.cc.Invoke(ctx, MetricService_ListTimeSeries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) CreateTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MetricService_CreateTimeSeries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricServiceClient) CreateServiceTimeSeries(ctx context.Context, in *CreateTimeSeriesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MetricService_CreateServiceTimeSeries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricServiceServer is the server API for MetricService service. +// All implementations should embed UnimplementedMetricServiceServer +// for forward compatibility +type MetricServiceServer interface { + // Lists monitored resource descriptors that match a filter. + ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) + // Gets a single monitored resource descriptor. + GetMonitoredResourceDescriptor(context.Context, *GetMonitoredResourceDescriptorRequest) (*monitoredres.MonitoredResourceDescriptor, error) + // Lists metric descriptors that match a filter. + ListMetricDescriptors(context.Context, *ListMetricDescriptorsRequest) (*ListMetricDescriptorsResponse, error) + // Gets a single metric descriptor. + GetMetricDescriptor(context.Context, *GetMetricDescriptorRequest) (*metric.MetricDescriptor, error) + // Creates a new metric descriptor. + // The creation is executed asynchronously. + // User-created metric descriptors define + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + // The metric descriptor is updated if it already exists, + // except that metric labels are never removed. + CreateMetricDescriptor(context.Context, *CreateMetricDescriptorRequest) (*metric.MetricDescriptor, error) + // Deletes a metric descriptor. Only user-created + // [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + // deleted. + DeleteMetricDescriptor(context.Context, *DeleteMetricDescriptorRequest) (*emptypb.Empty, error) + // Lists time series that match a filter. + ListTimeSeries(context.Context, *ListTimeSeriesRequest) (*ListTimeSeriesResponse, error) + // Creates or adds data to one or more time series. + // The response is empty if all time series in the request were written. + // If any time series could not be written, a corresponding failure message is + // included in the error response. + // This method does not support + // [resource locations constraint of an organization + // policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). + CreateTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) + // Creates or adds data to one or more service time series. A service time + // series is a time series for a metric from a Google Cloud service. The + // response is empty if all time series in the request were written. If any + // time series could not be written, a corresponding failure message is + // included in the error response. This endpoint rejects writes to + // user-defined metrics. + // This method is only for use by Google Cloud services. Use + // [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] + // instead. + CreateServiceTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) +} + +// UnimplementedMetricServiceServer should be embedded to have forward compatible implementations. +type UnimplementedMetricServiceServer struct { +} + +func (UnimplementedMetricServiceServer) ListMonitoredResourceDescriptors(context.Context, *ListMonitoredResourceDescriptorsRequest) (*ListMonitoredResourceDescriptorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMonitoredResourceDescriptors not implemented") +} +func (UnimplementedMetricServiceServer) GetMonitoredResourceDescriptor(context.Context, *GetMonitoredResourceDescriptorRequest) (*monitoredres.MonitoredResourceDescriptor, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMonitoredResourceDescriptor not implemented") +} +func (UnimplementedMetricServiceServer) ListMetricDescriptors(context.Context, *ListMetricDescriptorsRequest) (*ListMetricDescriptorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMetricDescriptors not implemented") +} +func (UnimplementedMetricServiceServer) GetMetricDescriptor(context.Context, *GetMetricDescriptorRequest) (*metric.MetricDescriptor, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetricDescriptor not implemented") +} +func (UnimplementedMetricServiceServer) CreateMetricDescriptor(context.Context, *CreateMetricDescriptorRequest) (*metric.MetricDescriptor, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMetricDescriptor not implemented") +} +func (UnimplementedMetricServiceServer) DeleteMetricDescriptor(context.Context, *DeleteMetricDescriptorRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMetricDescriptor not implemented") +} +func (UnimplementedMetricServiceServer) ListTimeSeries(context.Context, *ListTimeSeriesRequest) (*ListTimeSeriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTimeSeries not implemented") +} +func (UnimplementedMetricServiceServer) CreateTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTimeSeries not implemented") +} +func (UnimplementedMetricServiceServer) CreateServiceTimeSeries(context.Context, *CreateTimeSeriesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateServiceTimeSeries not implemented") +} + +// UnsafeMetricServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MetricServiceServer will +// result in compilation errors. +type UnsafeMetricServiceServer interface { + mustEmbedUnimplementedMetricServiceServer() +} + +func RegisterMetricServiceServer(s grpc.ServiceRegistrar, srv MetricServiceServer) { + s.RegisterService(&MetricService_ServiceDesc, srv) +} + +func _MetricService_ListMonitoredResourceDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMonitoredResourceDescriptorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).ListMonitoredResourceDescriptors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_ListMonitoredResourceDescriptors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).ListMonitoredResourceDescriptors(ctx, req.(*ListMonitoredResourceDescriptorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_GetMonitoredResourceDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMonitoredResourceDescriptorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).GetMonitoredResourceDescriptor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_GetMonitoredResourceDescriptor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).GetMonitoredResourceDescriptor(ctx, req.(*GetMonitoredResourceDescriptorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_ListMetricDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMetricDescriptorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).ListMetricDescriptors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_ListMetricDescriptors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).ListMetricDescriptors(ctx, req.(*ListMetricDescriptorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_GetMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetricDescriptorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).GetMetricDescriptor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_GetMetricDescriptor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).GetMetricDescriptor(ctx, req.(*GetMetricDescriptorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_CreateMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateMetricDescriptorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).CreateMetricDescriptor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_CreateMetricDescriptor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).CreateMetricDescriptor(ctx, req.(*CreateMetricDescriptorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_DeleteMetricDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMetricDescriptorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).DeleteMetricDescriptor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_DeleteMetricDescriptor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).DeleteMetricDescriptor(ctx, req.(*DeleteMetricDescriptorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_ListTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTimeSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).ListTimeSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_ListTimeSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).ListTimeSeries(ctx, req.(*ListTimeSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_CreateTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTimeSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).CreateTimeSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_CreateTimeSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).CreateTimeSeries(ctx, req.(*CreateTimeSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricService_CreateServiceTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTimeSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricServiceServer).CreateServiceTimeSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MetricService_CreateServiceTimeSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricServiceServer).CreateServiceTimeSeries(ctx, req.(*CreateTimeSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MetricService_ServiceDesc is the grpc.ServiceDesc for MetricService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MetricService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.MetricService", + HandlerType: (*MetricServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListMonitoredResourceDescriptors", + Handler: _MetricService_ListMonitoredResourceDescriptors_Handler, + }, + { + MethodName: "GetMonitoredResourceDescriptor", + Handler: _MetricService_GetMonitoredResourceDescriptor_Handler, + }, + { + MethodName: "ListMetricDescriptors", + Handler: _MetricService_ListMetricDescriptors_Handler, + }, + { + MethodName: "GetMetricDescriptor", + Handler: _MetricService_GetMetricDescriptor_Handler, + }, + { + MethodName: "CreateMetricDescriptor", + Handler: _MetricService_CreateMetricDescriptor_Handler, + }, + { + MethodName: "DeleteMetricDescriptor", + Handler: _MetricService_DeleteMetricDescriptor_Handler, + }, + { + MethodName: "ListTimeSeries", + Handler: _MetricService_ListTimeSeries_Handler, + }, + { + MethodName: "CreateTimeSeries", + Handler: _MetricService_CreateTimeSeries_Handler, + }, + { + MethodName: "CreateServiceTimeSeries", + Handler: _MetricService_CreateServiceTimeSeries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/metric_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go index e03d89efe4..820101962e 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/mutation_record.pb.go @@ -15,18 +15,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/mutation_record.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification.pb.go index 0d5cacbecb..b2f0806e89 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification.pb.go @@ -15,21 +15,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/notification.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - api "google.golang.org/genproto/googleapis/api" _ "google.golang.org/genproto/googleapis/api/annotations" label "google.golang.org/genproto/googleapis/api/label" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go index fd0230036d..1270600b38 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service.pb.go @@ -15,25 +15,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/notification_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -1297,523 +1292,3 @@ func file_google_monitoring_v3_notification_service_proto_init() { file_google_monitoring_v3_notification_service_proto_goTypes = nil file_google_monitoring_v3_notification_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// NotificationChannelServiceClient is the client API for NotificationChannelService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NotificationChannelServiceClient interface { - // Lists the descriptors for supported channel types. The use of descriptors - // makes it possible for new channel types to be dynamically added. - ListNotificationChannelDescriptors(ctx context.Context, in *ListNotificationChannelDescriptorsRequest, opts ...grpc.CallOption) (*ListNotificationChannelDescriptorsResponse, error) - // Gets a single channel descriptor. The descriptor indicates which fields - // are expected / permitted for a notification channel of the given type. - GetNotificationChannelDescriptor(ctx context.Context, in *GetNotificationChannelDescriptorRequest, opts ...grpc.CallOption) (*NotificationChannelDescriptor, error) - // Lists the notification channels that have been created for the project. - // To list the types of notification channels that are supported, use - // the `ListNotificationChannelDescriptors` method. - ListNotificationChannels(ctx context.Context, in *ListNotificationChannelsRequest, opts ...grpc.CallOption) (*ListNotificationChannelsResponse, error) - // Gets a single notification channel. The channel includes the relevant - // configuration details with which the channel was created. However, the - // response may truncate or omit passwords, API keys, or other private key - // matter and thus the response may not be 100% identical to the information - // that was supplied in the call to the create method. - GetNotificationChannel(ctx context.Context, in *GetNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) - // Creates a new notification channel, representing a single notification - // endpoint such as an email address, SMS number, or PagerDuty service. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - CreateNotificationChannel(ctx context.Context, in *CreateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) - // Updates a notification channel. Fields not specified in the field mask - // remain unchanged. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - UpdateNotificationChannel(ctx context.Context, in *UpdateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) - // Deletes a notification channel. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - DeleteNotificationChannel(ctx context.Context, in *DeleteNotificationChannelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Causes a verification code to be delivered to the channel. The code - // can then be supplied in `VerifyNotificationChannel` to verify the channel. - SendNotificationChannelVerificationCode(ctx context.Context, in *SendNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Requests a verification code for an already verified channel that can then - // be used in a call to VerifyNotificationChannel() on a different channel - // with an equivalent identity in the same or in a different project. This - // makes it possible to copy a channel between projects without requiring - // manual reverification of the channel. If the channel is not in the - // verified state, this method will fail (in other words, this may only be - // used if the SendNotificationChannelVerificationCode and - // VerifyNotificationChannel paths have already been used to put the given - // channel into the verified state). - // - // There is no guarantee that the verification codes returned by this method - // will be of a similar structure or form as the ones that are delivered - // to the channel via SendNotificationChannelVerificationCode; while - // VerifyNotificationChannel() will recognize both the codes delivered via - // SendNotificationChannelVerificationCode() and returned from - // GetNotificationChannelVerificationCode(), it is typically the case that - // the verification codes delivered via - // SendNotificationChannelVerificationCode() will be shorter and also - // have a shorter expiration (e.g. codes such as "G-123456") whereas - // GetVerificationCode() will typically return a much longer, websafe base - // 64 encoded string that has a longer expiration time. - GetNotificationChannelVerificationCode(ctx context.Context, in *GetNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*GetNotificationChannelVerificationCodeResponse, error) - // Verifies a `NotificationChannel` by proving receipt of the code - // delivered to the channel as a result of calling - // `SendNotificationChannelVerificationCode`. - VerifyNotificationChannel(ctx context.Context, in *VerifyNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) -} - -type notificationChannelServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNotificationChannelServiceClient(cc grpc.ClientConnInterface) NotificationChannelServiceClient { - return ¬ificationChannelServiceClient{cc} -} - -func (c *notificationChannelServiceClient) ListNotificationChannelDescriptors(ctx context.Context, in *ListNotificationChannelDescriptorsRequest, opts ...grpc.CallOption) (*ListNotificationChannelDescriptorsResponse, error) { - out := new(ListNotificationChannelDescriptorsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) GetNotificationChannelDescriptor(ctx context.Context, in *GetNotificationChannelDescriptorRequest, opts ...grpc.CallOption) (*NotificationChannelDescriptor, error) { - out := new(NotificationChannelDescriptor) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) ListNotificationChannels(ctx context.Context, in *ListNotificationChannelsRequest, opts ...grpc.CallOption) (*ListNotificationChannelsResponse, error) { - out := new(ListNotificationChannelsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/ListNotificationChannels", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) GetNotificationChannel(ctx context.Context, in *GetNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { - out := new(NotificationChannel) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/GetNotificationChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) CreateNotificationChannel(ctx context.Context, in *CreateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { - out := new(NotificationChannel) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) UpdateNotificationChannel(ctx context.Context, in *UpdateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { - out := new(NotificationChannel) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) DeleteNotificationChannel(ctx context.Context, in *DeleteNotificationChannelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) SendNotificationChannelVerificationCode(ctx context.Context, in *SendNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) GetNotificationChannelVerificationCode(ctx context.Context, in *GetNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*GetNotificationChannelVerificationCodeResponse, error) { - out := new(GetNotificationChannelVerificationCodeResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *notificationChannelServiceClient) VerifyNotificationChannel(ctx context.Context, in *VerifyNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { - out := new(NotificationChannel) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NotificationChannelServiceServer is the server API for NotificationChannelService service. -type NotificationChannelServiceServer interface { - // Lists the descriptors for supported channel types. The use of descriptors - // makes it possible for new channel types to be dynamically added. - ListNotificationChannelDescriptors(context.Context, *ListNotificationChannelDescriptorsRequest) (*ListNotificationChannelDescriptorsResponse, error) - // Gets a single channel descriptor. The descriptor indicates which fields - // are expected / permitted for a notification channel of the given type. - GetNotificationChannelDescriptor(context.Context, *GetNotificationChannelDescriptorRequest) (*NotificationChannelDescriptor, error) - // Lists the notification channels that have been created for the project. - // To list the types of notification channels that are supported, use - // the `ListNotificationChannelDescriptors` method. - ListNotificationChannels(context.Context, *ListNotificationChannelsRequest) (*ListNotificationChannelsResponse, error) - // Gets a single notification channel. The channel includes the relevant - // configuration details with which the channel was created. However, the - // response may truncate or omit passwords, API keys, or other private key - // matter and thus the response may not be 100% identical to the information - // that was supplied in the call to the create method. - GetNotificationChannel(context.Context, *GetNotificationChannelRequest) (*NotificationChannel, error) - // Creates a new notification channel, representing a single notification - // endpoint such as an email address, SMS number, or PagerDuty service. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - CreateNotificationChannel(context.Context, *CreateNotificationChannelRequest) (*NotificationChannel, error) - // Updates a notification channel. Fields not specified in the field mask - // remain unchanged. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - UpdateNotificationChannel(context.Context, *UpdateNotificationChannelRequest) (*NotificationChannel, error) - // Deletes a notification channel. - // - // Design your application to single-thread API calls that modify the state of - // notification channels in a single project. This includes calls to - // CreateNotificationChannel, DeleteNotificationChannel and - // UpdateNotificationChannel. - DeleteNotificationChannel(context.Context, *DeleteNotificationChannelRequest) (*emptypb.Empty, error) - // Causes a verification code to be delivered to the channel. The code - // can then be supplied in `VerifyNotificationChannel` to verify the channel. - SendNotificationChannelVerificationCode(context.Context, *SendNotificationChannelVerificationCodeRequest) (*emptypb.Empty, error) - // Requests a verification code for an already verified channel that can then - // be used in a call to VerifyNotificationChannel() on a different channel - // with an equivalent identity in the same or in a different project. This - // makes it possible to copy a channel between projects without requiring - // manual reverification of the channel. If the channel is not in the - // verified state, this method will fail (in other words, this may only be - // used if the SendNotificationChannelVerificationCode and - // VerifyNotificationChannel paths have already been used to put the given - // channel into the verified state). - // - // There is no guarantee that the verification codes returned by this method - // will be of a similar structure or form as the ones that are delivered - // to the channel via SendNotificationChannelVerificationCode; while - // VerifyNotificationChannel() will recognize both the codes delivered via - // SendNotificationChannelVerificationCode() and returned from - // GetNotificationChannelVerificationCode(), it is typically the case that - // the verification codes delivered via - // SendNotificationChannelVerificationCode() will be shorter and also - // have a shorter expiration (e.g. codes such as "G-123456") whereas - // GetVerificationCode() will typically return a much longer, websafe base - // 64 encoded string that has a longer expiration time. - GetNotificationChannelVerificationCode(context.Context, *GetNotificationChannelVerificationCodeRequest) (*GetNotificationChannelVerificationCodeResponse, error) - // Verifies a `NotificationChannel` by proving receipt of the code - // delivered to the channel as a result of calling - // `SendNotificationChannelVerificationCode`. - VerifyNotificationChannel(context.Context, *VerifyNotificationChannelRequest) (*NotificationChannel, error) -} - -// UnimplementedNotificationChannelServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNotificationChannelServiceServer struct { -} - -func (*UnimplementedNotificationChannelServiceServer) ListNotificationChannelDescriptors(context.Context, *ListNotificationChannelDescriptorsRequest) (*ListNotificationChannelDescriptorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNotificationChannelDescriptors not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) GetNotificationChannelDescriptor(context.Context, *GetNotificationChannelDescriptorRequest) (*NotificationChannelDescriptor, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannelDescriptor not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) ListNotificationChannels(context.Context, *ListNotificationChannelsRequest) (*ListNotificationChannelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNotificationChannels not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) GetNotificationChannel(context.Context, *GetNotificationChannelRequest) (*NotificationChannel, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannel not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) CreateNotificationChannel(context.Context, *CreateNotificationChannelRequest) (*NotificationChannel, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNotificationChannel not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) UpdateNotificationChannel(context.Context, *UpdateNotificationChannelRequest) (*NotificationChannel, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNotificationChannel not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) DeleteNotificationChannel(context.Context, *DeleteNotificationChannelRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNotificationChannel not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) SendNotificationChannelVerificationCode(context.Context, *SendNotificationChannelVerificationCodeRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendNotificationChannelVerificationCode not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) GetNotificationChannelVerificationCode(context.Context, *GetNotificationChannelVerificationCodeRequest) (*GetNotificationChannelVerificationCodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannelVerificationCode not implemented") -} -func (*UnimplementedNotificationChannelServiceServer) VerifyNotificationChannel(context.Context, *VerifyNotificationChannelRequest) (*NotificationChannel, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyNotificationChannel not implemented") -} - -func RegisterNotificationChannelServiceServer(s *grpc.Server, srv NotificationChannelServiceServer) { - s.RegisterService(&_NotificationChannelService_serviceDesc, srv) -} - -func _NotificationChannelService_ListNotificationChannelDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNotificationChannelDescriptorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).ListNotificationChannelDescriptors(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).ListNotificationChannelDescriptors(ctx, req.(*ListNotificationChannelDescriptorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_GetNotificationChannelDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNotificationChannelDescriptorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).GetNotificationChannelDescriptor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).GetNotificationChannelDescriptor(ctx, req.(*GetNotificationChannelDescriptorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_ListNotificationChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNotificationChannelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).ListNotificationChannels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/ListNotificationChannels", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).ListNotificationChannels(ctx, req.(*ListNotificationChannelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_GetNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNotificationChannelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).GetNotificationChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/GetNotificationChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).GetNotificationChannel(ctx, req.(*GetNotificationChannelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_CreateNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateNotificationChannelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).CreateNotificationChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).CreateNotificationChannel(ctx, req.(*CreateNotificationChannelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_UpdateNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateNotificationChannelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).UpdateNotificationChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).UpdateNotificationChannel(ctx, req.(*UpdateNotificationChannelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_DeleteNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNotificationChannelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).DeleteNotificationChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).DeleteNotificationChannel(ctx, req.(*DeleteNotificationChannelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_SendNotificationChannelVerificationCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendNotificationChannelVerificationCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).SendNotificationChannelVerificationCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).SendNotificationChannelVerificationCode(ctx, req.(*SendNotificationChannelVerificationCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_GetNotificationChannelVerificationCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNotificationChannelVerificationCodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).GetNotificationChannelVerificationCode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).GetNotificationChannelVerificationCode(ctx, req.(*GetNotificationChannelVerificationCodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NotificationChannelService_VerifyNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyNotificationChannelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NotificationChannelServiceServer).VerifyNotificationChannel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NotificationChannelServiceServer).VerifyNotificationChannel(ctx, req.(*VerifyNotificationChannelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NotificationChannelService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.NotificationChannelService", - HandlerType: (*NotificationChannelServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListNotificationChannelDescriptors", - Handler: _NotificationChannelService_ListNotificationChannelDescriptors_Handler, - }, - { - MethodName: "GetNotificationChannelDescriptor", - Handler: _NotificationChannelService_GetNotificationChannelDescriptor_Handler, - }, - { - MethodName: "ListNotificationChannels", - Handler: _NotificationChannelService_ListNotificationChannels_Handler, - }, - { - MethodName: "GetNotificationChannel", - Handler: _NotificationChannelService_GetNotificationChannel_Handler, - }, - { - MethodName: "CreateNotificationChannel", - Handler: _NotificationChannelService_CreateNotificationChannel_Handler, - }, - { - MethodName: "UpdateNotificationChannel", - Handler: _NotificationChannelService_UpdateNotificationChannel_Handler, - }, - { - MethodName: "DeleteNotificationChannel", - Handler: _NotificationChannelService_DeleteNotificationChannel_Handler, - }, - { - MethodName: "SendNotificationChannelVerificationCode", - Handler: _NotificationChannelService_SendNotificationChannelVerificationCode_Handler, - }, - { - MethodName: "GetNotificationChannelVerificationCode", - Handler: _NotificationChannelService_GetNotificationChannelVerificationCode_Handler, - }, - { - MethodName: "VerifyNotificationChannel", - Handler: _NotificationChannelService_VerifyNotificationChannel_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/notification_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service_grpc.pb.go new file mode 100644 index 0000000000..ec5c2fe162 --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/notification_service_grpc.pb.go @@ -0,0 +1,571 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/notification_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NotificationChannelService_ListNotificationChannelDescriptors_FullMethodName = "/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors" + NotificationChannelService_GetNotificationChannelDescriptor_FullMethodName = "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor" + NotificationChannelService_ListNotificationChannels_FullMethodName = "/google.monitoring.v3.NotificationChannelService/ListNotificationChannels" + NotificationChannelService_GetNotificationChannel_FullMethodName = "/google.monitoring.v3.NotificationChannelService/GetNotificationChannel" + NotificationChannelService_CreateNotificationChannel_FullMethodName = "/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel" + NotificationChannelService_UpdateNotificationChannel_FullMethodName = "/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel" + NotificationChannelService_DeleteNotificationChannel_FullMethodName = "/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel" + NotificationChannelService_SendNotificationChannelVerificationCode_FullMethodName = "/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode" + NotificationChannelService_GetNotificationChannelVerificationCode_FullMethodName = "/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode" + NotificationChannelService_VerifyNotificationChannel_FullMethodName = "/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel" +) + +// NotificationChannelServiceClient is the client API for NotificationChannelService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NotificationChannelServiceClient interface { + // Lists the descriptors for supported channel types. The use of descriptors + // makes it possible for new channel types to be dynamically added. + ListNotificationChannelDescriptors(ctx context.Context, in *ListNotificationChannelDescriptorsRequest, opts ...grpc.CallOption) (*ListNotificationChannelDescriptorsResponse, error) + // Gets a single channel descriptor. The descriptor indicates which fields + // are expected / permitted for a notification channel of the given type. + GetNotificationChannelDescriptor(ctx context.Context, in *GetNotificationChannelDescriptorRequest, opts ...grpc.CallOption) (*NotificationChannelDescriptor, error) + // Lists the notification channels that have been created for the project. + // To list the types of notification channels that are supported, use + // the `ListNotificationChannelDescriptors` method. + ListNotificationChannels(ctx context.Context, in *ListNotificationChannelsRequest, opts ...grpc.CallOption) (*ListNotificationChannelsResponse, error) + // Gets a single notification channel. The channel includes the relevant + // configuration details with which the channel was created. However, the + // response may truncate or omit passwords, API keys, or other private key + // matter and thus the response may not be 100% identical to the information + // that was supplied in the call to the create method. + GetNotificationChannel(ctx context.Context, in *GetNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) + // Creates a new notification channel, representing a single notification + // endpoint such as an email address, SMS number, or PagerDuty service. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + CreateNotificationChannel(ctx context.Context, in *CreateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) + // Updates a notification channel. Fields not specified in the field mask + // remain unchanged. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + UpdateNotificationChannel(ctx context.Context, in *UpdateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) + // Deletes a notification channel. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + DeleteNotificationChannel(ctx context.Context, in *DeleteNotificationChannelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Causes a verification code to be delivered to the channel. The code + // can then be supplied in `VerifyNotificationChannel` to verify the channel. + SendNotificationChannelVerificationCode(ctx context.Context, in *SendNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Requests a verification code for an already verified channel that can then + // be used in a call to VerifyNotificationChannel() on a different channel + // with an equivalent identity in the same or in a different project. This + // makes it possible to copy a channel between projects without requiring + // manual reverification of the channel. If the channel is not in the + // verified state, this method will fail (in other words, this may only be + // used if the SendNotificationChannelVerificationCode and + // VerifyNotificationChannel paths have already been used to put the given + // channel into the verified state). + // + // There is no guarantee that the verification codes returned by this method + // will be of a similar structure or form as the ones that are delivered + // to the channel via SendNotificationChannelVerificationCode; while + // VerifyNotificationChannel() will recognize both the codes delivered via + // SendNotificationChannelVerificationCode() and returned from + // GetNotificationChannelVerificationCode(), it is typically the case that + // the verification codes delivered via + // SendNotificationChannelVerificationCode() will be shorter and also + // have a shorter expiration (e.g. codes such as "G-123456") whereas + // GetVerificationCode() will typically return a much longer, websafe base + // 64 encoded string that has a longer expiration time. + GetNotificationChannelVerificationCode(ctx context.Context, in *GetNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*GetNotificationChannelVerificationCodeResponse, error) + // Verifies a `NotificationChannel` by proving receipt of the code + // delivered to the channel as a result of calling + // `SendNotificationChannelVerificationCode`. + VerifyNotificationChannel(ctx context.Context, in *VerifyNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) +} + +type notificationChannelServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNotificationChannelServiceClient(cc grpc.ClientConnInterface) NotificationChannelServiceClient { + return ¬ificationChannelServiceClient{cc} +} + +func (c *notificationChannelServiceClient) ListNotificationChannelDescriptors(ctx context.Context, in *ListNotificationChannelDescriptorsRequest, opts ...grpc.CallOption) (*ListNotificationChannelDescriptorsResponse, error) { + out := new(ListNotificationChannelDescriptorsResponse) + err := c.cc.Invoke(ctx, NotificationChannelService_ListNotificationChannelDescriptors_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) GetNotificationChannelDescriptor(ctx context.Context, in *GetNotificationChannelDescriptorRequest, opts ...grpc.CallOption) (*NotificationChannelDescriptor, error) { + out := new(NotificationChannelDescriptor) + err := c.cc.Invoke(ctx, NotificationChannelService_GetNotificationChannelDescriptor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) ListNotificationChannels(ctx context.Context, in *ListNotificationChannelsRequest, opts ...grpc.CallOption) (*ListNotificationChannelsResponse, error) { + out := new(ListNotificationChannelsResponse) + err := c.cc.Invoke(ctx, NotificationChannelService_ListNotificationChannels_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) GetNotificationChannel(ctx context.Context, in *GetNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { + out := new(NotificationChannel) + err := c.cc.Invoke(ctx, NotificationChannelService_GetNotificationChannel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) CreateNotificationChannel(ctx context.Context, in *CreateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { + out := new(NotificationChannel) + err := c.cc.Invoke(ctx, NotificationChannelService_CreateNotificationChannel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) UpdateNotificationChannel(ctx context.Context, in *UpdateNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { + out := new(NotificationChannel) + err := c.cc.Invoke(ctx, NotificationChannelService_UpdateNotificationChannel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) DeleteNotificationChannel(ctx context.Context, in *DeleteNotificationChannelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, NotificationChannelService_DeleteNotificationChannel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) SendNotificationChannelVerificationCode(ctx context.Context, in *SendNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, NotificationChannelService_SendNotificationChannelVerificationCode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) GetNotificationChannelVerificationCode(ctx context.Context, in *GetNotificationChannelVerificationCodeRequest, opts ...grpc.CallOption) (*GetNotificationChannelVerificationCodeResponse, error) { + out := new(GetNotificationChannelVerificationCodeResponse) + err := c.cc.Invoke(ctx, NotificationChannelService_GetNotificationChannelVerificationCode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notificationChannelServiceClient) VerifyNotificationChannel(ctx context.Context, in *VerifyNotificationChannelRequest, opts ...grpc.CallOption) (*NotificationChannel, error) { + out := new(NotificationChannel) + err := c.cc.Invoke(ctx, NotificationChannelService_VerifyNotificationChannel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NotificationChannelServiceServer is the server API for NotificationChannelService service. +// All implementations should embed UnimplementedNotificationChannelServiceServer +// for forward compatibility +type NotificationChannelServiceServer interface { + // Lists the descriptors for supported channel types. The use of descriptors + // makes it possible for new channel types to be dynamically added. + ListNotificationChannelDescriptors(context.Context, *ListNotificationChannelDescriptorsRequest) (*ListNotificationChannelDescriptorsResponse, error) + // Gets a single channel descriptor. The descriptor indicates which fields + // are expected / permitted for a notification channel of the given type. + GetNotificationChannelDescriptor(context.Context, *GetNotificationChannelDescriptorRequest) (*NotificationChannelDescriptor, error) + // Lists the notification channels that have been created for the project. + // To list the types of notification channels that are supported, use + // the `ListNotificationChannelDescriptors` method. + ListNotificationChannels(context.Context, *ListNotificationChannelsRequest) (*ListNotificationChannelsResponse, error) + // Gets a single notification channel. The channel includes the relevant + // configuration details with which the channel was created. However, the + // response may truncate or omit passwords, API keys, or other private key + // matter and thus the response may not be 100% identical to the information + // that was supplied in the call to the create method. + GetNotificationChannel(context.Context, *GetNotificationChannelRequest) (*NotificationChannel, error) + // Creates a new notification channel, representing a single notification + // endpoint such as an email address, SMS number, or PagerDuty service. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + CreateNotificationChannel(context.Context, *CreateNotificationChannelRequest) (*NotificationChannel, error) + // Updates a notification channel. Fields not specified in the field mask + // remain unchanged. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + UpdateNotificationChannel(context.Context, *UpdateNotificationChannelRequest) (*NotificationChannel, error) + // Deletes a notification channel. + // + // Design your application to single-thread API calls that modify the state of + // notification channels in a single project. This includes calls to + // CreateNotificationChannel, DeleteNotificationChannel and + // UpdateNotificationChannel. + DeleteNotificationChannel(context.Context, *DeleteNotificationChannelRequest) (*emptypb.Empty, error) + // Causes a verification code to be delivered to the channel. The code + // can then be supplied in `VerifyNotificationChannel` to verify the channel. + SendNotificationChannelVerificationCode(context.Context, *SendNotificationChannelVerificationCodeRequest) (*emptypb.Empty, error) + // Requests a verification code for an already verified channel that can then + // be used in a call to VerifyNotificationChannel() on a different channel + // with an equivalent identity in the same or in a different project. This + // makes it possible to copy a channel between projects without requiring + // manual reverification of the channel. If the channel is not in the + // verified state, this method will fail (in other words, this may only be + // used if the SendNotificationChannelVerificationCode and + // VerifyNotificationChannel paths have already been used to put the given + // channel into the verified state). + // + // There is no guarantee that the verification codes returned by this method + // will be of a similar structure or form as the ones that are delivered + // to the channel via SendNotificationChannelVerificationCode; while + // VerifyNotificationChannel() will recognize both the codes delivered via + // SendNotificationChannelVerificationCode() and returned from + // GetNotificationChannelVerificationCode(), it is typically the case that + // the verification codes delivered via + // SendNotificationChannelVerificationCode() will be shorter and also + // have a shorter expiration (e.g. codes such as "G-123456") whereas + // GetVerificationCode() will typically return a much longer, websafe base + // 64 encoded string that has a longer expiration time. + GetNotificationChannelVerificationCode(context.Context, *GetNotificationChannelVerificationCodeRequest) (*GetNotificationChannelVerificationCodeResponse, error) + // Verifies a `NotificationChannel` by proving receipt of the code + // delivered to the channel as a result of calling + // `SendNotificationChannelVerificationCode`. + VerifyNotificationChannel(context.Context, *VerifyNotificationChannelRequest) (*NotificationChannel, error) +} + +// UnimplementedNotificationChannelServiceServer should be embedded to have forward compatible implementations. +type UnimplementedNotificationChannelServiceServer struct { +} + +func (UnimplementedNotificationChannelServiceServer) ListNotificationChannelDescriptors(context.Context, *ListNotificationChannelDescriptorsRequest) (*ListNotificationChannelDescriptorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNotificationChannelDescriptors not implemented") +} +func (UnimplementedNotificationChannelServiceServer) GetNotificationChannelDescriptor(context.Context, *GetNotificationChannelDescriptorRequest) (*NotificationChannelDescriptor, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannelDescriptor not implemented") +} +func (UnimplementedNotificationChannelServiceServer) ListNotificationChannels(context.Context, *ListNotificationChannelsRequest) (*ListNotificationChannelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNotificationChannels not implemented") +} +func (UnimplementedNotificationChannelServiceServer) GetNotificationChannel(context.Context, *GetNotificationChannelRequest) (*NotificationChannel, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannel not implemented") +} +func (UnimplementedNotificationChannelServiceServer) CreateNotificationChannel(context.Context, *CreateNotificationChannelRequest) (*NotificationChannel, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNotificationChannel not implemented") +} +func (UnimplementedNotificationChannelServiceServer) UpdateNotificationChannel(context.Context, *UpdateNotificationChannelRequest) (*NotificationChannel, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNotificationChannel not implemented") +} +func (UnimplementedNotificationChannelServiceServer) DeleteNotificationChannel(context.Context, *DeleteNotificationChannelRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNotificationChannel not implemented") +} +func (UnimplementedNotificationChannelServiceServer) SendNotificationChannelVerificationCode(context.Context, *SendNotificationChannelVerificationCodeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendNotificationChannelVerificationCode not implemented") +} +func (UnimplementedNotificationChannelServiceServer) GetNotificationChannelVerificationCode(context.Context, *GetNotificationChannelVerificationCodeRequest) (*GetNotificationChannelVerificationCodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNotificationChannelVerificationCode not implemented") +} +func (UnimplementedNotificationChannelServiceServer) VerifyNotificationChannel(context.Context, *VerifyNotificationChannelRequest) (*NotificationChannel, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyNotificationChannel not implemented") +} + +// UnsafeNotificationChannelServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NotificationChannelServiceServer will +// result in compilation errors. +type UnsafeNotificationChannelServiceServer interface { + mustEmbedUnimplementedNotificationChannelServiceServer() +} + +func RegisterNotificationChannelServiceServer(s grpc.ServiceRegistrar, srv NotificationChannelServiceServer) { + s.RegisterService(&NotificationChannelService_ServiceDesc, srv) +} + +func _NotificationChannelService_ListNotificationChannelDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNotificationChannelDescriptorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).ListNotificationChannelDescriptors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_ListNotificationChannelDescriptors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).ListNotificationChannelDescriptors(ctx, req.(*ListNotificationChannelDescriptorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_GetNotificationChannelDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNotificationChannelDescriptorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).GetNotificationChannelDescriptor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_GetNotificationChannelDescriptor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).GetNotificationChannelDescriptor(ctx, req.(*GetNotificationChannelDescriptorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_ListNotificationChannels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNotificationChannelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).ListNotificationChannels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_ListNotificationChannels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).ListNotificationChannels(ctx, req.(*ListNotificationChannelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_GetNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNotificationChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).GetNotificationChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_GetNotificationChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).GetNotificationChannel(ctx, req.(*GetNotificationChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_CreateNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNotificationChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).CreateNotificationChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_CreateNotificationChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).CreateNotificationChannel(ctx, req.(*CreateNotificationChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_UpdateNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNotificationChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).UpdateNotificationChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_UpdateNotificationChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).UpdateNotificationChannel(ctx, req.(*UpdateNotificationChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_DeleteNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNotificationChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).DeleteNotificationChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_DeleteNotificationChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).DeleteNotificationChannel(ctx, req.(*DeleteNotificationChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_SendNotificationChannelVerificationCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendNotificationChannelVerificationCodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).SendNotificationChannelVerificationCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_SendNotificationChannelVerificationCode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).SendNotificationChannelVerificationCode(ctx, req.(*SendNotificationChannelVerificationCodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_GetNotificationChannelVerificationCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNotificationChannelVerificationCodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).GetNotificationChannelVerificationCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_GetNotificationChannelVerificationCode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).GetNotificationChannelVerificationCode(ctx, req.(*GetNotificationChannelVerificationCodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotificationChannelService_VerifyNotificationChannel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyNotificationChannelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotificationChannelServiceServer).VerifyNotificationChannel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NotificationChannelService_VerifyNotificationChannel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotificationChannelServiceServer).VerifyNotificationChannel(ctx, req.(*VerifyNotificationChannelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NotificationChannelService_ServiceDesc is the grpc.ServiceDesc for NotificationChannelService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NotificationChannelService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.NotificationChannelService", + HandlerType: (*NotificationChannelServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListNotificationChannelDescriptors", + Handler: _NotificationChannelService_ListNotificationChannelDescriptors_Handler, + }, + { + MethodName: "GetNotificationChannelDescriptor", + Handler: _NotificationChannelService_GetNotificationChannelDescriptor_Handler, + }, + { + MethodName: "ListNotificationChannels", + Handler: _NotificationChannelService_ListNotificationChannels_Handler, + }, + { + MethodName: "GetNotificationChannel", + Handler: _NotificationChannelService_GetNotificationChannel_Handler, + }, + { + MethodName: "CreateNotificationChannel", + Handler: _NotificationChannelService_CreateNotificationChannel_Handler, + }, + { + MethodName: "UpdateNotificationChannel", + Handler: _NotificationChannelService_UpdateNotificationChannel_Handler, + }, + { + MethodName: "DeleteNotificationChannel", + Handler: _NotificationChannelService_DeleteNotificationChannel_Handler, + }, + { + MethodName: "SendNotificationChannelVerificationCode", + Handler: _NotificationChannelService_SendNotificationChannelVerificationCode_Handler, + }, + { + MethodName: "GetNotificationChannelVerificationCode", + Handler: _NotificationChannelService_GetNotificationChannelVerificationCode_Handler, + }, + { + MethodName: "VerifyNotificationChannel", + Handler: _NotificationChannelService_VerifyNotificationChannel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/notification_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service.pb.go index 6402f18ca1..63741c4b6d 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service.pb.go @@ -15,21 +15,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/query_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" ) const ( @@ -128,94 +123,3 @@ func file_google_monitoring_v3_query_service_proto_init() { file_google_monitoring_v3_query_service_proto_goTypes = nil file_google_monitoring_v3_query_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Deprecated: Do not use. - // Queries time series by using Monitoring Query Language (MQL). We recommend - // using PromQL instead of MQL. For more information about the status of MQL, - // see the [MQL deprecation - // notice](https://cloud.google.com/stackdriver/docs/deprecations/mql). - QueryTimeSeries(ctx context.Context, in *QueryTimeSeriesRequest, opts ...grpc.CallOption) (*QueryTimeSeriesResponse, error) -} - -type queryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient { - return &queryServiceClient{cc} -} - -// Deprecated: Do not use. -func (c *queryServiceClient) QueryTimeSeries(ctx context.Context, in *QueryTimeSeriesRequest, opts ...grpc.CallOption) (*QueryTimeSeriesResponse, error) { - out := new(QueryTimeSeriesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.QueryService/QueryTimeSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Deprecated: Do not use. - // Queries time series by using Monitoring Query Language (MQL). We recommend - // using PromQL instead of MQL. For more information about the status of MQL, - // see the [MQL deprecation - // notice](https://cloud.google.com/stackdriver/docs/deprecations/mql). - QueryTimeSeries(context.Context, *QueryTimeSeriesRequest) (*QueryTimeSeriesResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) QueryTimeSeries(context.Context, *QueryTimeSeriesRequest) (*QueryTimeSeriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryTimeSeries not implemented") -} - -func RegisterQueryServiceServer(s *grpc.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_QueryTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTimeSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).QueryTimeSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.QueryService/QueryTimeSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).QueryTimeSeries(ctx, req.(*QueryTimeSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "QueryTimeSeries", - Handler: _QueryService_QueryTimeSeries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/query_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service_grpc.pb.go new file mode 100644 index 0000000000..403533951f --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/query_service_grpc.pb.go @@ -0,0 +1,132 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/query_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + QueryService_QueryTimeSeries_FullMethodName = "/google.monitoring.v3.QueryService/QueryTimeSeries" +) + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryServiceClient interface { + // Deprecated: Do not use. + // Queries time series by using Monitoring Query Language (MQL). We recommend + // using PromQL instead of MQL. For more information about the status of MQL, + // see the [MQL deprecation + // notice](https://cloud.google.com/stackdriver/docs/deprecations/mql). + QueryTimeSeries(ctx context.Context, in *QueryTimeSeriesRequest, opts ...grpc.CallOption) (*QueryTimeSeriesResponse, error) +} + +type queryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient { + return &queryServiceClient{cc} +} + +// Deprecated: Do not use. +func (c *queryServiceClient) QueryTimeSeries(ctx context.Context, in *QueryTimeSeriesRequest, opts ...grpc.CallOption) (*QueryTimeSeriesResponse, error) { + out := new(QueryTimeSeriesResponse) + err := c.cc.Invoke(ctx, QueryService_QueryTimeSeries_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +// All implementations should embed UnimplementedQueryServiceServer +// for forward compatibility +type QueryServiceServer interface { + // Deprecated: Do not use. + // Queries time series by using Monitoring Query Language (MQL). We recommend + // using PromQL instead of MQL. For more information about the status of MQL, + // see the [MQL deprecation + // notice](https://cloud.google.com/stackdriver/docs/deprecations/mql). + QueryTimeSeries(context.Context, *QueryTimeSeriesRequest) (*QueryTimeSeriesResponse, error) +} + +// UnimplementedQueryServiceServer should be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (UnimplementedQueryServiceServer) QueryTimeSeries(context.Context, *QueryTimeSeriesRequest) (*QueryTimeSeriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTimeSeries not implemented") +} + +// UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServiceServer will +// result in compilation errors. +type UnsafeQueryServiceServer interface { + mustEmbedUnimplementedQueryServiceServer() +} + +func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) { + s.RegisterService(&QueryService_ServiceDesc, srv) +} + +func _QueryService_QueryTimeSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTimeSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryTimeSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: QueryService_QueryTimeSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryTimeSeries(ctx, req.(*QueryTimeSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var QueryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryTimeSeries", + Handler: _QueryService_QueryTimeSeries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/query_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service.pb.go index a9d2ae8cb6..07a209ac19 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service.pb.go @@ -15,20 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/service.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" calendarperiod "google.golang.org/genproto/googleapis/type/calendarperiod" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service.pb.go index 08c2e08e26..f08dfe56ad 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service.pb.go @@ -15,24 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/service_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" ) const ( @@ -1200,427 +1195,3 @@ func file_google_monitoring_v3_service_service_proto_init() { file_google_monitoring_v3_service_service_proto_goTypes = nil file_google_monitoring_v3_service_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ServiceMonitoringServiceClient is the client API for ServiceMonitoringService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ServiceMonitoringServiceClient interface { - // Create a `Service`. - CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*Service, error) - // Get the named `Service`. - GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) - // List `Service`s for this Metrics Scope. - ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) - // Update this `Service`. - UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*Service, error) - // Soft delete this `Service`. - DeleteService(ctx context.Context, in *DeleteServiceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Create a `ServiceLevelObjective` for the given `Service`. - CreateServiceLevelObjective(ctx context.Context, in *CreateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) - // Get a `ServiceLevelObjective` by name. - GetServiceLevelObjective(ctx context.Context, in *GetServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) - // List the `ServiceLevelObjective`s for the given `Service`. - ListServiceLevelObjectives(ctx context.Context, in *ListServiceLevelObjectivesRequest, opts ...grpc.CallOption) (*ListServiceLevelObjectivesResponse, error) - // Update the given `ServiceLevelObjective`. - UpdateServiceLevelObjective(ctx context.Context, in *UpdateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) - // Delete the given `ServiceLevelObjective`. - DeleteServiceLevelObjective(ctx context.Context, in *DeleteServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type serviceMonitoringServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceMonitoringServiceClient(cc grpc.ClientConnInterface) ServiceMonitoringServiceClient { - return &serviceMonitoringServiceClient{cc} -} - -func (c *serviceMonitoringServiceClient) CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*Service, error) { - out := new(Service) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/CreateService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) { - out := new(Service) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/GetService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { - out := new(ListServicesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/ListServices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*Service, error) { - out := new(Service) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/UpdateService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) DeleteService(ctx context.Context, in *DeleteServiceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/DeleteService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) CreateServiceLevelObjective(ctx context.Context, in *CreateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { - out := new(ServiceLevelObjective) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) GetServiceLevelObjective(ctx context.Context, in *GetServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { - out := new(ServiceLevelObjective) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) ListServiceLevelObjectives(ctx context.Context, in *ListServiceLevelObjectivesRequest, opts ...grpc.CallOption) (*ListServiceLevelObjectivesResponse, error) { - out := new(ListServiceLevelObjectivesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) UpdateServiceLevelObjective(ctx context.Context, in *UpdateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { - out := new(ServiceLevelObjective) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceMonitoringServiceClient) DeleteServiceLevelObjective(ctx context.Context, in *DeleteServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceMonitoringServiceServer is the server API for ServiceMonitoringService service. -type ServiceMonitoringServiceServer interface { - // Create a `Service`. - CreateService(context.Context, *CreateServiceRequest) (*Service, error) - // Get the named `Service`. - GetService(context.Context, *GetServiceRequest) (*Service, error) - // List `Service`s for this Metrics Scope. - ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) - // Update this `Service`. - UpdateService(context.Context, *UpdateServiceRequest) (*Service, error) - // Soft delete this `Service`. - DeleteService(context.Context, *DeleteServiceRequest) (*emptypb.Empty, error) - // Create a `ServiceLevelObjective` for the given `Service`. - CreateServiceLevelObjective(context.Context, *CreateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) - // Get a `ServiceLevelObjective` by name. - GetServiceLevelObjective(context.Context, *GetServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) - // List the `ServiceLevelObjective`s for the given `Service`. - ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesRequest) (*ListServiceLevelObjectivesResponse, error) - // Update the given `ServiceLevelObjective`. - UpdateServiceLevelObjective(context.Context, *UpdateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) - // Delete the given `ServiceLevelObjective`. - DeleteServiceLevelObjective(context.Context, *DeleteServiceLevelObjectiveRequest) (*emptypb.Empty, error) -} - -// UnimplementedServiceMonitoringServiceServer can be embedded to have forward compatible implementations. -type UnimplementedServiceMonitoringServiceServer struct { -} - -func (*UnimplementedServiceMonitoringServiceServer) CreateService(context.Context, *CreateServiceRequest) (*Service, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateService not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) GetService(context.Context, *GetServiceRequest) (*Service, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) UpdateService(context.Context, *UpdateServiceRequest) (*Service, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateService not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) DeleteService(context.Context, *DeleteServiceRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteService not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) CreateServiceLevelObjective(context.Context, *CreateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateServiceLevelObjective not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) GetServiceLevelObjective(context.Context, *GetServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServiceLevelObjective not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesRequest) (*ListServiceLevelObjectivesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListServiceLevelObjectives not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) UpdateServiceLevelObjective(context.Context, *UpdateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateServiceLevelObjective not implemented") -} -func (*UnimplementedServiceMonitoringServiceServer) DeleteServiceLevelObjective(context.Context, *DeleteServiceLevelObjectiveRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteServiceLevelObjective not implemented") -} - -func RegisterServiceMonitoringServiceServer(s *grpc.Server, srv ServiceMonitoringServiceServer) { - s.RegisterService(&_ServiceMonitoringService_serviceDesc, srv) -} - -func _ServiceMonitoringService_CreateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).CreateService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/CreateService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).CreateService(ctx, req.(*CreateServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).GetService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/GetService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).GetService(ctx, req.(*GetServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListServicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).ListServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/ListServices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).ListServices(ctx, req.(*ListServicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_UpdateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).UpdateService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/UpdateService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).UpdateService(ctx, req.(*UpdateServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_DeleteService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).DeleteService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/DeleteService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).DeleteService(ctx, req.(*DeleteServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_CreateServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateServiceLevelObjectiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).CreateServiceLevelObjective(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).CreateServiceLevelObjective(ctx, req.(*CreateServiceLevelObjectiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_GetServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServiceLevelObjectiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).GetServiceLevelObjective(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).GetServiceLevelObjective(ctx, req.(*GetServiceLevelObjectiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_ListServiceLevelObjectives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListServiceLevelObjectivesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).ListServiceLevelObjectives(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).ListServiceLevelObjectives(ctx, req.(*ListServiceLevelObjectivesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_UpdateServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateServiceLevelObjectiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).UpdateServiceLevelObjective(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).UpdateServiceLevelObjective(ctx, req.(*UpdateServiceLevelObjectiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceMonitoringService_DeleteServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteServiceLevelObjectiveRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceMonitoringServiceServer).DeleteServiceLevelObjective(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceMonitoringServiceServer).DeleteServiceLevelObjective(ctx, req.(*DeleteServiceLevelObjectiveRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ServiceMonitoringService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.ServiceMonitoringService", - HandlerType: (*ServiceMonitoringServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateService", - Handler: _ServiceMonitoringService_CreateService_Handler, - }, - { - MethodName: "GetService", - Handler: _ServiceMonitoringService_GetService_Handler, - }, - { - MethodName: "ListServices", - Handler: _ServiceMonitoringService_ListServices_Handler, - }, - { - MethodName: "UpdateService", - Handler: _ServiceMonitoringService_UpdateService_Handler, - }, - { - MethodName: "DeleteService", - Handler: _ServiceMonitoringService_DeleteService_Handler, - }, - { - MethodName: "CreateServiceLevelObjective", - Handler: _ServiceMonitoringService_CreateServiceLevelObjective_Handler, - }, - { - MethodName: "GetServiceLevelObjective", - Handler: _ServiceMonitoringService_GetServiceLevelObjective_Handler, - }, - { - MethodName: "ListServiceLevelObjectives", - Handler: _ServiceMonitoringService_ListServiceLevelObjectives_Handler, - }, - { - MethodName: "UpdateServiceLevelObjective", - Handler: _ServiceMonitoringService_UpdateServiceLevelObjective_Handler, - }, - { - MethodName: "DeleteServiceLevelObjective", - Handler: _ServiceMonitoringService_DeleteServiceLevelObjective_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/service_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service_grpc.pb.go new file mode 100644 index 0000000000..bd7692b950 --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/service_service_grpc.pb.go @@ -0,0 +1,475 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/service_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ServiceMonitoringService_CreateService_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/CreateService" + ServiceMonitoringService_GetService_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/GetService" + ServiceMonitoringService_ListServices_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/ListServices" + ServiceMonitoringService_UpdateService_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/UpdateService" + ServiceMonitoringService_DeleteService_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/DeleteService" + ServiceMonitoringService_CreateServiceLevelObjective_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective" + ServiceMonitoringService_GetServiceLevelObjective_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective" + ServiceMonitoringService_ListServiceLevelObjectives_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives" + ServiceMonitoringService_UpdateServiceLevelObjective_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective" + ServiceMonitoringService_DeleteServiceLevelObjective_FullMethodName = "/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective" +) + +// ServiceMonitoringServiceClient is the client API for ServiceMonitoringService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServiceMonitoringServiceClient interface { + // Create a `Service`. + CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*Service, error) + // Get the named `Service`. + GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) + // List `Service`s for this Metrics Scope. + ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) + // Update this `Service`. + UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*Service, error) + // Soft delete this `Service`. + DeleteService(ctx context.Context, in *DeleteServiceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Create a `ServiceLevelObjective` for the given `Service`. + CreateServiceLevelObjective(ctx context.Context, in *CreateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) + // Get a `ServiceLevelObjective` by name. + GetServiceLevelObjective(ctx context.Context, in *GetServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) + // List the `ServiceLevelObjective`s for the given `Service`. + ListServiceLevelObjectives(ctx context.Context, in *ListServiceLevelObjectivesRequest, opts ...grpc.CallOption) (*ListServiceLevelObjectivesResponse, error) + // Update the given `ServiceLevelObjective`. + UpdateServiceLevelObjective(ctx context.Context, in *UpdateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) + // Delete the given `ServiceLevelObjective`. + DeleteServiceLevelObjective(ctx context.Context, in *DeleteServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type serviceMonitoringServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewServiceMonitoringServiceClient(cc grpc.ClientConnInterface) ServiceMonitoringServiceClient { + return &serviceMonitoringServiceClient{cc} +} + +func (c *serviceMonitoringServiceClient) CreateService(ctx context.Context, in *CreateServiceRequest, opts ...grpc.CallOption) (*Service, error) { + out := new(Service) + err := c.cc.Invoke(ctx, ServiceMonitoringService_CreateService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) { + out := new(Service) + err := c.cc.Invoke(ctx, ServiceMonitoringService_GetService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { + out := new(ListServicesResponse) + err := c.cc.Invoke(ctx, ServiceMonitoringService_ListServices_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) UpdateService(ctx context.Context, in *UpdateServiceRequest, opts ...grpc.CallOption) (*Service, error) { + out := new(Service) + err := c.cc.Invoke(ctx, ServiceMonitoringService_UpdateService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) DeleteService(ctx context.Context, in *DeleteServiceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ServiceMonitoringService_DeleteService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) CreateServiceLevelObjective(ctx context.Context, in *CreateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { + out := new(ServiceLevelObjective) + err := c.cc.Invoke(ctx, ServiceMonitoringService_CreateServiceLevelObjective_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) GetServiceLevelObjective(ctx context.Context, in *GetServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { + out := new(ServiceLevelObjective) + err := c.cc.Invoke(ctx, ServiceMonitoringService_GetServiceLevelObjective_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) ListServiceLevelObjectives(ctx context.Context, in *ListServiceLevelObjectivesRequest, opts ...grpc.CallOption) (*ListServiceLevelObjectivesResponse, error) { + out := new(ListServiceLevelObjectivesResponse) + err := c.cc.Invoke(ctx, ServiceMonitoringService_ListServiceLevelObjectives_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) UpdateServiceLevelObjective(ctx context.Context, in *UpdateServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*ServiceLevelObjective, error) { + out := new(ServiceLevelObjective) + err := c.cc.Invoke(ctx, ServiceMonitoringService_UpdateServiceLevelObjective_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceMonitoringServiceClient) DeleteServiceLevelObjective(ctx context.Context, in *DeleteServiceLevelObjectiveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ServiceMonitoringService_DeleteServiceLevelObjective_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceMonitoringServiceServer is the server API for ServiceMonitoringService service. +// All implementations should embed UnimplementedServiceMonitoringServiceServer +// for forward compatibility +type ServiceMonitoringServiceServer interface { + // Create a `Service`. + CreateService(context.Context, *CreateServiceRequest) (*Service, error) + // Get the named `Service`. + GetService(context.Context, *GetServiceRequest) (*Service, error) + // List `Service`s for this Metrics Scope. + ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) + // Update this `Service`. + UpdateService(context.Context, *UpdateServiceRequest) (*Service, error) + // Soft delete this `Service`. + DeleteService(context.Context, *DeleteServiceRequest) (*emptypb.Empty, error) + // Create a `ServiceLevelObjective` for the given `Service`. + CreateServiceLevelObjective(context.Context, *CreateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) + // Get a `ServiceLevelObjective` by name. + GetServiceLevelObjective(context.Context, *GetServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) + // List the `ServiceLevelObjective`s for the given `Service`. + ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesRequest) (*ListServiceLevelObjectivesResponse, error) + // Update the given `ServiceLevelObjective`. + UpdateServiceLevelObjective(context.Context, *UpdateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) + // Delete the given `ServiceLevelObjective`. + DeleteServiceLevelObjective(context.Context, *DeleteServiceLevelObjectiveRequest) (*emptypb.Empty, error) +} + +// UnimplementedServiceMonitoringServiceServer should be embedded to have forward compatible implementations. +type UnimplementedServiceMonitoringServiceServer struct { +} + +func (UnimplementedServiceMonitoringServiceServer) CreateService(context.Context, *CreateServiceRequest) (*Service, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateService not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) GetService(context.Context, *GetServiceRequest) (*Service, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) UpdateService(context.Context, *UpdateServiceRequest) (*Service, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateService not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) DeleteService(context.Context, *DeleteServiceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteService not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) CreateServiceLevelObjective(context.Context, *CreateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateServiceLevelObjective not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) GetServiceLevelObjective(context.Context, *GetServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServiceLevelObjective not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesRequest) (*ListServiceLevelObjectivesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListServiceLevelObjectives not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) UpdateServiceLevelObjective(context.Context, *UpdateServiceLevelObjectiveRequest) (*ServiceLevelObjective, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServiceLevelObjective not implemented") +} +func (UnimplementedServiceMonitoringServiceServer) DeleteServiceLevelObjective(context.Context, *DeleteServiceLevelObjectiveRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteServiceLevelObjective not implemented") +} + +// UnsafeServiceMonitoringServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceMonitoringServiceServer will +// result in compilation errors. +type UnsafeServiceMonitoringServiceServer interface { + mustEmbedUnimplementedServiceMonitoringServiceServer() +} + +func RegisterServiceMonitoringServiceServer(s grpc.ServiceRegistrar, srv ServiceMonitoringServiceServer) { + s.RegisterService(&ServiceMonitoringService_ServiceDesc, srv) +} + +func _ServiceMonitoringService_CreateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).CreateService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_CreateService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).CreateService(ctx, req.(*CreateServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).GetService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_GetService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).GetService(ctx, req.(*GetServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).ListServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_ListServices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).ListServices(ctx, req.(*ListServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_UpdateService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).UpdateService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_UpdateService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).UpdateService(ctx, req.(*UpdateServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_DeleteService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).DeleteService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_DeleteService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).DeleteService(ctx, req.(*DeleteServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_CreateServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateServiceLevelObjectiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).CreateServiceLevelObjective(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_CreateServiceLevelObjective_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).CreateServiceLevelObjective(ctx, req.(*CreateServiceLevelObjectiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_GetServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServiceLevelObjectiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).GetServiceLevelObjective(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_GetServiceLevelObjective_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).GetServiceLevelObjective(ctx, req.(*GetServiceLevelObjectiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_ListServiceLevelObjectives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListServiceLevelObjectivesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).ListServiceLevelObjectives(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_ListServiceLevelObjectives_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).ListServiceLevelObjectives(ctx, req.(*ListServiceLevelObjectivesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_UpdateServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServiceLevelObjectiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).UpdateServiceLevelObjective(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_UpdateServiceLevelObjective_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).UpdateServiceLevelObjective(ctx, req.(*UpdateServiceLevelObjectiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceMonitoringService_DeleteServiceLevelObjective_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteServiceLevelObjectiveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceMonitoringServiceServer).DeleteServiceLevelObjective(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServiceMonitoringService_DeleteServiceLevelObjective_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceMonitoringServiceServer).DeleteServiceLevelObjective(ctx, req.(*DeleteServiceLevelObjectiveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ServiceMonitoringService_ServiceDesc is the grpc.ServiceDesc for ServiceMonitoringService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ServiceMonitoringService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.ServiceMonitoringService", + HandlerType: (*ServiceMonitoringServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateService", + Handler: _ServiceMonitoringService_CreateService_Handler, + }, + { + MethodName: "GetService", + Handler: _ServiceMonitoringService_GetService_Handler, + }, + { + MethodName: "ListServices", + Handler: _ServiceMonitoringService_ListServices_Handler, + }, + { + MethodName: "UpdateService", + Handler: _ServiceMonitoringService_UpdateService_Handler, + }, + { + MethodName: "DeleteService", + Handler: _ServiceMonitoringService_DeleteService_Handler, + }, + { + MethodName: "CreateServiceLevelObjective", + Handler: _ServiceMonitoringService_CreateServiceLevelObjective_Handler, + }, + { + MethodName: "GetServiceLevelObjective", + Handler: _ServiceMonitoringService_GetServiceLevelObjective_Handler, + }, + { + MethodName: "ListServiceLevelObjectives", + Handler: _ServiceMonitoringService_ListServiceLevelObjectives_Handler, + }, + { + MethodName: "UpdateServiceLevelObjective", + Handler: _ServiceMonitoringService_UpdateServiceLevelObjective_Handler, + }, + { + MethodName: "DeleteServiceLevelObjective", + Handler: _ServiceMonitoringService_DeleteServiceLevelObjective_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/service_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze.pb.go index 861e045f2d..39a2dc9f98 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze.pb.go @@ -15,18 +15,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/snooze.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go index c562d60bcc..094ab0d01e 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service.pb.go @@ -15,23 +15,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/snooze_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" ) const ( @@ -587,207 +582,3 @@ func file_google_monitoring_v3_snooze_service_proto_init() { file_google_monitoring_v3_snooze_service_proto_goTypes = nil file_google_monitoring_v3_snooze_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SnoozeServiceClient is the client API for SnoozeService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SnoozeServiceClient interface { - // Creates a `Snooze` that will prevent alerts, which match the provided - // criteria, from being opened. The `Snooze` applies for a specific time - // interval. - CreateSnooze(ctx context.Context, in *CreateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) - // Lists the `Snooze`s associated with a project. Can optionally pass in - // `filter`, which specifies predicates to match `Snooze`s. - ListSnoozes(ctx context.Context, in *ListSnoozesRequest, opts ...grpc.CallOption) (*ListSnoozesResponse, error) - // Retrieves a `Snooze` by `name`. - GetSnooze(ctx context.Context, in *GetSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) - // Updates a `Snooze`, identified by its `name`, with the parameters in the - // given `Snooze` object. - UpdateSnooze(ctx context.Context, in *UpdateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) -} - -type snoozeServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSnoozeServiceClient(cc grpc.ClientConnInterface) SnoozeServiceClient { - return &snoozeServiceClient{cc} -} - -func (c *snoozeServiceClient) CreateSnooze(ctx context.Context, in *CreateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { - out := new(Snooze) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.SnoozeService/CreateSnooze", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *snoozeServiceClient) ListSnoozes(ctx context.Context, in *ListSnoozesRequest, opts ...grpc.CallOption) (*ListSnoozesResponse, error) { - out := new(ListSnoozesResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.SnoozeService/ListSnoozes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *snoozeServiceClient) GetSnooze(ctx context.Context, in *GetSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { - out := new(Snooze) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.SnoozeService/GetSnooze", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *snoozeServiceClient) UpdateSnooze(ctx context.Context, in *UpdateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { - out := new(Snooze) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.SnoozeService/UpdateSnooze", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SnoozeServiceServer is the server API for SnoozeService service. -type SnoozeServiceServer interface { - // Creates a `Snooze` that will prevent alerts, which match the provided - // criteria, from being opened. The `Snooze` applies for a specific time - // interval. - CreateSnooze(context.Context, *CreateSnoozeRequest) (*Snooze, error) - // Lists the `Snooze`s associated with a project. Can optionally pass in - // `filter`, which specifies predicates to match `Snooze`s. - ListSnoozes(context.Context, *ListSnoozesRequest) (*ListSnoozesResponse, error) - // Retrieves a `Snooze` by `name`. - GetSnooze(context.Context, *GetSnoozeRequest) (*Snooze, error) - // Updates a `Snooze`, identified by its `name`, with the parameters in the - // given `Snooze` object. - UpdateSnooze(context.Context, *UpdateSnoozeRequest) (*Snooze, error) -} - -// UnimplementedSnoozeServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSnoozeServiceServer struct { -} - -func (*UnimplementedSnoozeServiceServer) CreateSnooze(context.Context, *CreateSnoozeRequest) (*Snooze, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSnooze not implemented") -} -func (*UnimplementedSnoozeServiceServer) ListSnoozes(context.Context, *ListSnoozesRequest) (*ListSnoozesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSnoozes not implemented") -} -func (*UnimplementedSnoozeServiceServer) GetSnooze(context.Context, *GetSnoozeRequest) (*Snooze, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSnooze not implemented") -} -func (*UnimplementedSnoozeServiceServer) UpdateSnooze(context.Context, *UpdateSnoozeRequest) (*Snooze, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSnooze not implemented") -} - -func RegisterSnoozeServiceServer(s *grpc.Server, srv SnoozeServiceServer) { - s.RegisterService(&_SnoozeService_serviceDesc, srv) -} - -func _SnoozeService_CreateSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSnoozeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SnoozeServiceServer).CreateSnooze(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.SnoozeService/CreateSnooze", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnoozeServiceServer).CreateSnooze(ctx, req.(*CreateSnoozeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SnoozeService_ListSnoozes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSnoozesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SnoozeServiceServer).ListSnoozes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.SnoozeService/ListSnoozes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnoozeServiceServer).ListSnoozes(ctx, req.(*ListSnoozesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SnoozeService_GetSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSnoozeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SnoozeServiceServer).GetSnooze(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.SnoozeService/GetSnooze", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnoozeServiceServer).GetSnooze(ctx, req.(*GetSnoozeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SnoozeService_UpdateSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSnoozeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SnoozeServiceServer).UpdateSnooze(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.SnoozeService/UpdateSnooze", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnoozeServiceServer).UpdateSnooze(ctx, req.(*UpdateSnoozeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SnoozeService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.SnoozeService", - HandlerType: (*SnoozeServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateSnooze", - Handler: _SnoozeService_CreateSnooze_Handler, - }, - { - MethodName: "ListSnoozes", - Handler: _SnoozeService_ListSnoozes_Handler, - }, - { - MethodName: "GetSnooze", - Handler: _SnoozeService_GetSnooze_Handler, - }, - { - MethodName: "UpdateSnooze", - Handler: _SnoozeService_UpdateSnooze_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/snooze_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service_grpc.pb.go new file mode 100644 index 0000000000..0b7e4fa924 --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/snooze_service_grpc.pb.go @@ -0,0 +1,248 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/snooze_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SnoozeService_CreateSnooze_FullMethodName = "/google.monitoring.v3.SnoozeService/CreateSnooze" + SnoozeService_ListSnoozes_FullMethodName = "/google.monitoring.v3.SnoozeService/ListSnoozes" + SnoozeService_GetSnooze_FullMethodName = "/google.monitoring.v3.SnoozeService/GetSnooze" + SnoozeService_UpdateSnooze_FullMethodName = "/google.monitoring.v3.SnoozeService/UpdateSnooze" +) + +// SnoozeServiceClient is the client API for SnoozeService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SnoozeServiceClient interface { + // Creates a `Snooze` that will prevent alerts, which match the provided + // criteria, from being opened. The `Snooze` applies for a specific time + // interval. + CreateSnooze(ctx context.Context, in *CreateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) + // Lists the `Snooze`s associated with a project. Can optionally pass in + // `filter`, which specifies predicates to match `Snooze`s. + ListSnoozes(ctx context.Context, in *ListSnoozesRequest, opts ...grpc.CallOption) (*ListSnoozesResponse, error) + // Retrieves a `Snooze` by `name`. + GetSnooze(ctx context.Context, in *GetSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) + // Updates a `Snooze`, identified by its `name`, with the parameters in the + // given `Snooze` object. + UpdateSnooze(ctx context.Context, in *UpdateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) +} + +type snoozeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSnoozeServiceClient(cc grpc.ClientConnInterface) SnoozeServiceClient { + return &snoozeServiceClient{cc} +} + +func (c *snoozeServiceClient) CreateSnooze(ctx context.Context, in *CreateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { + out := new(Snooze) + err := c.cc.Invoke(ctx, SnoozeService_CreateSnooze_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *snoozeServiceClient) ListSnoozes(ctx context.Context, in *ListSnoozesRequest, opts ...grpc.CallOption) (*ListSnoozesResponse, error) { + out := new(ListSnoozesResponse) + err := c.cc.Invoke(ctx, SnoozeService_ListSnoozes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *snoozeServiceClient) GetSnooze(ctx context.Context, in *GetSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { + out := new(Snooze) + err := c.cc.Invoke(ctx, SnoozeService_GetSnooze_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *snoozeServiceClient) UpdateSnooze(ctx context.Context, in *UpdateSnoozeRequest, opts ...grpc.CallOption) (*Snooze, error) { + out := new(Snooze) + err := c.cc.Invoke(ctx, SnoozeService_UpdateSnooze_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SnoozeServiceServer is the server API for SnoozeService service. +// All implementations should embed UnimplementedSnoozeServiceServer +// for forward compatibility +type SnoozeServiceServer interface { + // Creates a `Snooze` that will prevent alerts, which match the provided + // criteria, from being opened. The `Snooze` applies for a specific time + // interval. + CreateSnooze(context.Context, *CreateSnoozeRequest) (*Snooze, error) + // Lists the `Snooze`s associated with a project. Can optionally pass in + // `filter`, which specifies predicates to match `Snooze`s. + ListSnoozes(context.Context, *ListSnoozesRequest) (*ListSnoozesResponse, error) + // Retrieves a `Snooze` by `name`. + GetSnooze(context.Context, *GetSnoozeRequest) (*Snooze, error) + // Updates a `Snooze`, identified by its `name`, with the parameters in the + // given `Snooze` object. + UpdateSnooze(context.Context, *UpdateSnoozeRequest) (*Snooze, error) +} + +// UnimplementedSnoozeServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSnoozeServiceServer struct { +} + +func (UnimplementedSnoozeServiceServer) CreateSnooze(context.Context, *CreateSnoozeRequest) (*Snooze, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSnooze not implemented") +} +func (UnimplementedSnoozeServiceServer) ListSnoozes(context.Context, *ListSnoozesRequest) (*ListSnoozesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSnoozes not implemented") +} +func (UnimplementedSnoozeServiceServer) GetSnooze(context.Context, *GetSnoozeRequest) (*Snooze, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSnooze not implemented") +} +func (UnimplementedSnoozeServiceServer) UpdateSnooze(context.Context, *UpdateSnoozeRequest) (*Snooze, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSnooze not implemented") +} + +// UnsafeSnoozeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SnoozeServiceServer will +// result in compilation errors. +type UnsafeSnoozeServiceServer interface { + mustEmbedUnimplementedSnoozeServiceServer() +} + +func RegisterSnoozeServiceServer(s grpc.ServiceRegistrar, srv SnoozeServiceServer) { + s.RegisterService(&SnoozeService_ServiceDesc, srv) +} + +func _SnoozeService_CreateSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSnoozeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnoozeServiceServer).CreateSnooze(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SnoozeService_CreateSnooze_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnoozeServiceServer).CreateSnooze(ctx, req.(*CreateSnoozeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SnoozeService_ListSnoozes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSnoozesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnoozeServiceServer).ListSnoozes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SnoozeService_ListSnoozes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnoozeServiceServer).ListSnoozes(ctx, req.(*ListSnoozesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SnoozeService_GetSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSnoozeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnoozeServiceServer).GetSnooze(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SnoozeService_GetSnooze_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnoozeServiceServer).GetSnooze(ctx, req.(*GetSnoozeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SnoozeService_UpdateSnooze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSnoozeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnoozeServiceServer).UpdateSnooze(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SnoozeService_UpdateSnooze_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnoozeServiceServer).UpdateSnooze(ctx, req.(*UpdateSnoozeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SnoozeService_ServiceDesc is the grpc.ServiceDesc for SnoozeService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SnoozeService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.SnoozeService", + HandlerType: (*SnoozeServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateSnooze", + Handler: _SnoozeService_CreateSnooze_Handler, + }, + { + MethodName: "ListSnoozes", + Handler: _SnoozeService_ListSnoozes_Handler, + }, + { + MethodName: "GetSnooze", + Handler: _SnoozeService_GetSnooze_Handler, + }, + { + MethodName: "UpdateSnooze", + Handler: _SnoozeService_UpdateSnooze_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/snooze_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/span_context.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/span_context.pb.go index 23f42835f1..b933261241 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/span_context.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/span_context.pb.go @@ -15,17 +15,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/span_context.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime.pb.go index f303ac2515..2e0fb6420a 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime.pb.go @@ -15,20 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/uptime.proto package monitoringpb import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" monitoredres "google.golang.org/genproto/googleapis/api/monitoredres" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" ) const ( diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go index 9ea159bbd2..1ff646bc56 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service.pb.go @@ -15,24 +15,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 -// protoc v4.25.3 +// protoc v4.25.7 // source: google/monitoring/v3/uptime_service.proto package monitoringpb import ( - context "context" - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" ) const ( @@ -826,287 +821,3 @@ func file_google_monitoring_v3_uptime_service_proto_init() { file_google_monitoring_v3_uptime_service_proto_goTypes = nil file_google_monitoring_v3_uptime_service_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// UptimeCheckServiceClient is the client API for UptimeCheckService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type UptimeCheckServiceClient interface { - // Lists the existing valid Uptime check configurations for the project - // (leaving out any invalid configurations). - ListUptimeCheckConfigs(ctx context.Context, in *ListUptimeCheckConfigsRequest, opts ...grpc.CallOption) (*ListUptimeCheckConfigsResponse, error) - // Gets a single Uptime check configuration. - GetUptimeCheckConfig(ctx context.Context, in *GetUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) - // Creates a new Uptime check configuration. - CreateUptimeCheckConfig(ctx context.Context, in *CreateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) - // Updates an Uptime check configuration. You can either replace the entire - // configuration with a new one or replace only certain fields in the current - // configuration by specifying the fields to be updated via `updateMask`. - // Returns the updated configuration. - UpdateUptimeCheckConfig(ctx context.Context, in *UpdateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) - // Deletes an Uptime check configuration. Note that this method will fail - // if the Uptime check configuration is referenced by an alert policy or - // other dependent configs that would be rendered invalid by the deletion. - DeleteUptimeCheckConfig(ctx context.Context, in *DeleteUptimeCheckConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Returns the list of IP addresses that checkers run from. - ListUptimeCheckIps(ctx context.Context, in *ListUptimeCheckIpsRequest, opts ...grpc.CallOption) (*ListUptimeCheckIpsResponse, error) -} - -type uptimeCheckServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewUptimeCheckServiceClient(cc grpc.ClientConnInterface) UptimeCheckServiceClient { - return &uptimeCheckServiceClient{cc} -} - -func (c *uptimeCheckServiceClient) ListUptimeCheckConfigs(ctx context.Context, in *ListUptimeCheckConfigsRequest, opts ...grpc.CallOption) (*ListUptimeCheckConfigsResponse, error) { - out := new(ListUptimeCheckConfigsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *uptimeCheckServiceClient) GetUptimeCheckConfig(ctx context.Context, in *GetUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { - out := new(UptimeCheckConfig) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *uptimeCheckServiceClient) CreateUptimeCheckConfig(ctx context.Context, in *CreateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { - out := new(UptimeCheckConfig) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *uptimeCheckServiceClient) UpdateUptimeCheckConfig(ctx context.Context, in *UpdateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { - out := new(UptimeCheckConfig) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *uptimeCheckServiceClient) DeleteUptimeCheckConfig(ctx context.Context, in *DeleteUptimeCheckConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *uptimeCheckServiceClient) ListUptimeCheckIps(ctx context.Context, in *ListUptimeCheckIpsRequest, opts ...grpc.CallOption) (*ListUptimeCheckIpsResponse, error) { - out := new(ListUptimeCheckIpsResponse) - err := c.cc.Invoke(ctx, "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UptimeCheckServiceServer is the server API for UptimeCheckService service. -type UptimeCheckServiceServer interface { - // Lists the existing valid Uptime check configurations for the project - // (leaving out any invalid configurations). - ListUptimeCheckConfigs(context.Context, *ListUptimeCheckConfigsRequest) (*ListUptimeCheckConfigsResponse, error) - // Gets a single Uptime check configuration. - GetUptimeCheckConfig(context.Context, *GetUptimeCheckConfigRequest) (*UptimeCheckConfig, error) - // Creates a new Uptime check configuration. - CreateUptimeCheckConfig(context.Context, *CreateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) - // Updates an Uptime check configuration. You can either replace the entire - // configuration with a new one or replace only certain fields in the current - // configuration by specifying the fields to be updated via `updateMask`. - // Returns the updated configuration. - UpdateUptimeCheckConfig(context.Context, *UpdateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) - // Deletes an Uptime check configuration. Note that this method will fail - // if the Uptime check configuration is referenced by an alert policy or - // other dependent configs that would be rendered invalid by the deletion. - DeleteUptimeCheckConfig(context.Context, *DeleteUptimeCheckConfigRequest) (*emptypb.Empty, error) - // Returns the list of IP addresses that checkers run from. - ListUptimeCheckIps(context.Context, *ListUptimeCheckIpsRequest) (*ListUptimeCheckIpsResponse, error) -} - -// UnimplementedUptimeCheckServiceServer can be embedded to have forward compatible implementations. -type UnimplementedUptimeCheckServiceServer struct { -} - -func (*UnimplementedUptimeCheckServiceServer) ListUptimeCheckConfigs(context.Context, *ListUptimeCheckConfigsRequest) (*ListUptimeCheckConfigsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListUptimeCheckConfigs not implemented") -} -func (*UnimplementedUptimeCheckServiceServer) GetUptimeCheckConfig(context.Context, *GetUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUptimeCheckConfig not implemented") -} -func (*UnimplementedUptimeCheckServiceServer) CreateUptimeCheckConfig(context.Context, *CreateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateUptimeCheckConfig not implemented") -} -func (*UnimplementedUptimeCheckServiceServer) UpdateUptimeCheckConfig(context.Context, *UpdateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateUptimeCheckConfig not implemented") -} -func (*UnimplementedUptimeCheckServiceServer) DeleteUptimeCheckConfig(context.Context, *DeleteUptimeCheckConfigRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteUptimeCheckConfig not implemented") -} -func (*UnimplementedUptimeCheckServiceServer) ListUptimeCheckIps(context.Context, *ListUptimeCheckIpsRequest) (*ListUptimeCheckIpsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListUptimeCheckIps not implemented") -} - -func RegisterUptimeCheckServiceServer(s *grpc.Server, srv UptimeCheckServiceServer) { - s.RegisterService(&_UptimeCheckService_serviceDesc, srv) -} - -func _UptimeCheckService_ListUptimeCheckConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListUptimeCheckConfigsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).ListUptimeCheckConfigs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).ListUptimeCheckConfigs(ctx, req.(*ListUptimeCheckConfigsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UptimeCheckService_GetUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUptimeCheckConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).GetUptimeCheckConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).GetUptimeCheckConfig(ctx, req.(*GetUptimeCheckConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UptimeCheckService_CreateUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateUptimeCheckConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).CreateUptimeCheckConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).CreateUptimeCheckConfig(ctx, req.(*CreateUptimeCheckConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UptimeCheckService_UpdateUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUptimeCheckConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).UpdateUptimeCheckConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).UpdateUptimeCheckConfig(ctx, req.(*UpdateUptimeCheckConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UptimeCheckService_DeleteUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUptimeCheckConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).DeleteUptimeCheckConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).DeleteUptimeCheckConfig(ctx, req.(*DeleteUptimeCheckConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UptimeCheckService_ListUptimeCheckIps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListUptimeCheckIpsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UptimeCheckServiceServer).ListUptimeCheckIps(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UptimeCheckServiceServer).ListUptimeCheckIps(ctx, req.(*ListUptimeCheckIpsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _UptimeCheckService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.monitoring.v3.UptimeCheckService", - HandlerType: (*UptimeCheckServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListUptimeCheckConfigs", - Handler: _UptimeCheckService_ListUptimeCheckConfigs_Handler, - }, - { - MethodName: "GetUptimeCheckConfig", - Handler: _UptimeCheckService_GetUptimeCheckConfig_Handler, - }, - { - MethodName: "CreateUptimeCheckConfig", - Handler: _UptimeCheckService_CreateUptimeCheckConfig_Handler, - }, - { - MethodName: "UpdateUptimeCheckConfig", - Handler: _UptimeCheckService_UpdateUptimeCheckConfig_Handler, - }, - { - MethodName: "DeleteUptimeCheckConfig", - Handler: _UptimeCheckService_DeleteUptimeCheckConfig_Handler, - }, - { - MethodName: "ListUptimeCheckIps", - Handler: _UptimeCheckService_ListUptimeCheckIps_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "google/monitoring/v3/uptime_service.proto", -} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service_grpc.pb.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service_grpc.pb.go new file mode 100644 index 0000000000..4fd7c67a3f --- /dev/null +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/monitoringpb/uptime_service_grpc.pb.go @@ -0,0 +1,331 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/monitoring/v3/uptime_service.proto + +package monitoringpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + UptimeCheckService_ListUptimeCheckConfigs_FullMethodName = "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs" + UptimeCheckService_GetUptimeCheckConfig_FullMethodName = "/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig" + UptimeCheckService_CreateUptimeCheckConfig_FullMethodName = "/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig" + UptimeCheckService_UpdateUptimeCheckConfig_FullMethodName = "/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig" + UptimeCheckService_DeleteUptimeCheckConfig_FullMethodName = "/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig" + UptimeCheckService_ListUptimeCheckIps_FullMethodName = "/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps" +) + +// UptimeCheckServiceClient is the client API for UptimeCheckService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type UptimeCheckServiceClient interface { + // Lists the existing valid Uptime check configurations for the project + // (leaving out any invalid configurations). + ListUptimeCheckConfigs(ctx context.Context, in *ListUptimeCheckConfigsRequest, opts ...grpc.CallOption) (*ListUptimeCheckConfigsResponse, error) + // Gets a single Uptime check configuration. + GetUptimeCheckConfig(ctx context.Context, in *GetUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) + // Creates a new Uptime check configuration. + CreateUptimeCheckConfig(ctx context.Context, in *CreateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) + // Updates an Uptime check configuration. You can either replace the entire + // configuration with a new one or replace only certain fields in the current + // configuration by specifying the fields to be updated via `updateMask`. + // Returns the updated configuration. + UpdateUptimeCheckConfig(ctx context.Context, in *UpdateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) + // Deletes an Uptime check configuration. Note that this method will fail + // if the Uptime check configuration is referenced by an alert policy or + // other dependent configs that would be rendered invalid by the deletion. + DeleteUptimeCheckConfig(ctx context.Context, in *DeleteUptimeCheckConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns the list of IP addresses that checkers run from. + ListUptimeCheckIps(ctx context.Context, in *ListUptimeCheckIpsRequest, opts ...grpc.CallOption) (*ListUptimeCheckIpsResponse, error) +} + +type uptimeCheckServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUptimeCheckServiceClient(cc grpc.ClientConnInterface) UptimeCheckServiceClient { + return &uptimeCheckServiceClient{cc} +} + +func (c *uptimeCheckServiceClient) ListUptimeCheckConfigs(ctx context.Context, in *ListUptimeCheckConfigsRequest, opts ...grpc.CallOption) (*ListUptimeCheckConfigsResponse, error) { + out := new(ListUptimeCheckConfigsResponse) + err := c.cc.Invoke(ctx, UptimeCheckService_ListUptimeCheckConfigs_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *uptimeCheckServiceClient) GetUptimeCheckConfig(ctx context.Context, in *GetUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { + out := new(UptimeCheckConfig) + err := c.cc.Invoke(ctx, UptimeCheckService_GetUptimeCheckConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *uptimeCheckServiceClient) CreateUptimeCheckConfig(ctx context.Context, in *CreateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { + out := new(UptimeCheckConfig) + err := c.cc.Invoke(ctx, UptimeCheckService_CreateUptimeCheckConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *uptimeCheckServiceClient) UpdateUptimeCheckConfig(ctx context.Context, in *UpdateUptimeCheckConfigRequest, opts ...grpc.CallOption) (*UptimeCheckConfig, error) { + out := new(UptimeCheckConfig) + err := c.cc.Invoke(ctx, UptimeCheckService_UpdateUptimeCheckConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *uptimeCheckServiceClient) DeleteUptimeCheckConfig(ctx context.Context, in *DeleteUptimeCheckConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, UptimeCheckService_DeleteUptimeCheckConfig_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *uptimeCheckServiceClient) ListUptimeCheckIps(ctx context.Context, in *ListUptimeCheckIpsRequest, opts ...grpc.CallOption) (*ListUptimeCheckIpsResponse, error) { + out := new(ListUptimeCheckIpsResponse) + err := c.cc.Invoke(ctx, UptimeCheckService_ListUptimeCheckIps_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UptimeCheckServiceServer is the server API for UptimeCheckService service. +// All implementations should embed UnimplementedUptimeCheckServiceServer +// for forward compatibility +type UptimeCheckServiceServer interface { + // Lists the existing valid Uptime check configurations for the project + // (leaving out any invalid configurations). + ListUptimeCheckConfigs(context.Context, *ListUptimeCheckConfigsRequest) (*ListUptimeCheckConfigsResponse, error) + // Gets a single Uptime check configuration. + GetUptimeCheckConfig(context.Context, *GetUptimeCheckConfigRequest) (*UptimeCheckConfig, error) + // Creates a new Uptime check configuration. + CreateUptimeCheckConfig(context.Context, *CreateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) + // Updates an Uptime check configuration. You can either replace the entire + // configuration with a new one or replace only certain fields in the current + // configuration by specifying the fields to be updated via `updateMask`. + // Returns the updated configuration. + UpdateUptimeCheckConfig(context.Context, *UpdateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) + // Deletes an Uptime check configuration. Note that this method will fail + // if the Uptime check configuration is referenced by an alert policy or + // other dependent configs that would be rendered invalid by the deletion. + DeleteUptimeCheckConfig(context.Context, *DeleteUptimeCheckConfigRequest) (*emptypb.Empty, error) + // Returns the list of IP addresses that checkers run from. + ListUptimeCheckIps(context.Context, *ListUptimeCheckIpsRequest) (*ListUptimeCheckIpsResponse, error) +} + +// UnimplementedUptimeCheckServiceServer should be embedded to have forward compatible implementations. +type UnimplementedUptimeCheckServiceServer struct { +} + +func (UnimplementedUptimeCheckServiceServer) ListUptimeCheckConfigs(context.Context, *ListUptimeCheckConfigsRequest) (*ListUptimeCheckConfigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUptimeCheckConfigs not implemented") +} +func (UnimplementedUptimeCheckServiceServer) GetUptimeCheckConfig(context.Context, *GetUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUptimeCheckConfig not implemented") +} +func (UnimplementedUptimeCheckServiceServer) CreateUptimeCheckConfig(context.Context, *CreateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateUptimeCheckConfig not implemented") +} +func (UnimplementedUptimeCheckServiceServer) UpdateUptimeCheckConfig(context.Context, *UpdateUptimeCheckConfigRequest) (*UptimeCheckConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUptimeCheckConfig not implemented") +} +func (UnimplementedUptimeCheckServiceServer) DeleteUptimeCheckConfig(context.Context, *DeleteUptimeCheckConfigRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteUptimeCheckConfig not implemented") +} +func (UnimplementedUptimeCheckServiceServer) ListUptimeCheckIps(context.Context, *ListUptimeCheckIpsRequest) (*ListUptimeCheckIpsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUptimeCheckIps not implemented") +} + +// UnsafeUptimeCheckServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UptimeCheckServiceServer will +// result in compilation errors. +type UnsafeUptimeCheckServiceServer interface { + mustEmbedUnimplementedUptimeCheckServiceServer() +} + +func RegisterUptimeCheckServiceServer(s grpc.ServiceRegistrar, srv UptimeCheckServiceServer) { + s.RegisterService(&UptimeCheckService_ServiceDesc, srv) +} + +func _UptimeCheckService_ListUptimeCheckConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUptimeCheckConfigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).ListUptimeCheckConfigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_ListUptimeCheckConfigs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).ListUptimeCheckConfigs(ctx, req.(*ListUptimeCheckConfigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UptimeCheckService_GetUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUptimeCheckConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).GetUptimeCheckConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_GetUptimeCheckConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).GetUptimeCheckConfig(ctx, req.(*GetUptimeCheckConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UptimeCheckService_CreateUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateUptimeCheckConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).CreateUptimeCheckConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_CreateUptimeCheckConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).CreateUptimeCheckConfig(ctx, req.(*CreateUptimeCheckConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UptimeCheckService_UpdateUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUptimeCheckConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).UpdateUptimeCheckConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_UpdateUptimeCheckConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).UpdateUptimeCheckConfig(ctx, req.(*UpdateUptimeCheckConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UptimeCheckService_DeleteUptimeCheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUptimeCheckConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).DeleteUptimeCheckConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_DeleteUptimeCheckConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).DeleteUptimeCheckConfig(ctx, req.(*DeleteUptimeCheckConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UptimeCheckService_ListUptimeCheckIps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUptimeCheckIpsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UptimeCheckServiceServer).ListUptimeCheckIps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UptimeCheckService_ListUptimeCheckIps_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UptimeCheckServiceServer).ListUptimeCheckIps(ctx, req.(*ListUptimeCheckIpsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UptimeCheckService_ServiceDesc is the grpc.ServiceDesc for UptimeCheckService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UptimeCheckService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.monitoring.v3.UptimeCheckService", + HandlerType: (*UptimeCheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListUptimeCheckConfigs", + Handler: _UptimeCheckService_ListUptimeCheckConfigs_Handler, + }, + { + MethodName: "GetUptimeCheckConfig", + Handler: _UptimeCheckService_GetUptimeCheckConfig_Handler, + }, + { + MethodName: "CreateUptimeCheckConfig", + Handler: _UptimeCheckService_CreateUptimeCheckConfig_Handler, + }, + { + MethodName: "UpdateUptimeCheckConfig", + Handler: _UptimeCheckService_UpdateUptimeCheckConfig_Handler, + }, + { + MethodName: "DeleteUptimeCheckConfig", + Handler: _UptimeCheckService_DeleteUptimeCheckConfig_Handler, + }, + { + MethodName: "ListUptimeCheckIps", + Handler: _UptimeCheckService_ListUptimeCheckIps_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/monitoring/v3/uptime_service.proto", +} diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/notification_channel_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/notification_channel_client.go index 3b36b219e5..6eac8ffe5e 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/notification_channel_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/notification_channel_client.go @@ -381,7 +381,7 @@ func (c *notificationChannelGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *notificationChannelGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/query_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/query_client.go index f792f2bd7e..97fb19974d 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/query_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/query_client.go @@ -183,7 +183,7 @@ func (c *queryGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *queryGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/service_monitoring_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/service_monitoring_client.go index 7dc66e3730..580f76a2a2 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/service_monitoring_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/service_monitoring_client.go @@ -328,7 +328,7 @@ func (c *serviceMonitoringGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *serviceMonitoringGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/snooze_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/snooze_client.go index 5b76a486bb..52f36302fa 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/snooze_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/snooze_client.go @@ -234,7 +234,7 @@ func (c *snoozeGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *snoozeGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/apiv3/v2/uptime_check_client.go b/vendor/cloud.google.com/go/monitoring/apiv3/v2/uptime_check_client.go index df0ec29575..7e2aed8c80 100644 --- a/vendor/cloud.google.com/go/monitoring/apiv3/v2/uptime_check_client.go +++ b/vendor/cloud.google.com/go/monitoring/apiv3/v2/uptime_check_client.go @@ -284,7 +284,7 @@ func (c *uptimeCheckGRPCClient) Connection() *grpc.ClientConn { // use by Google-written clients. func (c *uptimeCheckGRPCClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", gax.GoVersion}, keyval...) - kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) c.xGoogHeaders = []string{ "x-goog-api-client", gax.XGoogHeader(kv...), } diff --git a/vendor/cloud.google.com/go/monitoring/internal/version.go b/vendor/cloud.google.com/go/monitoring/internal/version.go index e199c1168a..e68e821943 100644 --- a/vendor/cloud.google.com/go/monitoring/internal/version.go +++ b/vendor/cloud.google.com/go/monitoring/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.24.2" +const Version = "1.24.3" diff --git a/vendor/cloud.google.com/go/release-please-config-individual.json b/vendor/cloud.google.com/go/release-please-config-individual.json index 2178531498..32ea9f8208 100644 --- a/vendor/cloud.google.com/go/release-please-config-individual.json +++ b/vendor/cloud.google.com/go/release-please-config-individual.json @@ -12,12 +12,8 @@ "component": "auth/oauth2adapt" }, "bigquery": { - "component": "bigquery" - }, - "bigquery/v2": { - "component": "bigquery/v2", - "prerelease": true, - "prerelease-type": "alpha" + "component": "bigquery", + "exclude-paths": ["bigquery/v2"] }, "bigtable": { "component": "bigtable" @@ -38,7 +34,8 @@ "component": "profiler" }, "pubsub": { - "component": "pubsub" + "component": "pubsub", + "exclude-paths": ["pubsub/v2"] }, "pubsub/v2": { "component": "pubsub/v2" diff --git a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json index f4e9d103d6..a0b13db025 100644 --- a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json +++ b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json @@ -81,6 +81,9 @@ "binaryauthorization": { "component": "binaryauthorization" }, + "capacityplanner": { + "component": "capacityplanner" + }, "certificatemanager": { "component": "certificatemanager" }, @@ -180,9 +183,6 @@ "discoveryengine": { "component": "discoveryengine" }, - "dlp": { - "component": "dlp" - }, "documentai": { "component": "documentai" }, @@ -210,6 +210,9 @@ "functions": { "component": "functions" }, + "geminidataanalytics": { + "component": "geminidataanalytics" + }, "gkebackup": { "component": "gkebackup" }, @@ -255,6 +258,9 @@ "lifesciences": { "component": "lifesciences" }, + "locationfinder": { + "component": "locationfinder" + }, "longrunning": { "component": "longrunning" }, diff --git a/vendor/cloud.google.com/go/storage/.repo-metadata.json b/vendor/cloud.google.com/go/storage/.repo-metadata.json new file mode 100644 index 0000000000..3eed725e33 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "storage", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest", + "client_library_type": "manual", + "description": "Cloud Storage (GCS)", + "distribution_name": "cloud.google.com/go/storage", + "language": "go", + "library_type": "GAPIC_MANUAL", + "release_level": "stable" +} diff --git a/vendor/cloud.google.com/go/storage/CHANGES.md b/vendor/cloud.google.com/go/storage/CHANGES.md index c4872fbebb..2490359359 100644 --- a/vendor/cloud.google.com/go/storage/CHANGES.md +++ b/vendor/cloud.google.com/go/storage/CHANGES.md @@ -1,6 +1,40 @@ # Changes +## [1.58.0](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.58.0) (2025-12-03) + +### Features + +* calculate crc32c by default and pass checksum in trailing and per-chunk request (#13205) ([2ab1c77](https://github.com/googleapis/google-cloud-go/commit/2ab1c77826f2d9c9d02b977296a78cf0ba3bd8bf)) +* add support for partial success in ListBuckets (#13320) ([d91e47f](https://github.com/googleapis/google-cloud-go/commit/d91e47f2fc91a95ad4fd54e574b371e172a3889b)) +* add object contexts in Go GCS SDK (#13390) ([079c4d9](https://github.com/googleapis/google-cloud-go/commit/079c4d960a2bafa5d170e2b1c97b00ea8b7917d9)) + +### Bug Fixes + +* omit empty filter in http list object request (#13434) ([377eb13](https://github.com/googleapis/google-cloud-go/commit/377eb13bbadb4f455fac61c500f50ba9057890d4)) + +## [1.57.2](https://github.com/googleapis/google-cloud-go/releases/tag/storage%2Fv1.57.2) (2025-11-14) + +### Bug Fixes + +* Handle redirect on takeover. (#13354) ([b0f1362](https://github.com/googleapis/google-cloud-go/commit/b0f136268be1e4c629e288353bc277549ac5c663)) +* add env var to allow disabling bound token (#13236) ([cdaf6a6](https://github.com/googleapis/google-cloud-go/commit/cdaf6a6da006a19db932a74885ea3722b4e42311)) + +### Documentation + +* updates to docs and docs formatting ([93ca68d](https://github.com/googleapis/google-cloud-go/commit/93ca68d54b6d213f22e0d67ae01d135cf26d37c6)) + +## [1.57.1](https://github.com/googleapis/google-cloud-go/compare/storage/v1.57.0...storage/v1.57.1) (2025-10-28) + + +### Bug Fixes +* **storage:** Takeover idempotence ([#13230](https://github.com/googleapis/google-cloud-go/issues/13230)) ([cc5d2a1](https://github.com/googleapis/google-cloud-go/commit/cc5d2a12293a509a14da9bea8a86c8655eaf4a71)) +* **storage:** Copy metadata when using Copier with grpc ([#12919](https://github.com/googleapis/google-cloud-go/issues/12919)) ([57a2e80](https://github.com/googleapis/google-cloud-go/commit/57a2e804f690ec8d4c55fd1c73b0dafd5cff46e5)) +* **storage:** Fix takeover response handling ([#13239](https://github.com/googleapis/google-cloud-go/issues/13239)) ([26d75bc](https://github.com/googleapis/google-cloud-go/commit/26d75bc08e242348d26691877aba7fa68cf30f7f)) +* **storage:** Remove default timeout for gRPC operations ([#13022](https://github.com/googleapis/google-cloud-go/issues/13022)) ([b94c3ba](https://github.com/googleapis/google-cloud-go/commit/b94c3ba69994d9c56ae8f302449dd8df6f287296)) +* **storage:** Skip download of file outside of target dir ([#12945](https://github.com/googleapis/google-cloud-go/issues/12945)) ([6259aee](https://github.com/googleapis/google-cloud-go/commit/6259aeec393d0d996961cac38396daa57ad1a290)) +* **storage:** Upgrade gRPC service registration func ([8fffca2](https://github.com/googleapis/google-cloud-go/commit/8fffca2819fa3dc858c213aa0c503e0df331b084)) + ## [1.57.0](https://github.com/googleapis/google-cloud-go/compare/storage/v1.56.1...storage/v1.57.0) (2025-09-23) diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go index a8e56ed173..509d8693cf 100644 --- a/vendor/cloud.google.com/go/storage/bucket.go +++ b/vendor/cloud.google.com/go/storage/bucket.go @@ -2331,6 +2331,11 @@ func (it *ObjectIterator) Next() (*ObjectAttrs, error) { // whose names begin with the prefix. By default, all buckets in the project // are returned. // +// To receive a partial list of buckets when some are unavailable, set the +// iterator's ReturnPartialSuccess field to true. You can then call the +// iterator's Unreachable method to retrieve the names of the unreachable +// buckets. +// // Note: The returned iterator is not safe for concurrent operations without explicit synchronization. func (c *Client) Buckets(ctx context.Context, projectID string) *BucketIterator { o := makeStorageOpts(true, c.retry, "") @@ -2343,12 +2348,24 @@ func (c *Client) Buckets(ctx context.Context, projectID string) *BucketIterator type BucketIterator struct { // Prefix restricts the iterator to buckets whose names begin with it. Prefix string - - ctx context.Context - projectID string - buckets []*BucketAttrs - pageInfo *iterator.PageInfo - nextFunc func() error + // If true, the iterator will return a partial result of buckets even if + // some buckets are unreachable. Call the Unreachable() method to retrieve the + // list of unreachable buckets. By default (false), the iterator will return + // an error if any buckets are unreachable. + ReturnPartialSuccess bool + + ctx context.Context + projectID string + buckets []*BucketAttrs + unreachable []string + pageInfo *iterator.PageInfo + nextFunc func() error +} + +// Unreachable returns a list of bucket names that could not be reached +// during the iteration if ReturnPartialSuccess was set to true. +func (it *BucketIterator) Unreachable() []string { + return it.unreachable } // Next returns the next result. Its second return value is iterator.Done if diff --git a/vendor/cloud.google.com/go/storage/client.go b/vendor/cloud.google.com/go/storage/client.go index 3e4aceaeb0..8af94b902a 100644 --- a/vendor/cloud.google.com/go/storage/client.go +++ b/vendor/cloud.google.com/go/storage/client.go @@ -265,6 +265,9 @@ type openWriterParams struct { // sendCRC32C - see `Writer.SendCRC32C`. // Optional. sendCRC32C bool + // disableAutoChecksum - see `Writer.DisableAutoChecksum`. + // Optional. + disableAutoChecksum bool // append - Write with appendable object semantics. // Optional. append bool diff --git a/vendor/cloud.google.com/go/storage/contexts.go b/vendor/cloud.google.com/go/storage/contexts.go new file mode 100644 index 0000000000..06ace64a55 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/contexts.go @@ -0,0 +1,115 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +import ( + "time" + + "cloud.google.com/go/storage/internal/apiv2/storagepb" + raw "google.golang.org/api/storage/v1" +) + +// ObjectContexts is a container for custom object contexts. +type ObjectContexts struct { + Custom map[string]ObjectCustomContextPayload +} + +// ObjectCustomContextPayload holds the value of a user-defined object context and +// other metadata. To delete a key from Custom object contexts, set Delete as true. +type ObjectCustomContextPayload struct { + Value string + Delete bool + // Read-only fields. Any updates to CreateTime and UpdateTime will be ignored. + // These fields are handled by the server. + CreateTime time.Time + UpdateTime time.Time +} + +// toContexts converts the raw library's ObjectContexts type to the object contexts. +func toObjectContexts(c *raw.ObjectContexts) *ObjectContexts { + if c == nil { + return nil + } + customContexts := make(map[string]ObjectCustomContextPayload, len(c.Custom)) + for k, v := range c.Custom { + customContexts[k] = ObjectCustomContextPayload{ + Value: v.Value, + CreateTime: convertTime(v.CreateTime), + UpdateTime: convertTime(v.UpdateTime), + } + } + return &ObjectContexts{ + Custom: customContexts, + } +} + +// toRawObjectContexts converts the object contexts to the raw library's ObjectContexts type. +func toRawObjectContexts(c *ObjectContexts) *raw.ObjectContexts { + if c == nil { + return nil + } + customContexts := make(map[string]raw.ObjectCustomContextPayload) + for k, v := range c.Custom { + if v.Delete { + // If Delete is true, populate null fields to signify deletion. + customContexts[k] = raw.ObjectCustomContextPayload{NullFields: []string{k}} + } else { + customContexts[k] = raw.ObjectCustomContextPayload{ + Value: v.Value, + ForceSendFields: []string{k}, + } + } + } + return &raw.ObjectContexts{ + Custom: customContexts, + } +} + +func toObjectContextsFromProto(c *storagepb.ObjectContexts) *ObjectContexts { + if c == nil { + return nil + } + customContexts := make(map[string]ObjectCustomContextPayload, len(c.GetCustom())) + for k, v := range c.GetCustom() { + customContexts[k] = ObjectCustomContextPayload{ + Value: v.GetValue(), + CreateTime: v.GetCreateTime().AsTime(), + UpdateTime: v.GetUpdateTime().AsTime(), + } + } + return &ObjectContexts{ + Custom: customContexts, + } +} + +func toProtoObjectContexts(c *ObjectContexts) *storagepb.ObjectContexts { + if c == nil { + return nil + } + customContexts := make(map[string]*storagepb.ObjectCustomContextPayload) + for k, v := range c.Custom { + // To delete a key, it is added to gRPC fieldMask and with an empty value + // in gRPC request body. Hence, the key is skipped here in customContexts map. + // See grpcStorageClient.UpdateObject method for more details. + if !v.Delete { + customContexts[k] = &storagepb.ObjectCustomContextPayload{ + Value: v.Value, + } + } + } + return &storagepb.ObjectContexts{ + Custom: customContexts, + } +} diff --git a/vendor/cloud.google.com/go/storage/copy.go b/vendor/cloud.google.com/go/storage/copy.go index a0b9a2683c..d10e377ffe 100644 --- a/vendor/cloud.google.com/go/storage/copy.go +++ b/vendor/cloud.google.com/go/storage/copy.go @@ -18,8 +18,6 @@ import ( "context" "errors" "fmt" - - "cloud.google.com/go/internal/trace" ) // CopierFrom creates a Copier that can copy src to dst. @@ -82,8 +80,8 @@ type Copier struct { // Run performs the copy. func (c *Copier) Run(ctx context.Context) (attrs *ObjectAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Copier.Run") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Copier.Run") + defer func() { endSpan(ctx, err) }() if err := c.src.validate(); err != nil { return nil, err @@ -180,8 +178,8 @@ type Composer struct { // Run performs the compose operation. func (c *Composer) Run(ctx context.Context) (attrs *ObjectAttrs, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Composer.Run") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "Composer.Run") + defer func() { endSpan(ctx, err) }() if err := c.dst.validate(); err != nil { return nil, err diff --git a/vendor/cloud.google.com/go/storage/grpc_client.go b/vendor/cloud.google.com/go/storage/grpc_client.go index 15de38df7a..7dc3d0a189 100644 --- a/vendor/cloud.google.com/go/storage/grpc_client.go +++ b/vendor/cloud.google.com/go/storage/grpc_client.go @@ -23,10 +23,10 @@ import ( "io" "log" "os" + "strconv" "sync" "cloud.google.com/go/iam/apiv1/iampb" - "cloud.google.com/go/internal/trace" gapic "cloud.google.com/go/storage/internal/apiv2" "cloud.google.com/go/storage/internal/apiv2/storagepb" "github.com/googleapis/gax-go/v2" @@ -102,8 +102,10 @@ func defaultGRPCOptions() []option.ClientOption { defaults = append(defaults, internaloption.AllowNonDefaultServiceAccount(true), internaloption.EnableDirectPath(true), - internaloption.EnableDirectPathXds(), - internaloption.AllowHardBoundTokens("ALTS")) + internaloption.EnableDirectPathXds()) + if disableBoundToken, _ := strconv.ParseBool(os.Getenv("STORAGE_DISABLE_DIRECTPATH_BOUND_TOKEN")); !disableBoundToken { + defaults = append(defaults, internaloption.AllowHardBoundTokens("ALTS")) + } } return defaults @@ -143,7 +145,7 @@ func newGRPCStorageClient(ctx context.Context, opts ...storageOption) (*grpcStor s := initSettings(opts...) s.clientOption = append(defaultGRPCOptions(), s.clientOption...) // Disable all gax-level retries in favor of retry logic in the veneer client. - s.gax = append(s.gax, gax.WithRetry(nil)) + s.gax = append(s.gax, gax.WithRetry(nil), gax.WithTimeout(0)) config := newStorageConfig(s.clientOption...) if config.readAPIWasSet { @@ -243,8 +245,9 @@ func (c *grpcStorageClient) ListBuckets(ctx context.Context, project string, opt // BucketIterator is returned to them from the veneer. if pageToken == "" { req := &storagepb.ListBucketsRequest{ - Parent: toProjectResource(it.projectID), - Prefix: it.Prefix, + Parent: toProjectResource(it.projectID), + Prefix: it.Prefix, + ReturnPartialSuccess: it.ReturnPartialSuccess, } gitr = c.raw.ListBuckets(ctx, req, s.gax...) } @@ -260,6 +263,9 @@ func (c *grpcStorageClient) ListBuckets(ctx context.Context, project string, opt it.buckets = append(it.buckets, b) } + if resp, ok := gitr.Response.(*storagepb.ListBucketsResponse); ok { + it.unreachable = resp.Unreachable + } return next, nil } it.pageInfo, it.nextFunc = iterator.NewPageInfo( @@ -454,6 +460,7 @@ func (c *grpcStorageClient) ListObjects(ctx context.Context, bucket string, q *Q ReadMask: q.toFieldMask(), // a nil Query still results in a "*" FieldMask SoftDeleted: it.query.SoftDeleted, IncludeFoldersAsPrefixes: it.query.IncludeFoldersAsPrefixes, + Filter: it.query.Filter, } if s.userProject != "" { ctx = setUserProjectMetadata(ctx, s.userProject) @@ -624,6 +631,18 @@ func (c *grpcStorageClient) UpdateObject(ctx context.Context, params *updateObje } } + if uattrs.Contexts != nil && uattrs.Contexts.Custom != nil { + if len(uattrs.Contexts.Custom) == 0 { + // pass fieldMask with no key value and empty map to delete all keys + fieldMask.Paths = append(fieldMask.Paths, "contexts.custom") + } else { + for key := range uattrs.Contexts.Custom { + // pass fieldMask with key value with empty value in map to delete key + fieldMask.Paths = append(fieldMask.Paths, fmt.Sprintf("contexts.custom.%s", key)) + } + } + } + req.UpdateMask = fieldMask if len(fieldMask.Paths) < 1 { @@ -953,14 +972,24 @@ func (c *grpcStorageClient) ComposeObject(ctx context.Context, req *composeObjec } func (c *grpcStorageClient) RewriteObject(ctx context.Context, req *rewriteObjectRequest, opts ...storageOption) (*rewriteObjectResponse, error) { s := callSettings(c.settings, opts...) - obj := req.dstObject.attrs.toProtoObject("") + + var dst *storagepb.Object + // If the destination object attributes are not set, do not include them + // in the request. This indicates that the object attributes should be + // copied from the source object. + if req.dstObject.attrs.isZero() { + dst = nil + } else { + dst = req.dstObject.attrs.toProtoObject("") + } + call := &storagepb.RewriteObjectRequest{ SourceBucket: bucketResourceName(globalProjectAlias, req.srcObject.bucket), SourceObject: req.srcObject.name, RewriteToken: req.token, DestinationBucket: bucketResourceName(globalProjectAlias, req.dstObject.bucket), DestinationName: req.dstObject.name, - Destination: obj, + Destination: dst, DestinationKmsKey: req.dstObject.keyName, DestinationPredefinedAcl: req.predefinedACL, CommonObjectRequestParams: toProtoCommonObjectRequestParams(req.dstObject.encryptionKey), @@ -1069,8 +1098,8 @@ func (c *grpcStorageClient) NewMultiRangeDownloader(ctx context.Context, params return nil, errors.New("storage: MultiRangeDownloader requires the experimental.WithGRPCBidiReads option") } - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewMultiRangeDownloader") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "grpcStorageClient.NewMultiRangeDownloader") + defer func() { endSpan(ctx, err) }() s := callSettings(c.settings, opts...) // Force the use of the custom codec to enable zero-copy reads. s.gax = append(s.gax, gax.WithGRPCOptions( @@ -1614,8 +1643,8 @@ func (c *grpcStorageClient) NewRangeReader(ctx context.Context, params *newRange return c.NewRangeReaderReadObject(ctx, params, opts...) } - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewRangeReader") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "grpcStorageClient.NewRangeReader") + defer func() { endSpan(ctx, err) }() s := callSettings(c.settings, opts...) diff --git a/vendor/cloud.google.com/go/storage/grpc_reader.go b/vendor/cloud.google.com/go/storage/grpc_reader.go index 14ec5048d8..0fd848cad6 100644 --- a/vendor/cloud.google.com/go/storage/grpc_reader.go +++ b/vendor/cloud.google.com/go/storage/grpc_reader.go @@ -22,7 +22,6 @@ import ( "hash/crc32" "io" - "cloud.google.com/go/internal/trace" "cloud.google.com/go/storage/internal/apiv2/storagepb" "github.com/googleapis/gax-go/v2" "google.golang.org/grpc" @@ -83,8 +82,8 @@ func (bytesCodecReadObject) Name() string { // NewRangeReaderReadObject is the legacy (non-bidi) implementation of reads. func (c *grpcStorageClient) NewRangeReaderReadObject(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.grpcStorageClient.NewRangeReaderReadObject") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "grpcStorageClient.NewRangeReaderReadObject") + defer func() { endSpan(ctx, err) }() s := callSettings(c.settings, opts...) diff --git a/vendor/cloud.google.com/go/storage/grpc_writer.go b/vendor/cloud.google.com/go/storage/grpc_writer.go index b4fa4c855c..2af970ecb8 100644 --- a/vendor/cloud.google.com/go/storage/grpc_writer.go +++ b/vendor/cloud.google.com/go/storage/grpc_writer.go @@ -18,6 +18,7 @@ import ( "context" "errors" "fmt" + "hash/crc32" "io" "net/http" "net/url" @@ -51,6 +52,10 @@ func (w *gRPCWriter) Write(p []byte) (n int, err error) { case <-w.donec: return 0, w.streamResult case w.writesChan <- cmd: + // update fullObjectChecksum on every write and send it on finalWrite + if !w.disableAutoChecksum { + w.fullObjectChecksum = crc32.Update(w.fullObjectChecksum, crc32cTable, p) + } // write command successfully delivered to sender. We no longer own cmd. break } @@ -170,6 +175,7 @@ func (c *grpcStorageClient) OpenWriter(params *openWriterParams, opts ...storage flushSupported: params.append, sendCRC32C: params.sendCRC32C, + disableAutoChecksum: params.disableAutoChecksum, forceOneShot: params.chunkSize <= 0, forceEmptyContentType: params.forceEmptyContentType, append: params.append, @@ -239,8 +245,11 @@ type gRPCWriter struct { setSize func(int64) setTakeoverOffset func(int64) + fullObjectChecksum uint32 + flushSupported bool sendCRC32C bool + disableAutoChecksum bool forceOneShot bool forceEmptyContentType bool append bool @@ -785,25 +794,62 @@ func completion(r *storagepb.BidiWriteObjectResponse) *gRPCBidiWriteCompletion { } } -func bidiWriteObjectRequest(buf []byte, offset int64, flush, finishWrite bool) *storagepb.BidiWriteObjectRequest { +// Server contract expects full object checksum to be sent only on first or last write. +// Checksums of full object are already being sent on first Write during initialization of sender. +// Send objectChecksums only on final request and nil in other cases. +func bidiWriteObjectRequest(r gRPCBidiWriteRequest, bufChecksum *uint32, objectChecksums *storagepb.ObjectChecksums) *storagepb.BidiWriteObjectRequest { var data *storagepb.BidiWriteObjectRequest_ChecksummedData - if buf != nil { + if r.buf != nil { data = &storagepb.BidiWriteObjectRequest_ChecksummedData{ ChecksummedData: &storagepb.ChecksummedData{ - Content: buf, + Content: r.buf, + Crc32C: bufChecksum, }, } } req := &storagepb.BidiWriteObjectRequest{ - Data: data, - WriteOffset: offset, - FinishWrite: finishWrite, - Flush: flush, - StateLookup: flush, + Data: data, + WriteOffset: r.offset, + FinishWrite: r.finishWrite, + Flush: r.flush, + StateLookup: r.flush, + ObjectChecksums: objectChecksums, } return req } +type getObjectChecksumsParams struct { + fullObjectChecksum func() uint32 + finishWrite bool + sendCRC32C bool + disableAutoChecksum bool + attrs *ObjectAttrs +} + +// getObjectChecksums determines what checksum information to include in the final +// gRPC request +// +// function returns a populated ObjectChecksums only when finishWrite is true +// If CRC32C is disabled, it returns the user-provided checksum if available. +// If CRC32C is enabled, it returns the user-provided checksum if available, +// or the computed checksum of the entire object. +func getObjectChecksums(params *getObjectChecksumsParams) *storagepb.ObjectChecksums { + if !params.finishWrite { + return nil + } + + // send user's checksum on last write op if available + if params.sendCRC32C { + return toProtoChecksums(params.sendCRC32C, params.attrs) + } + if params.disableAutoChecksum { + return nil + } + return &storagepb.ObjectChecksums{ + Crc32C: proto.Uint32(params.fullObjectChecksum()), + } +} + type gRPCBidiWriteBufferSender interface { // connect implementations may attempt to establish a connection for issuing // writes. @@ -832,6 +878,9 @@ type gRPCOneshotBidiWriteBufferSender struct { bucket string firstMessage *storagepb.BidiWriteObjectRequest streamErr error + + checksumSettings func() (bool, bool, *ObjectAttrs) + fullObjectChecksum func() uint32 } func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() *gRPCOneshotBidiWriteBufferSender { @@ -843,11 +892,13 @@ func (w *gRPCWriter) newGRPCOneshotBidiWriteBufferSender() *gRPCOneshotBidiWrite WriteObjectSpec: w.spec, }, CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), - // For a non-resumable upload, checksums must be sent in this message. - // TODO: Currently the checksums are only sent on the first message - // of the stream, but in the future, we must also support sending it - // on the *last* message of the stream (instead of the first). - ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + }, + checksumSettings: func() (bool, bool, *ObjectAttrs) { + return w.sendCRC32C, w.disableAutoChecksum, w.attrs + }, + fullObjectChecksum: func() uint32 { + return w.fullObjectChecksum }, } } @@ -888,7 +939,20 @@ func (s *gRPCOneshotBidiWriteBufferSender) connect(ctx context.Context, cs gRPCB continue } - req := bidiWriteObjectRequest(r.buf, r.offset, r.flush, r.finishWrite) + sendCrc32C, disableAutoChecksum, attrs := s.checksumSettings() + var bufChecksum *uint32 + if !disableAutoChecksum { + bufChecksum = proto.Uint32(crc32.Checksum(r.buf, crc32cTable)) + } + objectChecksums := getObjectChecksums(&getObjectChecksumsParams{ + fullObjectChecksum: s.fullObjectChecksum, + finishWrite: r.finishWrite, + sendCRC32C: sendCrc32C, + disableAutoChecksum: disableAutoChecksum, + attrs: attrs, + }) + req := bidiWriteObjectRequest(r, bufChecksum, objectChecksums) + if firstSend { proto.Merge(req, s.firstMessage) firstSend = false @@ -932,6 +996,9 @@ type gRPCResumableBidiWriteBufferSender struct { startWriteRequest *storagepb.StartResumableWriteRequest upid string + checksumSettings func() (bool, bool, *ObjectAttrs) + fullObjectChecksum func() uint32 + streamErr error } @@ -942,10 +1009,13 @@ func (w *gRPCWriter) newGRPCResumableBidiWriteBufferSender() *gRPCResumableBidiW startWriteRequest: &storagepb.StartResumableWriteRequest{ WriteObjectSpec: w.spec, CommonObjectRequestParams: toProtoCommonObjectRequestParams(w.encryptionKey), - // TODO: Currently the checksums are only sent on the request to initialize - // the upload, but in the future, we must also support sending it - // on the *last* message of the stream. - ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + ObjectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), + }, + checksumSettings: func() (bool, bool, *ObjectAttrs) { + return w.sendCRC32C, w.disableAutoChecksum, w.attrs + }, + fullObjectChecksum: func() uint32 { + return w.fullObjectChecksum }, } } @@ -1005,7 +1075,21 @@ func (s *gRPCResumableBidiWriteBufferSender) connect(ctx context.Context, cs gRP cs.requestAcks <- struct{}{} continue } - req := bidiWriteObjectRequest(r.buf, r.offset, r.flush, r.finishWrite) + + sendCrc32C, disableAutoChecksum, attrs := s.checksumSettings() + var bufChecksum *uint32 + if !disableAutoChecksum { + bufChecksum = proto.Uint32(crc32.Checksum(r.buf, crc32cTable)) + } + objectChecksums := getObjectChecksums(&getObjectChecksumsParams{ + fullObjectChecksum: s.fullObjectChecksum, + finishWrite: r.finishWrite, + sendCRC32C: sendCrc32C, + disableAutoChecksum: disableAutoChecksum, + attrs: attrs, + }) + req := bidiWriteObjectRequest(r, bufChecksum, objectChecksums) + if firstSend { req.FirstMessage = &storagepb.BidiWriteObjectRequest_UploadId{UploadId: s.upid} firstSend = false @@ -1169,8 +1253,8 @@ func (s *gRPCAppendBidiWriteBufferSender) handleStream(stream storagepb.Storage_ type gRPCAppendTakeoverBidiWriteBufferSender struct { gRPCAppendBidiWriteBufferSender - takeoverReported bool - setTakeoverOffset func(int64) + takeoverReported bool + handleTakeoverCompletion func(gRPCBidiWriteCompletion) } func writeObjectSpecAsAppendObjectSpec(s *storagepb.WriteObjectSpec, gen int64) *storagepb.AppendObjectSpec { @@ -1197,8 +1281,11 @@ func (w *gRPCWriter) newGRPCAppendTakeoverWriteBufferSender() *gRPCAppendTakeove objectChecksums: toProtoChecksums(w.sendCRC32C, w.attrs), finalizeOnClose: w.finalizeOnClose, }, - takeoverReported: false, - setTakeoverOffset: w.setTakeoverOffset, + takeoverReported: false, + handleTakeoverCompletion: func(c gRPCBidiWriteCompletion) { + w.handleCompletion(c) + w.setTakeoverOffset(c.flushOffset) + }, } } @@ -1226,7 +1313,8 @@ func (s *gRPCAppendTakeoverBidiWriteBufferSender) connect(ctx context.Context, c resp, err := stream.Recv() if err != nil { - s.streamErr = err + // A Recv() error may be a redirect. + s.streamErr = s.maybeHandleRedirectionError(err) close(cs.completions) return } @@ -1238,9 +1326,9 @@ func (s *gRPCAppendTakeoverBidiWriteBufferSender) connect(ctx context.Context, c return } - s.setTakeoverOffset(c.flushOffset) + s.maybeUpdateFirstMessage(resp) s.takeoverReported = true - cs.completions <- *c + s.handleTakeoverCompletion(*c) } go s.handleStream(stream, cs, firstSend) @@ -1315,7 +1403,14 @@ func (s *gRPCAppendBidiWriteBufferSender) maybeHandleRedirectionError(err error) func (s *gRPCAppendBidiWriteBufferSender) send(stream storagepb.Storage_BidiWriteObjectClient, buf []byte, offset int64, flush, finishWrite, sendFirstMessage bool) error { finalizeObject := finishWrite && s.finalizeOnClose flush = flush || finishWrite - req := bidiWriteObjectRequest(buf, offset, flush, finalizeObject) + r := gRPCBidiWriteRequest{ + buf: buf, + offset: offset, + flush: flush, + finishWrite: finalizeObject, + } + // TODO(b/453869602): implement default checksumming for appendable writes + req := bidiWriteObjectRequest(r, nil, nil) if finalizeObject { // appendable objects pass checksums on the finalize message only req.ObjectChecksums = s.objectChecksums diff --git a/vendor/cloud.google.com/go/storage/http_client.go b/vendor/cloud.google.com/go/storage/http_client.go index a4b601300d..a055ed6015 100644 --- a/vendor/cloud.google.com/go/storage/http_client.go +++ b/vendor/cloud.google.com/go/storage/http_client.go @@ -33,7 +33,6 @@ import ( "cloud.google.com/go/auth" "cloud.google.com/go/iam/apiv1/iampb" "cloud.google.com/go/internal/optional" - "cloud.google.com/go/internal/trace" "github.com/google/uuid" "github.com/googleapis/gax-go/v2/callctx" "google.golang.org/api/googleapi" @@ -225,6 +224,7 @@ func (c *httpStorageClient) ListBuckets(ctx context.Context, project string, opt req.Projection("full") req.Prefix(it.Prefix) req.PageToken(pageToken) + req.ReturnPartialSuccess(it.ReturnPartialSuccess) if pageSize > 0 { req.MaxResults(int64(pageSize)) } @@ -243,6 +243,7 @@ func (c *httpStorageClient) ListBuckets(ctx context.Context, project string, opt } it.buckets = append(it.buckets, b) } + it.unreachable = resp.Unreachable return resp.NextPageToken, nil } @@ -364,6 +365,12 @@ func (c *httpStorageClient) ListObjects(ctx context.Context, bucket string, q *Q req.IncludeTrailingDelimiter(it.query.IncludeTrailingDelimiter) req.MatchGlob(it.query.MatchGlob) req.IncludeFoldersAsPrefixes(it.query.IncludeFoldersAsPrefixes) + + // Cannot pass empty filter + if it.query.Filter != "" { + req.Filter(it.query.Filter) + } + if selection := it.query.toFieldSelection(); selection != "" { req.Fields("nextPageToken", googleapi.Field(selection)) } @@ -517,6 +524,19 @@ func (c *httpStorageClient) UpdateObject(ctx context.Context, params *updateObje forceSendFields = append(forceSendFields, "Retention") } } + + if uattrs.Contexts != nil && uattrs.Contexts.Custom != nil { + if len(uattrs.Contexts.Custom) == 0 { + // To delete all contexts, "Contexts" must be added to nullFields. + // Sending empty Custom map in the request body is a no-op without this. + nullFields = append(nullFields, "Contexts") + } else { + attrs.Contexts = uattrs.Contexts + // This is to ensure any new values or deletions are updated + forceSendFields = append(forceSendFields, "Contexts") + } + } + rawObj := attrs.toRawObject(params.bucket) rawObj.ForceSendFields = forceSendFields rawObj.NullFields = nullFields @@ -847,8 +867,8 @@ func (c *httpStorageClient) NewMultiRangeDownloader(ctx context.Context, params } func (c *httpStorageClient) NewRangeReader(ctx context.Context, params *newRangeReaderParams, opts ...storageOption) (r *Reader, err error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.httpStorageClient.NewRangeReader") - defer func() { trace.EndSpan(ctx, err) }() + ctx, _ = startSpan(ctx, "httpStorageClient.NewRangeReader") + defer func() { endSpan(ctx, err) }() s := callSettings(c.settings, opts...) diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json b/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json new file mode 100644 index 0000000000..3a58e6826f --- /dev/null +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "storage", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest/internal/apiv2", + "client_library_type": "generated", + "description": "Cloud Storage API", + "distribution_name": "cloud.google.com/go/storage/internal/apiv2", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "stable" +} diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go b/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go index 68133628c3..9936aa68d1 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/storage_client.go @@ -432,7 +432,8 @@ type internalClient interface { // // API Overview and Naming SyntaxThe Cloud Storage gRPC API allows applications to read and write data through // the abstractions of buckets and objects. For a description of these -// abstractions please see https://cloud.google.com/storage/docs (at https://cloud.google.com/storage/docs). +// abstractions please see Cloud Storage +// documentation (at https://cloud.google.com/storage/docs). // // Resources are named as follows: // @@ -440,18 +441,14 @@ type internalClient interface { // using strings like projects/123456 or projects/my-string-id. // // Buckets are named using string names of the form: -// projects/{project}/buckets/{bucket} -// For globally unique buckets, _ may be substituted for the project. +// projects/{project}/buckets/{bucket}. +// For globally unique buckets, _ might be substituted for the project. // // Objects are uniquely identified by their name along with the name of the // bucket they belong to, as separate strings in this API. For example: // -// ReadObjectRequest { -// bucket: ‘projects/_/buckets/my-bucket’ -// object: ‘my-object’ -// } -// Note that object names can contain / characters, which are treated as -// any other character (no special directory semantics). +// Note that object names can contain / characters, which are treated as +// any other character (no special directory semantics). type Client struct { // The internal transport-dependent client. internalClient internalClient @@ -484,40 +481,121 @@ func (c *Client) Connection() *grpc.ClientConn { } // DeleteBucket permanently deletes an empty bucket. +// The request fails if there are any live or +// noncurrent objects in the bucket, but the request succeeds if the +// bucket only contains soft-deleted objects or incomplete uploads, such +// as ongoing XML API multipart uploads. Does not permanently delete +// soft-deleted objects. +// +// When this API is used to delete a bucket containing an object that has a +// soft delete policy +// enabled, the object becomes soft deleted, and the +// softDeleteTime and hardDeleteTime properties are set on the +// object. +// +// Objects and multipart uploads that were in the bucket at the time of +// deletion are also retained for the specified retention duration. When +// a soft-deleted bucket reaches the end of its retention duration, it +// is permanently deleted. The hardDeleteTime of the bucket always +// equals +// or exceeds the expiration time of the last soft-deleted object in the +// bucket. +// +// IAM Permissions: +// +// Requires storage.buckets.delete IAM permission on the bucket. func (c *Client) DeleteBucket(ctx context.Context, req *storagepb.DeleteBucketRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteBucket(ctx, req, opts...) } // GetBucket returns metadata for the specified bucket. +// +// IAM Permissions: +// +// Requires storage.buckets.get +// IAM permission on +// the bucket. Additionally, to return specific bucket metadata, the +// authenticated user must have the following permissions: +// +// To return the IAM policies: storage.buckets.getIamPolicy +// +// To return the bucket IP filtering rules: storage.buckets.getIpFilter func (c *Client) GetBucket(ctx context.Context, req *storagepb.GetBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) { return c.internalClient.GetBucket(ctx, req, opts...) } // CreateBucket creates a new bucket. +// +// IAM Permissions: +// +// Requires storage.buckets.create IAM permission on the bucket. +// Additionally, to enable specific bucket features, the authenticated user +// must have the following permissions: +// +// To enable object retention using the enableObjectRetention query +// parameter: storage.buckets.enableObjectRetention +// +// To set the bucket IP filtering rules: storage.buckets.setIpFilter func (c *Client) CreateBucket(ctx context.Context, req *storagepb.CreateBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) { return c.internalClient.CreateBucket(ctx, req, opts...) } -// ListBuckets retrieves a list of buckets for a given project. +// ListBuckets retrieves a list of buckets for a given project, ordered +// lexicographically by name. +// +// IAM Permissions: +// +// Requires storage.buckets.list IAM permission on the bucket. +// Additionally, to enable specific bucket features, the authenticated +// user must have the following permissions: +// +// To list the IAM policies: storage.buckets.getIamPolicy +// +// To list the bucket IP filtering rules: storage.buckets.getIpFilter func (c *Client) ListBuckets(ctx context.Context, req *storagepb.ListBucketsRequest, opts ...gax.CallOption) *BucketIterator { return c.internalClient.ListBuckets(ctx, req, opts...) } -// LockBucketRetentionPolicy locks retention policy on a bucket. +// LockBucketRetentionPolicy permanently locks the retention +// policy that is +// currently applied to the specified bucket. +// +// Caution: Locking a bucket is an +// irreversible action. Once you lock a bucket: +// +// You cannot remove the retention policy from the bucket. +// +// You cannot decrease the retention period for the policy. +// +// Once locked, you must delete the entire bucket in order to remove the +// bucket’s retention policy. However, before you can delete the bucket, you +// must delete all the objects in the bucket, which is only +// possible if all the objects have reached the retention period set by the +// retention policy. +// +// IAM Permissions: +// +// Requires storage.buckets.update IAM permission on the bucket. func (c *Client) LockBucketRetentionPolicy(ctx context.Context, req *storagepb.LockBucketRetentionPolicyRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) { return c.internalClient.LockBucketRetentionPolicy(ctx, req, opts...) } -// GetIamPolicy gets the IAM policy for a specified bucket. +// GetIamPolicy gets the IAM policy for a specified bucket or managed folder. // The resource field in the request should be // projects/_/buckets/{bucket} for a bucket, or // projects/_/buckets/{bucket}/managedFolders/{managedFolder} // for a managed folder. +// +// IAM Permissions: +// +// Requires storage.buckets.getIamPolicy on the bucket or +// storage.managedFolders.getIamPolicy IAM permission on the +// managed folder. func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } -// SetIamPolicy updates an IAM policy for the specified bucket. +// SetIamPolicy updates an IAM policy for the specified bucket or managed folder. // The resource field in the request should be // projects/_/buckets/{bucket} for a bucket, or // projects/_/buckets/{bucket}/managedFolders/{managedFolder} @@ -527,9 +605,8 @@ func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReques } // TestIamPermissions tests a set of permissions on the given bucket, object, or managed folder -// to see which, if any, are held by the caller. -// The resource field in the request should be -// projects/_/buckets/{bucket} for a bucket, +// to see which, if any, are held by the caller. The resource field in the +// request should be projects/_/buckets/{bucket} for a bucket, // projects/_/buckets/{bucket}/objects/{object} for an object, or // projects/_/buckets/{bucket}/managedFolders/{managedFolder} // for a managed folder. @@ -537,20 +614,42 @@ func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermi return c.internalClient.TestIamPermissions(ctx, req, opts...) } -// UpdateBucket updates a bucket. Equivalent to JSON API’s storage.buckets.patch method. +// UpdateBucket updates a bucket. Changes to the bucket are readable immediately after +// writing, but configuration changes might take time to propagate. This +// method supports patch semantics. +// +// IAM Permissions: +// +// Requires storage.buckets.update IAM permission on the bucket. +// Additionally, to enable specific bucket features, the authenticated user +// must have the following permissions: +// +// To set bucket IP filtering rules: storage.buckets.setIpFilter +// +// To update public access prevention policies or access control lists +// (ACLs): storage.buckets.setIamPolicy func (c *Client) UpdateBucket(ctx context.Context, req *storagepb.UpdateBucketRequest, opts ...gax.CallOption) (*storagepb.Bucket, error) { return c.internalClient.UpdateBucket(ctx, req, opts...) } // ComposeObject concatenates a list of existing objects into a new object in the same -// bucket. +// bucket. The existing source objects are unaffected by this operation. +// +// IAM Permissions: +// +// Requires the storage.objects.create and storage.objects.get IAM +// permissions to use this method. If the new composite object +// overwrites an existing object, the authenticated user must also have +// the storage.objects.delete permission. If the request body includes +// the retention property, the authenticated user must also have the +// storage.objects.setRetention IAM permission. func (c *Client) ComposeObject(ctx context.Context, req *storagepb.ComposeObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) { return c.internalClient.ComposeObject(ctx, req, opts...) } // DeleteObject deletes an object and its metadata. Deletions are permanent if versioning // is not enabled for the bucket, or if the generation parameter is used, or -// if soft delete (at https://cloud.google.com/storage/docs/soft-delete) is not +// if soft delete is not // enabled for the bucket. // When this API is used to delete an object from a bucket that has soft // delete policy enabled, the object becomes soft deleted, and the @@ -565,14 +664,56 @@ func (c *Client) ComposeObject(ctx context.Context, req *storagepb.ComposeObject // // IAM Permissions: // -// Requires storage.objects.delete -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on -// the bucket. +// Requires storage.objects.delete IAM permission on the bucket. func (c *Client) DeleteObject(ctx context.Context, req *storagepb.DeleteObjectRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteObject(ctx, req, opts...) } -// RestoreObject restores a soft-deleted object. +// RestoreObject restores a +// soft-deleted object. +// When a soft-deleted object is restored, a new copy of that object is +// created in the same bucket and inherits the same metadata as the +// soft-deleted object. The inherited metadata is the metadata that existed +// when the original object became soft deleted, with the following +// exceptions: +// +// The createTime of the new object is set to the time at which the +// soft-deleted object was restored. +// +// The softDeleteTime and hardDeleteTime values are cleared. +// +// A new generation is assigned and the metageneration is reset to 1. +// +// If the soft-deleted object was in a bucket that had Autoclass enabled, +// the new object is +// restored to Standard storage. +// +// The restored object inherits the bucket’s default object ACL, unless +// copySourceAcl is true. +// +// If a live object using the same name already exists in the bucket and +// becomes overwritten, the live object becomes a noncurrent object if Object +// Versioning is enabled on the bucket. If Object Versioning is not enabled, +// the live object becomes soft deleted. +// +// IAM Permissions: +// +// Requires the following IAM permissions to use this method: +// +// storage.objects.restore +// +// storage.objects.create +// +// storage.objects.delete (only required if overwriting an existing +// object) +// +// storage.objects.getIamPolicy (only required if projection is full +// and the relevant bucket +// has uniform bucket-level access disabled) +// +// storage.objects.setIamPolicy (only required if copySourceAcl is +// true and the relevant +// bucket has uniform bucket-level access disabled) func (c *Client) RestoreObject(ctx context.Context, req *storagepb.RestoreObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) { return c.internalClient.RestoreObject(ctx, req, opts...) } @@ -580,9 +721,9 @@ func (c *Client) RestoreObject(ctx context.Context, req *storagepb.RestoreObject // CancelResumableWrite cancels an in-progress resumable upload. // // Any attempts to write to the resumable upload after cancelling the upload -// will fail. +// fail. // -// The behavior for currently in progress write operations is not guaranteed - +// The behavior for any in-progress write operations is not guaranteed; // they could either complete before the cancellation or fail if the // cancellation completes first. func (c *Client) CancelResumableWrite(ctx context.Context, req *storagepb.CancelResumableWriteRequest, opts ...gax.CallOption) (*storagepb.CancelResumableWriteResponse, error) { @@ -593,9 +734,8 @@ func (c *Client) CancelResumableWrite(ctx context.Context, req *storagepb.Cancel // // IAM Permissions: // -// Requires storage.objects.get -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on -// the bucket. To return object ACLs, the authenticated user must also have +// Requires storage.objects.get IAM permission on the bucket. +// To return object ACLs, the authenticated user must also have // the storage.objects.getIamPolicy permission. func (c *Client) GetObject(ctx context.Context, req *storagepb.GetObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) { return c.internalClient.GetObject(ctx, req, opts...) @@ -605,38 +745,34 @@ func (c *Client) GetObject(ctx context.Context, req *storagepb.GetObjectRequest, // // IAM Permissions: // -// Requires storage.objects.get -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on -// the bucket. +// Requires storage.objects.get IAM permission on the bucket. func (c *Client) ReadObject(ctx context.Context, req *storagepb.ReadObjectRequest, opts ...gax.CallOption) (storagepb.Storage_ReadObjectClient, error) { return c.internalClient.ReadObject(ctx, req, opts...) } // BidiReadObject reads an object’s data. // -// This is a bi-directional API with the added support for reading multiple -// ranges within one stream both within and across multiple messages. -// If the server encountered an error for any of the inputs, the stream will -// be closed with the relevant error code. -// Because the API allows for multiple outstanding requests, when the stream -// is closed the error response will contain a BidiReadObjectRangesError proto -// in the error extension describing the error for each outstanding read_id. +// This bi-directional API reads data from an object, allowing you to +// request multiple data ranges within a single stream, even across +// several messages. If an error occurs with any request, the stream +// closes with a relevant error code. Since you can have multiple +// outstanding requests, the error response includes a +// BidiReadObjectRangesError field detailing the specific error for +// each pending read_id. // // IAM Permissions: // -// # Requires storage.objects.get -// -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on -// the bucket. -// -// This API is currently in preview and is not yet available for general -// use. +// Requires storage.objects.get IAM permission on the bucket. func (c *Client) BidiReadObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiReadObjectClient, error) { return c.internalClient.BidiReadObject(ctx, opts...) } // UpdateObject updates an object’s metadata. -// Equivalent to JSON API’s storage.objects.patch. +// Equivalent to JSON API’s storage.objects.patch method. +// +// IAM Permissions: +// +// Requires storage.objects.update IAM permission on the bucket. func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) { return c.internalClient.UpdateObject(ctx, req, opts...) } @@ -661,10 +797,10 @@ func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRe // Check the result Status of the stream, to determine if writing can be // resumed on this stream or must be restarted from scratch (by calling // StartResumableWrite()). The resumable errors are DEADLINE_EXCEEDED, -// INTERNAL, and UNAVAILABLE. For each case, the client should use binary -// exponential backoff before retrying. Additionally, writes can be -// resumed after RESOURCE_EXHAUSTED errors, but only after taking -// appropriate measures, which may include reducing aggregate send rate +// INTERNAL, and UNAVAILABLE. For each case, the client should use +// binary exponential backoff before retrying. Additionally, writes can +// be resumed after RESOURCE_EXHAUSTED errors, but only after taking +// appropriate measures, which might include reducing aggregate send rate // across clients and/or requesting a quota increase for your project. // // If the call to WriteObject returns ABORTED, that indicates @@ -672,43 +808,43 @@ func (c *Client) UpdateObject(ctx context.Context, req *storagepb.UpdateObjectRe // multiple racing clients or by a single client where the previous // request was timed out on the client side but nonetheless reached the // server. In this case the client should take steps to prevent further -// concurrent writes (e.g., increase the timeouts, stop using more than -// one process to perform the upload, etc.), and then should follow the -// steps below for resuming the upload. +// concurrent writes. For example, increase the timeouts and stop using +// more than one process to perform the upload. Follow the steps below for +// resuming the upload. // // For resumable errors, the client should call QueryWriteStatus() and -// then continue writing from the returned persisted_size. This may be +// then continue writing from the returned persisted_size. This might be // less than the amount of data the client previously sent. Note also that // it is acceptable to send data starting at an offset earlier than the -// returned persisted_size; in this case, the service will skip data at +// returned persisted_size; in this case, the service skips data at // offsets that were already persisted (without checking that it matches // the previously written data), and write only the data starting from the -// persisted offset. Even though the data isn’t written, it may still +// persisted offset. Even though the data isn’t written, it might still // incur a performance cost over resuming at the correct write offset. // This behavior can make client-side handling simpler in some cases. // // Clients must only send data that is a multiple of 256 KiB per message, // unless the object is being finished with finish_write set to true. // -// The service will not view the object as complete until the client has +// The service does not view the object as complete until the client has // sent a WriteObjectRequest with finish_write set to true. Sending any // requests on a stream after sending a request with finish_write set to -// true will cause an error. The client should check the response it -// receives to determine how much data the service was able to commit and +// true causes an error. The client must check the response it +// receives to determine how much data the service is able to commit and // whether the service views the object as complete. // -// Attempting to resume an already finalized object will result in an OK +// Attempting to resume an already finalized object results in an OK // status, with a WriteObjectResponse containing the finalized object’s // metadata. // -// Alternatively, the BidiWriteObject operation may be used to write an +// Alternatively, you can use the BidiWriteObject operation to write an // object with controls over flushing and the ability to fetch the ability to // determine the current persisted size. // // IAM Permissions: // // Requires storage.objects.create -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on +// IAM permission on // the bucket. func (c *Client) WriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_WriteObjectClient, error) { return c.internalClient.WriteObject(ctx, opts...) @@ -720,15 +856,15 @@ func (c *Client) WriteObject(ctx context.Context, opts ...gax.CallOption) (stora // manual flushing of persisted state, and the ability to determine current // persisted size without closing the stream. // -// The client may specify one or both of the state_lookup and flush fields -// in each BidiWriteObjectRequest. If flush is specified, the data written -// so far will be persisted to storage. If state_lookup is specified, the -// service will respond with a BidiWriteObjectResponse that contains the +// The client might specify one or both of the state_lookup and flush +// fields in each BidiWriteObjectRequest. If flush is specified, the data +// written so far is persisted to storage. If state_lookup is specified, the +// service responds with a BidiWriteObjectResponse that contains the // persisted size. If both flush and state_lookup are specified, the flush -// will always occur before a state_lookup, so that both may be set in the -// same request and the returned state will be the state of the object -// post-flush. When the stream is closed, a BidiWriteObjectResponse will -// always be sent to the client, regardless of the value of state_lookup. +// always occurs before a state_lookup, so that both might be set in the +// same request and the returned state is the state of the object +// post-flush. When the stream is closed, a BidiWriteObjectResponse +// is always sent to the client, regardless of the value of state_lookup. func (c *Client) BidiWriteObject(ctx context.Context, opts ...gax.CallOption) (storagepb.Storage_BidiWriteObjectClient, error) { return c.internalClient.BidiWriteObject(ctx, opts...) } @@ -738,8 +874,8 @@ func (c *Client) BidiWriteObject(ctx context.Context, opts ...gax.CallOption) (s // IAM Permissions: // // The authenticated user requires storage.objects.list -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) -// to use this method. To return object ACLs, the authenticated user must also +// IAM permission to use this method. To return object ACLs, the +// authenticated user must also // have the storage.objects.getIamPolicy permission. func (c *Client) ListObjects(ctx context.Context, req *storagepb.ListObjectsRequest, opts ...gax.CallOption) *ObjectIterator { return c.internalClient.ListObjects(ctx, req, opts...) @@ -753,7 +889,7 @@ func (c *Client) RewriteObject(ctx context.Context, req *storagepb.RewriteObject // StartResumableWrite starts a resumable write operation. This // method is part of the Resumable -// upload (at https://cloud.google.com/storage/docs/resumable-uploads) feature. +// upload feature. // This allows you to upload large objects in multiple chunks, which is more // resilient to network interruptions than a single upload. The validity // duration of the write operation, and the consequences of it becoming @@ -761,16 +897,14 @@ func (c *Client) RewriteObject(ctx context.Context, req *storagepb.RewriteObject // // IAM Permissions: // -// Requires storage.objects.create -// IAM permission (at https://cloud.google.com/iam/docs/overview#permissions) on -// the bucket. +// Requires storage.objects.create IAM permission on the bucket. func (c *Client) StartResumableWrite(ctx context.Context, req *storagepb.StartResumableWriteRequest, opts ...gax.CallOption) (*storagepb.StartResumableWriteResponse, error) { return c.internalClient.StartResumableWrite(ctx, req, opts...) } // QueryWriteStatus determines the persisted_size of an object that is being written. This // method is part of the resumable -// upload (at https://cloud.google.com/storage/docs/resumable-uploads) feature. +// upload feature. // The returned value is the size of the object that has been persisted so // far. The value can be used as the write_offset for the next Write() // call. @@ -790,6 +924,21 @@ func (c *Client) QueryWriteStatus(ctx context.Context, req *storagepb.QueryWrite } // MoveObject moves the source object to the destination object in the same bucket. +// This operation moves a source object to a destination object in the +// same bucket by renaming the object. The move itself is an atomic +// transaction, ensuring all steps either complete successfully or no +// changes are made. +// +// IAM Permissions: +// +// Requires the following IAM permissions to use this method: +// +// storage.objects.move +// +// storage.objects.create +// +// storage.objects.delete (only required if overwriting an existing +// object) func (c *Client) MoveObject(ctx context.Context, req *storagepb.MoveObjectRequest, opts ...gax.CallOption) (*storagepb.Object, error) { return c.internalClient.MoveObject(ctx, req, opts...) } @@ -818,7 +967,8 @@ type gRPCClient struct { // // API Overview and Naming SyntaxThe Cloud Storage gRPC API allows applications to read and write data through // the abstractions of buckets and objects. For a description of these -// abstractions please see https://cloud.google.com/storage/docs (at https://cloud.google.com/storage/docs). +// abstractions please see Cloud Storage +// documentation (at https://cloud.google.com/storage/docs). // // Resources are named as follows: // @@ -826,18 +976,14 @@ type gRPCClient struct { // using strings like projects/123456 or projects/my-string-id. // // Buckets are named using string names of the form: -// projects/{project}/buckets/{bucket} -// For globally unique buckets, _ may be substituted for the project. +// projects/{project}/buckets/{bucket}. +// For globally unique buckets, _ might be substituted for the project. // // Objects are uniquely identified by their name along with the name of the // bucket they belong to, as separate strings in this API. For example: // -// ReadObjectRequest { -// bucket: ‘projects/_/buckets/my-bucket’ -// object: ‘my-object’ -// } -// Note that object names can contain / characters, which are treated as -// any other character (no special directory semantics). +// Note that object names can contain / characters, which are treated as +// any other character (no special directory semantics). func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() if newClientHook != nil { diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go index ee6639e49d..b8cd9add52 100644 --- a/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage.pb.go @@ -21,22 +21,19 @@ package storagepb import ( + reflect "reflect" + sync "sync" + iampb "cloud.google.com/go/iam/apiv1/iampb" - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" date "google.golang.org/genproto/googleapis/type/date" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" emptypb "google.golang.org/protobuf/types/known/emptypb" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -52,8 +49,8 @@ type ServiceConstants_Values int32 const ( // Unused. Proto3 requires first enum to be 0. ServiceConstants_VALUES_UNSPECIFIED ServiceConstants_Values = 0 - // The maximum size chunk that can will be returned in a single - // ReadRequest. + // The maximum size chunk that can be returned in a single + // `ReadRequest`. // 2 MiB. ServiceConstants_MAX_READ_CHUNK_BYTES ServiceConstants_Values = 2097152 // The maximum size chunk that can be sent in a single WriteObjectRequest. @@ -186,11 +183,11 @@ type Object_Retention_Mode int32 const ( // No specified mode. Object is not under retention. Object_Retention_MODE_UNSPECIFIED Object_Retention_Mode = 0 - // Retention period may be decreased or increased. - // The Retention configuration may be removed. - // The mode may be changed to locked. + // Retention period might be decreased or increased. + // The Retention configuration might be removed. + // The mode might be changed to locked. Object_Retention_UNLOCKED Object_Retention_Mode = 1 - // Retention period may be increased. + // Retention period might be increased. // The Retention configuration cannot be removed. // The mode cannot be changed. Object_Retention_LOCKED Object_Retention_Mode = 2 @@ -237,7 +234,7 @@ func (Object_Retention_Mode) EnumDescriptor() ([]byte, []int) { return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{50, 0, 0} } -// Request message for DeleteBucket. +// Request message for [DeleteBucket][google.storage.v2.Storage.DeleteBucket]. type DeleteBucketRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -303,7 +300,7 @@ func (x *DeleteBucketRequest) GetIfMetagenerationNotMatch() int64 { return 0 } -// Request message for GetBucket. +// Request message for [GetBucket][google.storage.v2.Storage.GetBucket]. type GetBucketRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -311,15 +308,15 @@ type GetBucketRequest struct { // Required. Name of a bucket. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If set, and if the bucket's current metageneration does not match the - // specified value, the request will return an error. + // If set, only gets the bucket metadata if its metageneration matches this + // value. IfMetagenerationMatch *int64 `protobuf:"varint,2,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"` // If set, and if the bucket's current metageneration matches the specified - // value, the request will return an error. + // value, the request returns an error. IfMetagenerationNotMatch *int64 `protobuf:"varint,3,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` // Mask specifying which fields to read. - // A "*" field may be used to indicate all fields. - // If no mask is specified, will default to all fields. + // A `*` field might be used to indicate all fields. + // If no mask is specified, it defaults to all fields. ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` } @@ -381,35 +378,35 @@ func (x *GetBucketRequest) GetReadMask() *fieldmaskpb.FieldMask { return nil } -// Request message for CreateBucket. +// Request message for [CreateBucket][google.storage.v2.Storage.CreateBucket]. type CreateBucketRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Required. The project to which this bucket will belong. This field must - // either be empty or `projects/_`. The project ID that owns this bucket - // should be specified in the `bucket.project` field. + // Required. The project to which this bucket belongs. This field must either + // be empty or `projects/_`. The project ID that owns this bucket should be + // specified in the `bucket.project` field. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. Properties of the new bucket being inserted. // The name of the bucket is specified in the `bucket_id` field. Populating - // `bucket.name` field will result in an error. + // `bucket.name` field results in an error. // The project of the bucket must be specified in the `bucket.project` field. // This field must be in `projects/{projectIdentifier}` format, // {projectIdentifier} can be the project ID or project number. The `parent` // field must be either empty or `projects/_`. Bucket *Bucket `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` - // Required. The ID to use for this bucket, which will become the final - // component of the bucket's resource name. For example, the value `foo` might - // result in a bucket with the name `projects/123456/buckets/foo`. + // Required. The ID to use for this bucket, which becomes the final component + // of the bucket's resource name. For example, the value `foo` might result in + // a bucket with the name `projects/123456/buckets/foo`. BucketId string `protobuf:"bytes,3,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` // Optional. Apply a predefined set of access controls to this bucket. - // Valid values are "authenticatedRead", "private", "projectPrivate", - // "publicRead", or "publicReadWrite". + // Valid values are `authenticatedRead`, `private`, `projectPrivate`, + // `publicRead`, or `publicReadWrite`. PredefinedAcl string `protobuf:"bytes,6,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` // Optional. Apply a predefined set of default object access controls to this - // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", - // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". + // bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`, + // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`. PredefinedDefaultObjectAcl string `protobuf:"bytes,7,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"` // Optional. If true, enable object retention on the bucket. EnableObjectRetention bool `protobuf:"varint,9,opt,name=enable_object_retention,json=enableObjectRetention,proto3" json:"enable_object_retention,omitempty"` @@ -487,7 +484,7 @@ func (x *CreateBucketRequest) GetEnableObjectRetention() bool { return false } -// Request message for ListBuckets. +// Request message for [ListBuckets][google.storage.v2.Storage.ListBuckets]. type ListBucketsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -496,9 +493,9 @@ type ListBucketsRequest struct { // Required. The project whose buckets we are listing. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. Maximum number of buckets to return in a single response. The - // service will use this parameter or 1,000 items, whichever is smaller. If - // "acl" is present in the read_mask, the service will use this parameter of - // 200 items, whichever is smaller. + // service uses this parameter or `1,000` items, whichever is smaller. If + // `acl` is present in the `read_mask`, the service uses this parameter of + // `200` items, whichever is smaller. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Optional. A previously-returned page token representing part of the larger // set of results to view. @@ -506,10 +503,13 @@ type ListBucketsRequest struct { // Optional. Filter results to buckets whose names begin with this prefix. Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"` // Mask specifying which fields to read from each result. - // If no mask is specified, will default to all fields except items.owner, - // items.acl, and items.default_object_acl. - // * may be used to mean "all fields". + // If no mask is specified, it defaults to all fields except `items. + // owner`, `items.acl`, and `items.default_object_acl`. + // `*` might be used to mean "all fields". ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` + // Optional. Allows listing of buckets, even if there are buckets that are + // unreachable. + ReturnPartialSuccess bool `protobuf:"varint,9,opt,name=return_partial_success,json=returnPartialSuccess,proto3" json:"return_partial_success,omitempty"` } func (x *ListBucketsRequest) Reset() { @@ -577,7 +577,14 @@ func (x *ListBucketsRequest) GetReadMask() *fieldmaskpb.FieldMask { return nil } -// The result of a call to Buckets.ListBuckets +func (x *ListBucketsRequest) GetReturnPartialSuccess() bool { + if x != nil { + return x.ReturnPartialSuccess + } + return false +} + +// Response message for [ListBuckets][google.storage.v2.Storage.ListBuckets]. type ListBucketsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -588,6 +595,19 @@ type ListBucketsResponse struct { // The continuation token, used to page through large result sets. Provide // this value in a subsequent request to return the next page of results. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Unreachable resources. + // This field can only be present if the caller specified + // return_partial_success to be true in the request to receive indications + // of temporarily missing resources. + // unreachable might be: + // unreachable = [ + // + // "projects/_/buckets/bucket1", + // "projects/_/buckets/bucket2", + // "projects/_/buckets/bucket3", + // + // ] + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` } func (x *ListBucketsResponse) Reset() { @@ -634,7 +654,15 @@ func (x *ListBucketsResponse) GetNextPageToken() string { return "" } -// Request message for LockBucketRetentionPolicyRequest. +func (x *ListBucketsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// Request message for +// [LockBucketRetentionPolicy][google.storage.v2.Storage.LockBucketRetentionPolicy]. type LockBucketRetentionPolicyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -691,35 +719,35 @@ func (x *LockBucketRetentionPolicyRequest) GetIfMetagenerationMatch() int64 { return 0 } -// Request for UpdateBucket method. +// Request for [UpdateBucket][google.storage.v2.Storage.UpdateBucket] method. type UpdateBucketRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Required. The bucket to update. - // The bucket's `name` field will be used to identify the bucket. + // The bucket's `name` field is used to identify the bucket. Bucket *Bucket `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` - // If set, will only modify the bucket if its metageneration matches this + // If set, the request modifies the bucket if its metageneration matches this // value. IfMetagenerationMatch *int64 `protobuf:"varint,2,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"` - // If set, will only modify the bucket if its metageneration does not match - // this value. + // If set, the request modifies the bucket if its metageneration doesn't + // match this value. IfMetagenerationNotMatch *int64 `protobuf:"varint,3,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` // Optional. Apply a predefined set of access controls to this bucket. - // Valid values are "authenticatedRead", "private", "projectPrivate", - // "publicRead", or "publicReadWrite". + // Valid values are `authenticatedRead`, `private`, `projectPrivate`, + // `publicRead`, or `publicReadWrite`. PredefinedAcl string `protobuf:"bytes,8,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` // Optional. Apply a predefined set of default object access controls to this - // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", - // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". + // bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`, + // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`. PredefinedDefaultObjectAcl string `protobuf:"bytes,9,opt,name=predefined_default_object_acl,json=predefinedDefaultObjectAcl,proto3" json:"predefined_default_object_acl,omitempty"` // Required. List of fields to be updated. // // To specify ALL fields, equivalent to the JSON API's "update" function, // specify a single field with the value `*`. Note: not recommended. If a new // field is introduced at a later time, an older client updating with the `*` - // may accidentally reset the new field's value. + // might accidentally reset the new field's value. // // Not specifying any fields is an error. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,6,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` @@ -797,7 +825,7 @@ func (x *UpdateBucketRequest) GetUpdateMask() *fieldmaskpb.FieldMask { return nil } -// Request message for ComposeObject. +// Request message for [ComposeObject][google.storage.v2.Storage.ComposeObject]. type ComposeObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -805,12 +833,12 @@ type ComposeObjectRequest struct { // Required. Properties of the resulting object. Destination *Object `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // Optional. The list of source objects that will be concatenated into a - // single object. + // Optional. The list of source objects that is concatenated into a single + // object. SourceObjects []*ComposeObjectRequest_SourceObject `protobuf:"bytes,2,rep,name=source_objects,json=sourceObjects,proto3" json:"source_objects,omitempty"` // Optional. Apply a predefined set of access controls to the destination - // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", - // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". + // object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`, + // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`. DestinationPredefinedAcl string `protobuf:"bytes,9,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"` // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -821,14 +849,14 @@ type ComposeObjectRequest struct { IfMetagenerationMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_match,json=ifMetagenerationMatch,proto3,oneof" json:"if_metageneration_match,omitempty"` // Optional. Resource name of the Cloud KMS key, of the form // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, - // that will be used to encrypt the object. Overrides the object + // that is used to encrypt the object. Overrides the object // metadata's `kms_key_name` value, if any. KmsKey string `protobuf:"bytes,6,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` // Optional. A set of parameters common to Storage API requests concerning an // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,7,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` - // Optional. The checksums of the complete object. This will be validated - // against the combined checksums of the component objects. + // Optional. The checksums of the complete object. This is validated against + // the combined checksums of the component objects. ObjectChecksums *ObjectChecksums `protobuf:"bytes,10,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` } @@ -918,8 +946,7 @@ func (x *ComposeObjectRequest) GetObjectChecksums() *ObjectChecksums { return nil } -// Message for deleting an object. -// `bucket` and `object` **must** be set. +// Request message for deleting an object. type DeleteObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1040,7 +1067,8 @@ func (x *DeleteObjectRequest) GetCommonObjectRequestParams() *CommonObjectReques return nil } -// Message for restoring an object. +// Request message for +// [RestoreObject][google.storage.v2.Storage.RestoreObject]. // `bucket`, `object`, and `generation` **must** be set. type RestoreObjectRequest struct { state protoimpl.MessageState @@ -1074,7 +1102,7 @@ type RestoreObjectRequest struct { // Makes the operation conditional on whether the object's current // metageneration does not match the given value. IfMetagenerationNotMatch *int64 `protobuf:"varint,7,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` - // If false or unset, the bucket's default object ACL will be used. + // If false or unset, the bucket's default object ACL is used. // If true, copy the source object's access controls. // Return an error if bucket has UBLA enabled. CopySourceAcl *bool `protobuf:"varint,9,opt,name=copy_source_acl,json=copySourceAcl,proto3,oneof" json:"copy_source_acl,omitempty"` @@ -1183,8 +1211,8 @@ func (x *RestoreObjectRequest) GetCommonObjectRequestParams() *CommonObjectReque return nil } -// Message for canceling an in-progress resumable upload. -// `upload_id` **must** be set. +// Request message for +// [CancelResumableWrite][google.storage.v2.Storage.CancelResumableWrite]. type CancelResumableWriteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1232,7 +1260,7 @@ func (x *CancelResumableWriteRequest) GetUploadId() string { return "" } -// Empty response message for canceling an in-progress resumable upload, will be +// Empty response message for canceling an in-progress resumable upload, is // extended as needed. type CancelResumableWriteResponse struct { state protoimpl.MessageState @@ -1270,7 +1298,7 @@ func (*CancelResumableWriteResponse) Descriptor() ([]byte, []int) { return file_google_storage_v2_storage_proto_rawDescGZIP(), []int{11} } -// Request message for ReadObject. +// Request message for [ReadObject][google.storage.v2.Storage.ReadObject]. type ReadObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1286,16 +1314,16 @@ type ReadObjectRequest struct { // Optional. The offset for the first byte to return in the read, relative to // the start of the object. // - // A negative `read_offset` value will be interpreted as the number of bytes + // A negative `read_offset` value is interpreted as the number of bytes // back from the end of the object to be returned. For example, if an object's - // length is 15 bytes, a ReadObjectRequest with `read_offset` = -5 and - // `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting - // a negative offset with magnitude larger than the size of the object will - // return the entire object. + // length is `15` bytes, a `ReadObjectRequest` with `read_offset` = `-5` and + // `read_limit` = `3` would return bytes `10` through `12` of the object. + // Requesting a negative offset with magnitude larger than the size of the + // object returns the entire object. ReadOffset int64 `protobuf:"varint,4,opt,name=read_offset,json=readOffset,proto3" json:"read_offset,omitempty"` // Optional. The maximum number of `data` bytes the server is allowed to // return in the sum of all `Object` messages. A `read_limit` of zero - // indicates that there is no limit, and a negative `read_limit` will cause an + // indicates that there is no limit, and a negative `read_limit` causes an // error. // // If the stream returns fewer bytes than allowed by the `read_limit` and no @@ -1321,10 +1349,10 @@ type ReadObjectRequest struct { // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,10,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. - // The checksummed_data field and its children will always be present. - // If no mask is specified, will default to all fields except metadata.owner - // and metadata.acl. - // * may be used to mean "all fields". + // The `checksummed_data` field and its children are always present. + // If no mask is specified, it defaults to all fields except `metadata. + // owner` and `metadata.acl`. + // `*` might be used to mean "all fields". ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,12,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` } @@ -1435,7 +1463,7 @@ func (x *ReadObjectRequest) GetReadMask() *fieldmaskpb.FieldMask { return nil } -// Request message for GetObject. +// Request message for [GetObject][google.storage.v2.Storage.GetObject]. type GetObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1469,15 +1497,15 @@ type GetObjectRequest struct { // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. - // If no mask is specified, will default to all fields except metadata.acl and - // metadata.owner. - // * may be used to mean "all fields". + // If no mask is specified, it defaults to all fields except `metadata. + // acl` and `metadata.owner`. + // `*` might be used to mean "all fields". ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,10,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` // Optional. Restore token used to differentiate soft-deleted objects with the // same name and generation. Only applicable for hierarchical namespace - // buckets and if soft_deleted is set to true. This parameter is optional, and - // is only required in the rare case when there are multiple soft-deleted - // objects with the same name and generation. + // buckets and if `soft_deleted` is set to `true`. This parameter is optional, + // and is only required in the rare case when there are multiple soft-deleted + // objects with the same `name` and `generation`. RestoreToken string `protobuf:"bytes,12,opt,name=restore_token,json=restoreToken,proto3" json:"restore_token,omitempty"` } @@ -1588,13 +1616,13 @@ func (x *GetObjectRequest) GetRestoreToken() string { return "" } -// Response message for ReadObject. +// Response message for [ReadObject][google.storage.v2.Storage.ReadObject]. type ReadObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A portion of the data for the object. The service **may** leave `data` + // A portion of the data for the object. The service might leave `data` // empty for any given `ReadResponse`. This enables the service to inform the // client that the request is still live while it is running an operation to // generate more data. @@ -1603,9 +1631,9 @@ type ReadObjectResponse struct { // the client should compute one of these checksums over the downloaded object // and compare it against the value provided here. ObjectChecksums *ObjectChecksums `protobuf:"bytes,2,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` - // If read_offset and or read_limit was specified on the - // ReadObjectRequest, ContentRange will be populated on the first - // ReadObjectResponse message of the read stream. + // If `read_offset` and or `read_limit` is specified on the + // `ReadObjectRequest`, `ContentRange` is populated on the first + // `ReadObjectResponse` message of the read stream. ContentRange *ContentRange `protobuf:"bytes,3,opt,name=content_range,json=contentRange,proto3" json:"content_range,omitempty"` // Metadata of the object whose media is being returned. // Only populated in the first response in the stream. @@ -1702,13 +1730,12 @@ type BidiReadObjectSpec struct { // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` // Mask specifying which fields to read. - // The checksummed_data field and its children will always be present. - // If no mask is specified, will default to all fields except metadata.owner - // and metadata.acl. - // * may be used to mean "all fields". + // The `checksummed_data` field and its children are always present. + // If no mask is specified, it defaults to all fields except `metadata. + // owner` and `metadata.acl`. + // `*` might be used to mean "all fields". // As per https://google.aip.dev/161, this field is deprecated. - // As an alternative, grpc metadata can be used: - // https://cloud.google.com/apis/docs/system-parameters#definitions + // As an alternative, `grpc metadata` can be used: // // Deprecated: Marked as deprecated in google/storage/v2/storage.proto. ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,12,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` @@ -1829,22 +1856,23 @@ func (x *BidiReadObjectSpec) GetRoutingToken() string { return "" } -// Request message for BidiReadObject. +// Request message for +// [BidiReadObject][google.storage.v2.Storage.BidiReadObject]. type BidiReadObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Optional. The first message of each stream should set this field. If this - // is not the first message, an error will be returned. Describes the object - // to read. + // is not the first message, an error is returned. Describes the object to + // read. ReadObjectSpec *BidiReadObjectSpec `protobuf:"bytes,1,opt,name=read_object_spec,json=readObjectSpec,proto3" json:"read_object_spec,omitempty"` // Optional. Provides a list of 0 or more (up to 100) ranges to read. If a // single range is large enough to require multiple responses, they are - // guaranteed to be delivered in increasing offset order. There are no - // ordering guarantees across ranges. When no ranges are provided, the - // response message will not include ObjectRangeData. For full object - // downloads, the offset and size can be set to 0. + // delivered in increasing offset order. There are no ordering guarantees + // across ranges. When no ranges are provided, the response message + // doesn't include `ObjectRangeData`. For full object downloads, the + // offset and size can be set to `0`. ReadRanges []*ReadRange `protobuf:"bytes,8,rep,name=read_ranges,json=readRanges,proto3" json:"read_ranges,omitempty"` } @@ -1892,25 +1920,26 @@ func (x *BidiReadObjectRequest) GetReadRanges() []*ReadRange { return nil } -// Response message for BidiReadObject. +// Response message for +// [BidiReadObject][google.storage.v2.Storage.BidiReadObject]. type BidiReadObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // A portion of the object's data. The service **may** leave data - // empty for any given ReadResponse. This enables the service to inform the + // A portion of the object's data. The service might leave data + // empty for any given `ReadResponse`. This enables the service to inform the // client that the request is still live while it is running an operation to // generate more data. - // The service **may** pipeline multiple responses belonging to different read - // requests. Each ObjectRangeData entry will have a read_id - // set to the same value as the corresponding source read request. + // The service might pipeline multiple responses belonging to different read + // requests. Each `ObjectRangeData` entry has a `read_id` that is set + // to the same value as the corresponding source read request. ObjectDataRanges []*ObjectRangeData `protobuf:"bytes,6,rep,name=object_data_ranges,json=objectDataRanges,proto3" json:"object_data_ranges,omitempty"` // Metadata of the object whose media is being returned. // Only populated in the first response in the stream and not populated when // the stream is opened with a read handle. Metadata *Object `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // This field will be periodically refreshed, however it may not be set in + // This field is periodically refreshed, however it might not be set in // every response. It allows the client to more efficiently open subsequent // bidirectional streams to the same object. ReadHandle *BidiReadHandle `protobuf:"bytes,7,opt,name=read_handle,json=readHandle,proto3" json:"read_handle,omitempty"` @@ -1967,15 +1996,15 @@ func (x *BidiReadObjectResponse) GetReadHandle() *BidiReadHandle { return nil } -// Error proto containing details for a redirected read. This error may be +// Error proto containing details for a redirected read. This error might be // attached as details for an ABORTED response to BidiReadObject. type BidiReadObjectRedirectedError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The read handle for the redirected read. If set, the client may use this in - // the BidiReadObjectSpec when retrying the read stream. + // The read handle for the redirected read. If set, the client might use this + // in the BidiReadObjectSpec when retrying the read stream. ReadHandle *BidiReadHandle `protobuf:"bytes,1,opt,name=read_handle,json=readHandle,proto3" json:"read_handle,omitempty"` // The routing token the client must use when retrying the read stream. // This value must be provided in the header `x-goog-request-params`, with key @@ -2027,7 +2056,7 @@ func (x *BidiReadObjectRedirectedError) GetRoutingToken() string { return "" } -// Error proto containing details for a redirected write. This error may be +// Error proto containing details for a redirected write. This error might be // attached as details for an ABORTED response to BidiWriteObject. type BidiWriteObjectRedirectedError struct { state protoimpl.MessageState @@ -2040,11 +2069,11 @@ type BidiWriteObjectRedirectedError struct { RoutingToken *string `protobuf:"bytes,1,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"` // Opaque value describing a previous write. If set, the client must use this // in an AppendObjectSpec first_message when retrying the write stream. If not - // set, clients may retry the original request. + // set, clients might retry the original request. WriteHandle *BidiWriteHandle `protobuf:"bytes,2,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"` - // The generation of the object that triggered the redirect. This will be set - // iff write_handle is set. If set, the client must use this in an - // AppendObjectSpec first_message when retrying the write stream. + // The generation of the object that triggered the redirect. This is set + // iff `write_handle` is set. If set, the client must use this in an + // `AppendObjectSpec` first_message when retrying the write stream. Generation *int64 `protobuf:"varint,3,opt,name=generation,proto3,oneof" json:"generation,omitempty"` } @@ -2203,7 +2232,7 @@ func (x *ReadRangeError) GetStatus() *status.Status { return nil } -// Describes a range of bytes to read in a BidiReadObjectRanges request. +// Describes a range of bytes to read in a `BidiReadObjectRanges` request. type ReadRange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2212,26 +2241,26 @@ type ReadRange struct { // Required. The offset for the first byte to return in the read, relative to // the start of the object. // - // A negative read_offset value will be interpreted as the number of bytes + // A negative read_offset value is interpreted as the number of bytes // back from the end of the object to be returned. For example, if an object's - // length is 15 bytes, a ReadObjectRequest with read_offset = -5 and - // read_length = 3 would return bytes 10 through 12 of the object. Requesting - // a negative offset with magnitude larger than the size of the object will - // return the entire object. A read_offset larger than the size of the object - // will result in an OutOfRange error. + // length is 15 bytes, a `ReadObjectRequest` with `read_offset` = -5 and + // `read_length` = 3 would return bytes 10 through 12 of the object. + // Requesting a negative offset with magnitude larger than the size of the + // object returns the entire object. A `read_offset` larger than the size + // of the object results in an `OutOfRange` error. ReadOffset int64 `protobuf:"varint,1,opt,name=read_offset,json=readOffset,proto3" json:"read_offset,omitempty"` // Optional. The maximum number of data bytes the server is allowed to return - // across all response messages with the same read_id. A read_length of zero - // indicates to read until the resource end, and a negative read_length will - // cause an error. If the stream returns fewer bytes than allowed by the - // read_length and no error occurred, the stream includes all data from the - // read_offset to the resource end. + // across all response messages with the same `read_id`. A `read_length` of + // zero indicates to read until the resource end, and a negative `read_length` + // causes an error. If the stream returns fewer bytes than allowed by the + // `read_length` and no error occurred, the stream includes all data from the + // `read_offset` to the resource end. ReadLength int64 `protobuf:"varint,2,opt,name=read_length,json=readLength,proto3" json:"read_length,omitempty"` // Required. Read identifier provided by the client. When the client issues - // more than one outstanding ReadRange on the same stream, responses can be + // more than one outstanding `ReadRange` on the same stream, responses can be // mapped back to their corresponding requests using this value. Clients must // ensure that all outstanding requests have different read_id values. The - // server may close the stream with an error if this condition is not met. + // server might close the stream with an error if this condition is not met. ReadId int64 `protobuf:"varint,3,opt,name=read_id,json=readId,proto3" json:"read_id,omitempty"` } @@ -2294,11 +2323,11 @@ type ObjectRangeData struct { // A portion of the data for the object. ChecksummedData *ChecksummedData `protobuf:"bytes,1,opt,name=checksummed_data,json=checksummedData,proto3" json:"checksummed_data,omitempty"` - // The ReadRange describes the content being returned with read_id set to the - // corresponding ReadObjectRequest in the stream. Multiple ObjectRangeData - // messages may have the same read_id but increasing offsets. - // ReadObjectResponse messages with the same read_id are guaranteed to be - // delivered in increasing offset order. + // The `ReadRange` describes the content being returned with `read_id` set to + // the corresponding `ReadObjectRequest` in the stream. Multiple + // `ObjectRangeData` messages might have the same read_id but increasing + // offsets. `ReadObjectResponse` messages with the same `read_id` are + // guaranteed to be delivered in increasing offset order. ReadRange *ReadRange `protobuf:"bytes,2,opt,name=read_range,json=readRange,proto3" json:"read_range,omitempty"` // If set, indicates there are no more bytes to read for the given ReadRange. RangeEnd bool `protobuf:"varint,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` @@ -2355,8 +2384,8 @@ func (x *ObjectRangeData) GetRangeEnd() bool { return false } -// BidiReadHandle contains a handle from a previous BiDiReadObject -// invocation. The client can use this instead of BidiReadObjectSpec as an +// `BidiReadHandle` contains a handle from a previous `BiDiReadObject` +// invocation. The client can use this instead of `BidiReadObjectSpec` as an // optimized way of opening subsequent bidirectional streams to the same object. type BidiReadHandle struct { state protoimpl.MessageState @@ -2404,9 +2433,9 @@ func (x *BidiReadHandle) GetHandle() []byte { return nil } -// BidiWriteHandle contains a handle from a previous BidiWriteObject -// invocation. The client can use this as an optimized way of opening subsequent -// bidirectional streams to the same object. +// `BidiWriteHandle` contains a handle from a previous `BidiWriteObject` +// invocation. The client can use this instead of `BidiReadObjectSpec` as an +// optimized way of opening subsequent bidirectional streams to the same object. type BidiWriteHandle struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2462,16 +2491,16 @@ type WriteObjectSpec struct { // Required. Destination object, including its name and its metadata. Resource *Object `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // Optional. Apply a predefined set of access controls to this object. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", - // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". + // Valid values are `authenticatedRead`, `bucketOwnerFullControl`, + // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`. PredefinedAcl string `protobuf:"bytes,7,opt,name=predefined_acl,json=predefinedAcl,proto3" json:"predefined_acl,omitempty"` // Makes the operation conditional on whether the object's current - // generation matches the given value. Setting to 0 makes the operation + // generation matches the given value. Setting to `0` makes the operation // succeed only if there are no live versions of the object. IfGenerationMatch *int64 `protobuf:"varint,3,opt,name=if_generation_match,json=ifGenerationMatch,proto3,oneof" json:"if_generation_match,omitempty"` // Makes the operation conditional on whether the object's live // generation does not match the given value. If no live object exists, the - // precondition fails. Setting to 0 makes the operation succeed only if + // precondition fails. Setting to `0` makes the operation succeed only if // there is a live version of the object. IfGenerationNotMatch *int64 `protobuf:"varint,4,opt,name=if_generation_not_match,json=ifGenerationNotMatch,proto3,oneof" json:"if_generation_not_match,omitempty"` // Makes the operation conditional on whether the object's current @@ -2482,14 +2511,14 @@ type WriteObjectSpec struct { IfMetagenerationNotMatch *int64 `protobuf:"varint,6,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` // The expected final object size being uploaded. // If this value is set, closing the stream after writing fewer or more than - // `object_size` bytes will result in an OUT_OF_RANGE error. + // `object_size` bytes results in an `OUT_OF_RANGE` error. // // This situation is considered a client error, and if such an error occurs // you must start the upload over from scratch, this time sending the correct // number of bytes. ObjectSize *int64 `protobuf:"varint,8,opt,name=object_size,json=objectSize,proto3,oneof" json:"object_size,omitempty"` - // If true, the object will be created in appendable mode. - // This field may only be set when using BidiWriteObject. + // If `true`, the object is created in appendable mode. + // This field might only be set when using `BidiWriteObject`. Appendable *bool `protobuf:"varint,9,opt,name=appendable,proto3,oneof" json:"appendable,omitempty"` } @@ -2579,7 +2608,7 @@ func (x *WriteObjectSpec) GetAppendable() bool { return false } -// Request message for WriteObject. +// Request message for [WriteObject][google.storage.v2.Storage.WriteObject]. type WriteObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2604,7 +2633,7 @@ type WriteObjectRequest struct { // first `write_offset` and the sizes of all `data` chunks sent previously on // this stream. // - // An incorrect value will cause an error. + // An incorrect value causes an error. WriteOffset int64 `protobuf:"varint,3,opt,name=write_offset,json=writeOffset,proto3" json:"write_offset,omitempty"` // A portion of the data for the object. // @@ -2613,19 +2642,19 @@ type WriteObjectRequest struct { // *WriteObjectRequest_ChecksummedData Data isWriteObjectRequest_Data `protobuf_oneof:"data"` // Optional. Checksums for the complete object. If the checksums computed by - // the service don't match the specified checksums the call will fail. May - // only be provided in the first or last request (either with first_message, - // or finish_write set). + // the service don't match the specified checksums the call fails. This field + // might only be provided in the first or last request (either with + // `first_message`, or `finish_write` set). ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` - // will cause an error. - // For a non-resumable write (where the upload_id was not set in the first + // causes an error. + // For a non-resumable write (where the `upload_id` was not set in the first // message), it is an error not to set this field in the final message of the // stream. FinishWrite bool `protobuf:"varint,7,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"` - // Optional. A set of parameters common to Storage API requests concerning an - // object. + // Optional. A set of parameters common to Cloud Storage API requests + // concerning an object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,8,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` } @@ -2748,19 +2777,20 @@ type isWriteObjectRequest_Data interface { type WriteObjectRequest_ChecksummedData struct { // The data to insert. If a crc32c checksum is provided that doesn't match - // the checksum computed by the service, the request will fail. + // the checksum computed by the service, the request fails. ChecksummedData *ChecksummedData `protobuf:"bytes,4,opt,name=checksummed_data,json=checksummedData,proto3,oneof"` } func (*WriteObjectRequest_ChecksummedData) isWriteObjectRequest_Data() {} -// Response message for WriteObject. +// Response message for +// [WriteObject][google.storage.v2.Storage.WriteObject]. type WriteObjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The response will set one of the following. + // The response sets one of the following. // // Types that are assignable to WriteStatus: // @@ -2865,7 +2895,7 @@ type AppendObjectSpec struct { // is empty. IfMetagenerationNotMatch *int64 `protobuf:"varint,5,opt,name=if_metageneration_not_match,json=ifMetagenerationNotMatch,proto3,oneof" json:"if_metageneration_not_match,omitempty"` // An optional routing token that influences request routing for the stream. - // Must be provided if a BidiWriteObjectRedirectedError is returned. + // Must be provided if a `BidiWriteObjectRedirectedError` is returned. RoutingToken *string `protobuf:"bytes,6,opt,name=routing_token,json=routingToken,proto3,oneof" json:"routing_token,omitempty"` // An optional write handle returned from a previous BidiWriteObjectResponse // message or a BidiWriteObjectRedirectedError error. @@ -2954,7 +2984,8 @@ func (x *AppendObjectSpec) GetWriteHandle() *BidiWriteHandle { return nil } -// Request message for BidiWriteObject. +// Request message for +// [BidiWriteObject][google.storage.v2.Storage.BidiWriteObject]. type BidiWriteObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2972,15 +3003,15 @@ type BidiWriteObjectRequest struct { // should be written. // // In the first `WriteObjectRequest` of a `WriteObject()` action, it - // indicates the initial offset for the `Write()` call. The value **must** be + // indicates the initial offset for the `Write()` call. The value must be // equal to the `persisted_size` that a call to `QueryWriteStatus()` would // return (0 if this is the first write to the object). // - // On subsequent calls, this value **must** be no larger than the sum of the + // On subsequent calls, this value must be no larger than the sum of the // first `write_offset` and the sizes of all `data` chunks sent previously on // this stream. // - // An invalid value will cause an error. + // An invalid value causes an error. WriteOffset int64 `protobuf:"varint,3,opt,name=write_offset,json=writeOffset,proto3" json:"write_offset,omitempty"` // A portion of the data for the object. // @@ -2989,30 +3020,30 @@ type BidiWriteObjectRequest struct { // *BidiWriteObjectRequest_ChecksummedData Data isBidiWriteObjectRequest_Data `protobuf_oneof:"data"` // Optional. Checksums for the complete object. If the checksums computed by - // the service don't match the specified checksums the call will fail. May - // only be provided in the first request or the last request (with - // finish_write set). + // the service don't match the specified checksums the call fails. Might only + // be provided in the first request or the last request (with finish_write + // set). ObjectChecksums *ObjectChecksums `protobuf:"bytes,6,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` - // Optional. For each BidiWriteObjectRequest where state_lookup is `true` or - // the client closes the stream, the service will send a - // BidiWriteObjectResponse containing the current persisted size. The + // Optional. For each `BidiWriteObjectRequest` where `state_lookup` is `true` + // or the client closes the stream, the service sends a + // `BidiWriteObjectResponse` containing the current persisted size. The // persisted size sent in responses covers all the bytes the server has // persisted thus far and can be used to decide what data is safe for the // client to drop. Note that the object's current size reported by the - // BidiWriteObjectResponse may lag behind the number of bytes written by the - // client. This field is ignored if `finish_write` is set to true. + // `BidiWriteObjectResponse` might lag behind the number of bytes written by + // the client. This field is ignored if `finish_write` is set to true. StateLookup bool `protobuf:"varint,7,opt,name=state_lookup,json=stateLookup,proto3" json:"state_lookup,omitempty"` // Optional. Persists data written on the stream, up to and including the // current message, to permanent storage. This option should be used sparingly - // as it may reduce performance. Ongoing writes will periodically be persisted + // as it might reduce performance. Ongoing writes are periodically persisted // on the server even when `flush` is not set. This field is ignored if // `finish_write` is set to true since there's no need to checkpoint or flush // if this message completes the write. Flush bool `protobuf:"varint,8,opt,name=flush,proto3" json:"flush,omitempty"` // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` - // will cause an error. - // For a non-resumable write (where the upload_id was not set in the first + // causes an error. + // For a non-resumable write (where the `upload_id` was not set in the first // message), it is an error not to set this field in the final message of the // stream. FinishWrite bool `protobuf:"varint,9,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"` @@ -3168,7 +3199,7 @@ type isBidiWriteObjectRequest_Data interface { type BidiWriteObjectRequest_ChecksummedData struct { // The data to insert. If a crc32c checksum is provided that doesn't match - // the checksum computed by the service, the request will fail. + // the checksum computed by the service, the request fails. ChecksummedData *ChecksummedData `protobuf:"bytes,4,opt,name=checksummed_data,json=checksummedData,proto3,oneof"` } @@ -3180,14 +3211,14 @@ type BidiWriteObjectResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The response will set one of the following. + // The response sets one of the following. // // Types that are assignable to WriteStatus: // // *BidiWriteObjectResponse_PersistedSize // *BidiWriteObjectResponse_Resource WriteStatus isBidiWriteObjectResponse_WriteStatus `protobuf_oneof:"write_status"` - // An optional write handle that will periodically be present in response + // An optional write handle that is returned periodically in response // messages. Clients should save it for later use in establishing a new stream // if a connection is interrupted. WriteHandle *BidiWriteHandle `protobuf:"bytes,3,opt,name=write_handle,json=writeHandle,proto3,oneof" json:"write_handle,omitempty"` @@ -3271,7 +3302,7 @@ func (*BidiWriteObjectResponse_PersistedSize) isBidiWriteObjectResponse_WriteSta func (*BidiWriteObjectResponse_Resource) isBidiWriteObjectResponse_WriteStatus() {} -// Request message for ListObjects. +// Request message for [ListObjects][google.storage.v2.Storage.ListObjects]. type ListObjectsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3281,58 +3312,57 @@ type ListObjectsRequest struct { Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Optional. Maximum number of `items` plus `prefixes` to return // in a single page of responses. As duplicate `prefixes` are - // omitted, fewer total results may be returned than requested. The service - // will use this parameter or 1,000 items, whichever is smaller. + // omitted, fewer total results might be returned than requested. The service + // uses this parameter or 1,000 items, whichever is smaller. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Optional. A previously-returned page token representing part of the larger // set of results to view. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. If set, returns results in a directory-like mode. `items` will - // contain only objects whose names, aside from the `prefix`, do not contain + // Optional. If set, returns results in a directory-like mode. `items` + // contains only objects whose names, aside from the `prefix`, do not contain // `delimiter`. Objects whose names, aside from the `prefix`, contain - // `delimiter` will have their name, truncated after the `delimiter`, returned - // in `prefixes`. Duplicate `prefixes` are omitted. + // `delimiter` has their name, truncated after the `delimiter`, returned in + // `prefixes`. Duplicate `prefixes` are omitted. Delimiter string `protobuf:"bytes,4,opt,name=delimiter,proto3" json:"delimiter,omitempty"` // Optional. If true, objects that end in exactly one instance of `delimiter` - // will have their metadata included in `items` in addition to + // has their metadata included in `items` in addition to // `prefixes`. IncludeTrailingDelimiter bool `protobuf:"varint,5,opt,name=include_trailing_delimiter,json=includeTrailingDelimiter,proto3" json:"include_trailing_delimiter,omitempty"` // Optional. Filter results to objects whose names begin with this prefix. Prefix string `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"` // Optional. If `true`, lists all versions of an object as distinct results. - // For more information, see - // [Object - // Versioning](https://cloud.google.com/storage/docs/object-versioning). Versions bool `protobuf:"varint,7,opt,name=versions,proto3" json:"versions,omitempty"` // Mask specifying which fields to read from each result. - // If no mask is specified, will default to all fields except items.acl and - // items.owner. - // * may be used to mean "all fields". + // If no mask is specified, defaults to all fields except `items.acl` and + // `items.owner`. + // `*` might be used to mean all fields. ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,8,opt,name=read_mask,json=readMask,proto3,oneof" json:"read_mask,omitempty"` // Optional. Filter results to objects whose names are lexicographically equal - // to or after lexicographic_start. If lexicographic_end is also set, the - // objects listed have names between lexicographic_start (inclusive) and - // lexicographic_end (exclusive). + // to or after `lexicographic_start`. If `lexicographic_end` is also set, the + // objects listed have names between `lexicographic_start` (inclusive) and + // `lexicographic_end` (exclusive). LexicographicStart string `protobuf:"bytes,10,opt,name=lexicographic_start,json=lexicographicStart,proto3" json:"lexicographic_start,omitempty"` // Optional. Filter results to objects whose names are lexicographically - // before lexicographic_end. If lexicographic_start is also set, the objects - // listed have names between lexicographic_start (inclusive) and - // lexicographic_end (exclusive). + // before `lexicographic_end`. If `lexicographic_start` is also set, the + // objects listed have names between `lexicographic_start` (inclusive) and + // `lexicographic_end` (exclusive). LexicographicEnd string `protobuf:"bytes,11,opt,name=lexicographic_end,json=lexicographicEnd,proto3" json:"lexicographic_end,omitempty"` // Optional. If true, only list all soft-deleted versions of the object. // Soft delete policy is required to set this option. SoftDeleted bool `protobuf:"varint,12,opt,name=soft_deleted,json=softDeleted,proto3" json:"soft_deleted,omitempty"` - // Optional. If true, will also include folders and managed folders (besides - // objects) in the returned `prefixes`. Requires `delimiter` to be set to '/'. + // Optional. If true, includes folders and managed folders (besides objects) + // in the returned `prefixes`. Requires `delimiter` to be set to '/'. IncludeFoldersAsPrefixes bool `protobuf:"varint,13,opt,name=include_folders_as_prefixes,json=includeFoldersAsPrefixes,proto3" json:"include_folders_as_prefixes,omitempty"` // Optional. Filter results to objects and prefixes that match this glob - // pattern. See [List Objects Using - // Glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob) + // pattern. See [List objects using + // glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob) // for the full syntax. MatchGlob string `protobuf:"bytes,14,opt,name=match_glob,json=matchGlob,proto3" json:"match_glob,omitempty"` - // Optional. Filter the returned objects. Currently only supported for the - // `contexts` field. If `delimiter` is set, the returned `prefixes` are exempt - // from this filter. + // Optional. An expression used to filter the returned objects by the + // `context` field. For the full syntax, see [Filter objects by contexts + // syntax](https://cloud.google.com/storage/docs/listing-objects#filter-by-object-contexts-syntax). + // If a `delimiter` is set, the returned `prefixes` are exempt from this + // filter. Filter string `protobuf:"bytes,15,opt,name=filter,proto3" json:"filter,omitempty"` } @@ -3464,7 +3494,8 @@ func (x *ListObjectsRequest) GetFilter() string { return "" } -// Request object for `QueryWriteStatus`. +// Request object for +// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus]. type QueryWriteStatusRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3522,13 +3553,14 @@ func (x *QueryWriteStatusRequest) GetCommonObjectRequestParams() *CommonObjectRe return nil } -// Response object for `QueryWriteStatus`. +// Response object for +// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus]. type QueryWriteStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The response will set one of the following. + // The response sets one of the following. // // Types that are assignable to WriteStatus: // @@ -3610,14 +3642,15 @@ func (*QueryWriteStatusResponse_PersistedSize) isQueryWriteStatusResponse_WriteS func (*QueryWriteStatusResponse_Resource) isQueryWriteStatusResponse_WriteStatus() {} -// Request message for RewriteObject. +// Request message for [RewriteObject][google.storage.v2.Storage.RewriteObject]. // If the source object is encrypted using a Customer-Supplied Encryption Key -// the key information must be provided in the copy_source_encryption_algorithm, -// copy_source_encryption_key_bytes, and copy_source_encryption_key_sha256_bytes -// fields. If the destination object should be encrypted the keying information -// should be provided in the encryption_algorithm, encryption_key_bytes, and -// encryption_key_sha256_bytes fields of the -// common_object_request_params.customer_encryption field. +// the key information must be provided in the +// `copy_source_encryption_algorithm`, `copy_source_encryption_key_bytes`, and +// `copy_source_encryption_key_sha256_bytes` fields. If the destination object +// should be encrypted the keying information should be provided in the +// `encryption_algorithm`, `encryption_key_bytes`, and +// `encryption_key_sha256_bytes` fields of the +// `common_object_request_params.customer_encryption` field. type RewriteObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3634,7 +3667,7 @@ type RewriteObjectRequest struct { // Required. Immutable. The name of the bucket containing the destination // object. DestinationBucket string `protobuf:"bytes,25,opt,name=destination_bucket,json=destinationBucket,proto3" json:"destination_bucket,omitempty"` - // Optional. The name of the Cloud KMS key that will be used to encrypt the + // Optional. The name of the Cloud KMS key that is used to encrypt the // destination object. The Cloud KMS key must be located in same location as // the object. If the parameter is not specified, the request uses the // destination bucket's default encryption key, if any, or else the @@ -3644,8 +3677,8 @@ type RewriteObjectRequest struct { // The `name`, `bucket` and `kms_key` fields must not be populated (these // values are specified in the `destination_name`, `destination_bucket`, and // `destination_kms_key` fields). - // If `destination` is present it will be used to construct the destination - // object's metadata; otherwise the destination object's metadata will be + // If `destination` is present it is used to construct the destination + // object's metadata; otherwise the destination object's metadata is // copied from the source object. Destination *Object `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` // Required. Name of the bucket in which to find the source object. @@ -3662,8 +3695,8 @@ type RewriteObjectRequest struct { // first rewrite request. RewriteToken string `protobuf:"bytes,5,opt,name=rewrite_token,json=rewriteToken,proto3" json:"rewrite_token,omitempty"` // Optional. Apply a predefined set of access controls to the destination - // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", - // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". + // object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`, + // `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`. DestinationPredefinedAcl string `protobuf:"bytes,28,opt,name=destination_predefined_acl,json=destinationPredefinedAcl,proto3" json:"destination_predefined_acl,omitempty"` // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -3692,7 +3725,7 @@ type RewriteObjectRequest struct { // Makes the operation conditional on whether the source object's current // metageneration does not match the given value. IfSourceMetagenerationNotMatch *int64 `protobuf:"varint,14,opt,name=if_source_metageneration_not_match,json=ifSourceMetagenerationNotMatch,proto3,oneof" json:"if_source_metageneration_not_match,omitempty"` - // Optional. The maximum number of bytes that will be rewritten per rewrite + // Optional. The maximum number of bytes that are rewritten per rewrite // request. Most callers shouldn't need to specify this parameter - it is // primarily in place to support testing. If specified the value must be an // integral multiple of 1 MiB (1048576). Also, this only applies to requests @@ -3714,8 +3747,8 @@ type RewriteObjectRequest struct { // Optional. A set of parameters common to Storage API requests concerning an // object. CommonObjectRequestParams *CommonObjectRequestParams `protobuf:"bytes,19,opt,name=common_object_request_params,json=commonObjectRequestParams,proto3" json:"common_object_request_params,omitempty"` - // Optional. The checksums of the complete object. This will be used to - // validate the destination object after rewriting. + // Optional. The checksums of the complete object. This is used to validate + // the destination object after rewriting. ObjectChecksums *ObjectChecksums `protobuf:"bytes,29,opt,name=object_checksums,json=objectChecksums,proto3" json:"object_checksums,omitempty"` } @@ -3998,7 +4031,7 @@ func (x *RewriteResponse) GetResource() *Object { return nil } -// Request message for MoveObject. +// Request message for [MoveObject][google.storage.v2.Storage.MoveObject]. type MoveObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4167,7 +4200,8 @@ func (x *MoveObjectRequest) GetIfMetagenerationNotMatch() int64 { return 0 } -// Request message StartResumableWrite. +// Request message for +// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite]. type StartResumableWriteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4237,7 +4271,8 @@ func (x *StartResumableWriteRequest) GetObjectChecksums() *ObjectChecksums { return nil } -// Response object for `StartResumableWrite`. +// Response object for +// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite]. type StartResumableWriteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4288,7 +4323,7 @@ func (x *StartResumableWriteResponse) GetUploadId() string { return "" } -// Request message for UpdateObject. +// Request message for [UpdateObject][google.storage.v2.Storage.UpdateObject]. type UpdateObjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4324,7 +4359,7 @@ type UpdateObjectRequest struct { // To specify ALL fields, equivalent to the JSON API's "update" function, // specify a single field with the value `*`. Note: not recommended. If a new // field is introduced at a later time, an older client updating with the `*` - // may accidentally reset the new field's value. + // might accidentally reset the new field's value. // // Not specifying any fields is an error. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` @@ -4440,8 +4475,8 @@ type CommonObjectRequestParams struct { // Optional. Encryption key used with the Customer-Supplied Encryption Keys // feature. In raw bytes format (not base64-encoded). EncryptionKeyBytes []byte `protobuf:"bytes,4,opt,name=encryption_key_bytes,json=encryptionKeyBytes,proto3" json:"encryption_key_bytes,omitempty"` - // Optional. SHA256 hash of encryption key used with the Customer-Supplied - // Encryption Keys feature. + // Optional. SHA256 hash of encryption key used with the Customer-supplied + // encryption keys feature. EncryptionKeySha256Bytes []byte `protobuf:"bytes,5,opt,name=encryption_key_sha256_bytes,json=encryptionKeySha256Bytes,proto3" json:"encryption_key_sha256_bytes,omitempty"` } @@ -4544,25 +4579,23 @@ type Bucket struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Output only. The user-chosen part of the bucket name. The `{bucket}` // portion of the `name` field. For globally unique buckets, this is equal to - // the "bucket name" of other Cloud Storage APIs. Example: "pub". + // the `bucket name` of other Cloud Storage APIs. Example: `pub`. BucketId string `protobuf:"bytes,2,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` // The etag of the bucket. - // If included in the metadata of an UpdateBucketRequest, the operation will - // only be performed if the etag matches that of the bucket. + // If included in the metadata of an `UpdateBucketRequest`, the operation is + // only performed if the `etag` matches that of the bucket. Etag string `protobuf:"bytes,29,opt,name=etag,proto3" json:"etag,omitempty"` // Immutable. The project which owns this bucket, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - // Output values will always be in project number format. + // `projects/{projectIdentifier}`. + // `{projectIdentifier}` can be the project ID or project number. + // Output values are always in the project number format. Project string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` // Output only. The metadata generation of this bucket. Metageneration int64 `protobuf:"varint,4,opt,name=metageneration,proto3" json:"metageneration,omitempty"` // Immutable. The location of the bucket. Object data for objects in the // bucket resides in physical storage within this region. Defaults to `US`. - // See the - // [https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's - // guide] for the authoritative list. Attempting to update this field after - // the bucket is created will result in an error. + // Attempting to update this field after the bucket is created results in an + // error. Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` // Output only. The location type of the bucket (region, dual-region, // multi-region, etc). @@ -4570,44 +4603,44 @@ type Bucket struct { // Optional. The bucket's default storage class, used whenever no storageClass // is specified for a newly-created object. This defines how objects in the // bucket are stored and determines the SLA and the cost of storage. - // If this value is not specified when the bucket is created, it will default - // to `STANDARD`. For more information, see - // https://developers.google.com/storage/docs/storage-classes. + // If this value is not specified when the bucket is created, it defaults + // to `STANDARD`. For more information, see [Storage + // classes](https://developers.google.com/storage/docs/storage-classes). StorageClass string `protobuf:"bytes,7,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` // Optional. The recovery point objective for cross-region replication of the - // bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses - // default replication. "ASYNC_TURBO" enables turbo replication, valid for + // bucket. Applicable only for dual- and multi-region buckets. `DEFAULT` uses + // default replication. `ASYNC_TURBO` enables turbo replication, valid for // dual-region buckets only. If rpo is not specified when the bucket is - // created, it defaults to "DEFAULT". For more information, see - // https://cloud.google.com/storage/docs/availability-durability#turbo-replication. + // created, it defaults to `DEFAULT`. For more information, see [Turbo + // replication](https://cloud.google.com/storage/docs/availability-durability#turbo-replication). Rpo string `protobuf:"bytes,27,opt,name=rpo,proto3" json:"rpo,omitempty"` // Optional. Access controls on the bucket. - // If iam_config.uniform_bucket_level_access is enabled on this bucket, + // If `iam_config.uniform_bucket_level_access` is enabled on this bucket, // requests to set, read, or modify acl is an error. Acl []*BucketAccessControl `protobuf:"bytes,8,rep,name=acl,proto3" json:"acl,omitempty"` // Optional. Default access controls to apply to new objects when no ACL is - // provided. If iam_config.uniform_bucket_level_access is enabled on this + // provided. If `iam_config.uniform_bucket_level_access` is enabled on this // bucket, requests to set, read, or modify acl is an error. DefaultObjectAcl []*ObjectAccessControl `protobuf:"bytes,9,rep,name=default_object_acl,json=defaultObjectAcl,proto3" json:"default_object_acl,omitempty"` - // Optional. The bucket's lifecycle config. See - // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management] - // for more information. + // Optional. The bucket's lifecycle configuration. See [Lifecycle + // Management](https://developers.google.com/storage/docs/lifecycle) for more + // information. Lifecycle *Bucket_Lifecycle `protobuf:"bytes,10,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"` // Output only. The creation time of the bucket. CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource - // Sharing] (CORS) config. + // Optional. The bucket's [CORS](https://www.w3.org/TR/cors/) + // configuration. Cors []*Bucket_Cors `protobuf:"bytes,12,rep,name=cors,proto3" json:"cors,omitempty"` // Output only. The modification time of the bucket. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // Optional. The default value for event-based hold on newly created objects // in this bucket. Event-based hold is a way to retain objects indefinitely // until an event occurs, signified by the hold's release. After being - // released, such objects will be subject to bucket-level retention (if any). - // One sample use case of this flag is for banks to hold loan documents for at + // released, such objects are subject to bucket-level retention (if any). One + // sample use case of this flag is for banks to hold loan documents for at // least 3 years after loan is paid in full. Here, bucket-level retention is 3 // years and the event is loan being paid in full. In this example, these - // objects will be held intact for any number of years until the event has + // objects are held intact for any number of years until the event has // occurred (event-based hold on the object is released) and then 3 more years // after that. That means retention duration of the objects begins from the // moment event-based hold transitioned from true to false. Objects under @@ -4617,11 +4650,11 @@ type Bucket struct { // Optional. User-provided labels, in key/value pairs. Labels map[string]string `protobuf:"bytes,15,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Optional. The bucket's website config, controlling how the service behaves - // when accessing bucket contents as a web site. See the - // [https://cloud.google.com/storage/docs/static-website][Static Website - // Examples] for more information. + // when accessing bucket contents as a web site. See the [Static website + // examples](https://cloud.google.com/storage/docs/static-website) for more + // information. Website *Bucket_Website `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"` - // Optional. The bucket's versioning config. + // Optional. The bucket's versioning configuration. Versioning *Bucket_Versioning `protobuf:"bytes,17,opt,name=versioning,proto3" json:"versioning,omitempty"` // Optional. The bucket's logging config, which defines the destination bucket // and name prefix (if any) for the current bucket's logs. @@ -4631,40 +4664,39 @@ type Bucket struct { Owner *Owner `protobuf:"bytes,19,opt,name=owner,proto3" json:"owner,omitempty"` // Optional. Encryption config for a bucket. Encryption *Bucket_Encryption `protobuf:"bytes,20,opt,name=encryption,proto3" json:"encryption,omitempty"` - // Optional. The bucket's billing config. + // Optional. The bucket's billing configuration. Billing *Bucket_Billing `protobuf:"bytes,21,opt,name=billing,proto3" json:"billing,omitempty"` // Optional. The bucket's retention policy. The retention policy enforces a // minimum retention time for all objects contained in the bucket, based on // their creation time. Any attempt to overwrite or delete objects younger - // than the retention period will result in a PERMISSION_DENIED error. An + // than the retention period results in a `PERMISSION_DENIED` error. An // unlocked retention policy can be modified or removed from the bucket via a // storage.buckets.update operation. A locked retention policy cannot be // removed or shortened in duration for the lifetime of the bucket. - // Attempting to remove or decrease period of a locked retention policy will - // result in a PERMISSION_DENIED error. + // Attempting to remove or decrease period of a locked retention policy + // results in a `PERMISSION_DENIED` error. RetentionPolicy *Bucket_RetentionPolicy `protobuf:"bytes,22,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"` - // Optional. The bucket's IAM config. + // Optional. The bucket's IAM configuration. IamConfig *Bucket_IamConfig `protobuf:"bytes,23,opt,name=iam_config,json=iamConfig,proto3" json:"iam_config,omitempty"` // Optional. Reserved for future use. SatisfiesPzs bool `protobuf:"varint,25,opt,name=satisfies_pzs,json=satisfiesPzs,proto3" json:"satisfies_pzs,omitempty"` // Optional. Configuration that, if present, specifies the data placement for - // a - // [https://cloud.google.com/storage/docs/locations#location-dr][configurable - // dual-region]. + // a [configurable + // dual-region](https://cloud.google.com/storage/docs/locations#location-dr). CustomPlacementConfig *Bucket_CustomPlacementConfig `protobuf:"bytes,26,opt,name=custom_placement_config,json=customPlacementConfig,proto3" json:"custom_placement_config,omitempty"` // Optional. The bucket's Autoclass configuration. If there is no - // configuration, the Autoclass feature will be disabled and have no effect on - // the bucket. + // configuration, the Autoclass feature is disabled and has no effect on the + // bucket. Autoclass *Bucket_Autoclass `protobuf:"bytes,28,opt,name=autoclass,proto3" json:"autoclass,omitempty"` // Optional. The bucket's hierarchical namespace configuration. If there is no - // configuration, the hierarchical namespace feature will be disabled and have + // configuration, the hierarchical namespace feature is disabled and has // no effect on the bucket. HierarchicalNamespace *Bucket_HierarchicalNamespace `protobuf:"bytes,32,opt,name=hierarchical_namespace,json=hierarchicalNamespace,proto3" json:"hierarchical_namespace,omitempty"` // Optional. The bucket's soft delete policy. The soft delete policy prevents // soft-deleted objects from being permanently deleted. SoftDeletePolicy *Bucket_SoftDeletePolicy `protobuf:"bytes,31,opt,name=soft_delete_policy,json=softDeletePolicy,proto3" json:"soft_delete_policy,omitempty"` // Optional. The bucket's object retention configuration. Must be enabled - // before objects in the bucket may have retention configured. + // before objects in the bucket might have retention configured. ObjectRetention *Bucket_ObjectRetention `protobuf:"bytes,33,opt,name=object_retention,json=objectRetention,proto3" json:"object_retention,omitempty"` // Optional. The bucket's IP filter configuration. IpFilter *Bucket_IpFilter `protobuf:"bytes,38,opt,name=ip_filter,json=ipFilter,proto3,oneof" json:"ip_filter,omitempty"` @@ -4950,18 +4982,18 @@ type BucketAccessControl struct { // `group-example@googlegroups.com` // * All members of the Google Apps for Business domain `example.com` would be // `domain-example.com` - // For project entities, `project-{team}-{projectnumber}` format will be + // For project entities, `project-{team}-{projectnumber}` format is // returned on response. Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` // Output only. The alternative entity format, if exists. For project - // entities, `project-{team}-{projectid}` format will be returned on response. + // entities, `project-{team}-{projectid}` format is returned in the response. EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"` // Optional. The ID for the entity, if any. EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - // Optional. The etag of the BucketAccessControl. + // Optional. The `etag` of the `BucketAccessControl`. // If included in the metadata of an update or delete request message, the - // operation operation will only be performed if the etag matches that of the - // bucket's BucketAccessControl. + // operation operation is only performed if the etag matches that of the + // bucket's `BucketAccessControl`. Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` // Optional. The email address associated with the entity, if any. Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` @@ -5129,16 +5161,15 @@ type ObjectChecksums struct { // CRC32C digest of the object data. Computed by the Cloud Storage service for // all written objects. - // If set in a WriteObjectRequest, service will validate that the stored + // If set in a WriteObjectRequest, service validates that the stored // object matches this checksum. Crc32C *uint32 `protobuf:"fixed32,1,opt,name=crc32c,proto3,oneof" json:"crc32c,omitempty"` - // Optional. 128 bit MD5 hash of the object data. - // For more information about using the MD5 hash, see - // [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and - // ETags: Best Practices]. - // Not all objects will provide an MD5 hash. For example, composite objects - // provide only crc32c hashes. This value is equivalent to running `cat - // object.txt | openssl md5 -binary` + // Optional. 128 bit MD5 hash of the object data. For more information about + // using the MD5 hash, see [Data validation and change + // detection](https://cloud.google.com/storage/docs/data-validation). Not all + // objects provide an MD5 hash. For example, composite objects provide only + // crc32c hashes. This value is equivalent to running `cat object.txt | + // openssl md5 -binary` Md5Hash []byte `protobuf:"bytes,2,opt,name=md5_hash,json=md5Hash,proto3" json:"md5_hash,omitempty"` } @@ -5298,8 +5329,8 @@ func (x *ObjectContexts) GetCustom() map[string]*ObjectCustomContextPayload { return nil } -// Describes the Customer-Supplied Encryption Key mechanism used to store an -// Object's data at rest. +// Describes the customer-supplied encryption key mechanism used to store an +// object's data at rest. type CustomerEncryption struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5372,9 +5403,9 @@ type Object struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Immutable. The name of the bucket containing this object. Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"` - // Optional. The etag of the object. + // Optional. The `etag` of an object. // If included in the metadata of an update or delete request message, the - // operation will only be performed if the etag matches that of the live + // operation is only performed if the etag matches that of the live // object. Etag string `protobuf:"bytes,27,opt,name=etag,proto3" json:"etag,omitempty"` // Immutable. The content generation of this object. Used for object @@ -5392,25 +5423,25 @@ type Object struct { // Optional. Storage class of the object. StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` // Output only. Content-Length of the object data in bytes, matching - // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2]. + // [RFC 7230 §3.3.2](https://tools.ietf.org/html/rfc7230#section-3.3.2]). Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` // Optional. Content-Encoding of the object data, matching - // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2] + // [RFC 7231 §3.1.2.2](https://tools.ietf.org/html/rfc7231#section-3.1.2.2) ContentEncoding string `protobuf:"bytes,7,opt,name=content_encoding,json=contentEncoding,proto3" json:"content_encoding,omitempty"` // Optional. Content-Disposition of the object data, matching - // [https://tools.ietf.org/html/rfc6266][RFC 6266]. + // [RFC 6266](https://tools.ietf.org/html/rfc6266). ContentDisposition string `protobuf:"bytes,8,opt,name=content_disposition,json=contentDisposition,proto3" json:"content_disposition,omitempty"` // Optional. Cache-Control directive for the object data, matching - // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2]. + // [RFC 7234 §5.2](https://tools.ietf.org/html/rfc7234#section-5.2). // If omitted, and the object is accessible to all anonymous users, the - // default will be `public, max-age=3600`. + // default is `public, max-age=3600`. CacheControl string `protobuf:"bytes,9,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"` // Optional. Access controls on the object. - // If iam_config.uniform_bucket_level_access is enabled on the parent + // If `iam_config.uniform_bucket_level_access` is enabled on the parent // bucket, requests to set, read, or modify acl is an error. Acl []*ObjectAccessControl `protobuf:"bytes,10,rep,name=acl,proto3" json:"acl,omitempty"` // Optional. Content-Language of the object data, matching - // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2]. + // [RFC 7231 §3.1.3.2](https://tools.ietf.org/html/rfc7231#section-3.1.3.2). ContentLanguage string `protobuf:"bytes,11,opt,name=content_language,json=contentLanguage,proto3" json:"content_language,omitempty"` // Output only. If this object is noncurrent, this is the time when the object // became noncurrent. @@ -5418,7 +5449,7 @@ type Object struct { // Output only. The time when the object was finalized. FinalizeTime *timestamppb.Timestamp `protobuf:"bytes,36,opt,name=finalize_time,json=finalizeTime,proto3" json:"finalize_time,omitempty"` // Optional. Content-Type of the object data, matching - // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5]. + // [RFC 7231 §3.1.1.5](https://tools.ietf.org/html/rfc7231#section-3.1.1.5). // If an object is stored without a Content-Type, it is served as // `application/octet-stream`. ContentType string `protobuf:"bytes,13,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` @@ -5428,7 +5459,7 @@ type Object struct { // Components are accumulated by compose operations. ComponentCount int32 `protobuf:"varint,15,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"` // Output only. Hashes for the data part of this object. This field is used - // for output only and will be silently ignored if provided in requests. The + // for output only and is silently ignored if provided in requests. The // checksums of the complete object regardless of data range. If the object is // downloaded in full, the client should compute one of these checksums over // the downloaded object and compare it against the value provided here. @@ -5444,7 +5475,7 @@ type Object struct { // encrypted by such a key. KmsKey string `protobuf:"bytes,18,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` // Output only. The time at which the object's storage class was last changed. - // When the object is initially created, it will be set to time_created. + // When the object is initially created, it is set to `time_created`. UpdateStorageClassTime *timestamppb.Timestamp `protobuf:"bytes,19,opt,name=update_storage_class_time,json=updateStorageClassTime,proto3" json:"update_storage_class_time,omitempty"` // Optional. Whether an object is under temporary hold. While this flag is set // to true, the object is protected against deletion and overwrites. A common @@ -5469,19 +5500,19 @@ type Object struct { // Whether an object is under event-based hold. // An event-based hold is a way to force the retention of an object until // after some event occurs. Once the hold is released by explicitly setting - // this field to false, the object will become subject to any bucket-level - // retention policy, except that the retention duration will be calculated + // this field to `false`, the object becomes subject to any bucket-level + // retention policy, except that the retention duration is calculated // from the time the event based hold was lifted, rather than the time the // object was created. // - // In a WriteObject request, not setting this field implies that the value - // should be taken from the parent bucket's "default_event_based_hold" field. - // In a response, this field will always be set to true or false. + // In a `WriteObject` request, not setting this field implies that the value + // should be taken from the parent bucket's `default_event_based_hold` field. + // In a response, this field is always set to `true` or `false`. EventBasedHold *bool `protobuf:"varint,23,opt,name=event_based_hold,json=eventBasedHold,proto3,oneof" json:"event_based_hold,omitempty"` - // Output only. The owner of the object. This will always be the uploader of - // the object. + // Output only. The owner of the object. This is always the uploader of the + // object. Owner *Owner `protobuf:"bytes,24,opt,name=owner,proto3" json:"owner,omitempty"` - // Optional. Metadata of Customer-Supplied Encryption Key, if the object is + // Optional. Metadata of customer-supplied encryption key, if the object is // encrypted by such a key. CustomerEncryption *CustomerEncryption `protobuf:"bytes,25,opt,name=customer_encryption,json=customerEncryption,proto3" json:"customer_encryption,omitempty"` // Optional. A user-specified timestamp set on an object. @@ -5489,15 +5520,15 @@ type Object struct { // Output only. This is the time when the object became soft-deleted. // // Soft-deleted objects are only accessible if a soft_delete_policy is - // enabled. Also see hard_delete_time. + // enabled. Also see `hard_delete_time`. SoftDeleteTime *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=soft_delete_time,json=softDeleteTime,proto3,oneof" json:"soft_delete_time,omitempty"` - // Output only. The time when the object will be permanently deleted. + // Output only. The time when the object is permanently deleted. // - // Only set when an object becomes soft-deleted with a soft_delete_policy. - // Otherwise, the object will not be accessible. + // Only set when an object becomes soft-deleted with a `soft_delete_policy`. + // Otherwise, the object is not accessible. HardDeleteTime *timestamppb.Timestamp `protobuf:"bytes,29,opt,name=hard_delete_time,json=hardDeleteTime,proto3,oneof" json:"hard_delete_time,omitempty"` // Optional. Retention configuration of this object. - // May only be configured if the bucket has object retention enabled. + // Might only be configured if the bucket has object retention enabled. Retention *Object_Retention `protobuf:"bytes,30,opt,name=retention,proto3" json:"retention,omitempty"` } @@ -5792,17 +5823,17 @@ type ObjectAccessControl struct { // `group-example@googlegroups.com`. // * All members of the Google Apps for Business domain `example.com` would be // `domain-example.com`. - // For project entities, `project-{team}-{projectnumber}` format will be - // returned on response. + // For project entities, `project-{team}-{projectnumber}` format is + // returned in the response. Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` // Output only. The alternative entity format, if exists. For project - // entities, `project-{team}-{projectid}` format will be returned on response. + // entities, `project-{team}-{projectid}` format is returned in the response. EntityAlt string `protobuf:"bytes,9,opt,name=entity_alt,json=entityAlt,proto3" json:"entity_alt,omitempty"` // Optional. The ID for the entity, if any. EntityId string `protobuf:"bytes,4,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` // Optional. The etag of the ObjectAccessControl. // If included in the metadata of an update or delete request message, the - // operation will only be performed if the etag matches that of the live + // operation is only performed if the etag matches that of the live // object's ObjectAccessControl. Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` // Optional. The email address associated with the entity, if any. @@ -6224,7 +6255,7 @@ type ComposeObjectRequest_SourceObject_ObjectPreconditions struct { // Only perform the composition if the generation of the source object // that would be used matches this value. If this value and a generation - // are both specified, they must be the same value or the call will fail. + // are both specified, they must be the same value or the call fails. IfGenerationMatch *int64 `protobuf:"varint,1,opt,name=if_generation_match,json=ifGenerationMatch,proto3,oneof" json:"if_generation_match,omitempty"` } @@ -6321,22 +6352,23 @@ type Bucket_Cors struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Optional. The list of Origins eligible to receive CORS response headers. - // See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. - // Note: "*" is permitted in the list of origins, and means "any Origin". + // Optional. The list of origins eligible to receive CORS response headers. + // For more information about origins, see [RFC + // 6454](https://tools.ietf.org/html/rfc6454). Note: `*` is permitted in the + // list of origins, and means `any origin`. Origin []string `protobuf:"bytes,1,rep,name=origin,proto3" json:"origin,omitempty"` // Optional. The list of HTTP methods on which to include CORS response // headers, - // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of + // (`GET`, `OPTIONS`, `POST`, etc) Note: `*` is permitted in the list of // methods, and means "any method". Method []string `protobuf:"bytes,2,rep,name=method,proto3" json:"method,omitempty"` - // Optional. The list of HTTP headers other than the - // [https://www.w3.org/TR/cors/#simple-response-header][simple response - // headers] to give permission for the user-agent to share across domains. + // Optional. The list of HTTP headers other than the [simple response + // headers](https://www.w3.org/TR/cors/#simple-response-headers) to give + // permission for the user-agent to share across domains. ResponseHeader []string `protobuf:"bytes,3,rep,name=response_header,json=responseHeader,proto3" json:"response_header,omitempty"` - // Optional. The value, in seconds, to return in the - // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age - // header] used in preflight responses. + // Optional. The value, in seconds, to return in the [Access-Control-Max-Age + // header](https://www.w3.org/TR/cors/#access-control-max-age-response-header) + // used in preflight responses. MaxAgeSeconds int32 `protobuf:"varint,4,opt,name=max_age_seconds,json=maxAgeSeconds,proto3" json:"max_age_seconds,omitempty"` } @@ -6404,8 +6436,8 @@ type Bucket_Encryption struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Optional. The name of the Cloud KMS key that will be used to encrypt - // objects inserted into this bucket, if no encryption method is specified. + // Optional. The name of the Cloud KMS key that is used to encrypt objects + // inserted into this bucket, if no encryption method is specified. DefaultKmsKey string `protobuf:"bytes,1,opt,name=default_kms_key,json=defaultKmsKey,proto3" json:"default_kms_key,omitempty"` // Optional. If omitted, then new objects with GMEK encryption-type is // allowed. If set, then new objects created in this bucket must comply with @@ -6490,8 +6522,8 @@ type Bucket_IamConfig struct { // Optional. Bucket restriction options currently enforced on the bucket. UniformBucketLevelAccess *Bucket_IamConfig_UniformBucketLevelAccess `protobuf:"bytes,1,opt,name=uniform_bucket_level_access,json=uniformBucketLevelAccess,proto3" json:"uniform_bucket_level_access,omitempty"` - // Optional. Whether IAM will enforce public access prevention. Valid values - // are "enforced" or "inherited". + // Optional. Whether IAM enforces public access prevention. Valid values are + // `enforced` or `inherited`. PublicAccessPrevention string `protobuf:"bytes,3,opt,name=public_access_prevention,json=publicAccessPrevention,proto3" json:"public_access_prevention,omitempty"` } @@ -6540,14 +6572,15 @@ func (x *Bucket_IamConfig) GetPublicAccessPrevention() string { } // Lifecycle properties of a bucket. -// For more information, see https://cloud.google.com/storage/docs/lifecycle. +// For more information, see [Object Lifecycle +// Management](https://cloud.google.com/storage/docs/lifecycle). type Bucket_Lifecycle struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Optional. A lifecycle management rule, which is made of an action to take - // and the condition(s) under which the action will be taken. + // and the condition under which the action is taken. Rule []*Bucket_Lifecycle_Rule `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty"` } @@ -6708,7 +6741,7 @@ type Bucket_RetentionPolicy struct { // duration must be greater than zero and less than 100 years. Note that // enforcement of retention periods less than a day is not guaranteed. Such // periods should only be used for testing purposes. Any `nanos` value - // specified will be rounded down to the nearest second. + // specified is rounded down to the nearest second. RetentionDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=retention_duration,json=retentionDuration,proto3" json:"retention_duration,omitempty"` } @@ -6822,8 +6855,8 @@ func (x *Bucket_SoftDeletePolicy) GetEffectiveTime() *timestamppb.Timestamp { } // Properties of a bucket related to versioning. -// For more on Cloud Storage versioning, see -// https://cloud.google.com/storage/docs/object-versioning. +// For more information about Cloud Storage versioning, see [Object +// versioning](https://cloud.google.com/storage/docs/object-versioning). type Bucket_Versioning struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6871,22 +6904,22 @@ func (x *Bucket_Versioning) GetEnabled() bool { } // Properties of a bucket related to accessing the contents as a static -// website. For more on hosting a static website via Cloud Storage, see -// https://cloud.google.com/storage/docs/hosting-static-website. +// website. For details, see [hosting a static website using Cloud +// Storage](https://cloud.google.com/storage/docs/hosting-static-website). type Bucket_Website struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Optional. If the requested object path is missing, the service will - // ensure the path has a trailing '/', append this suffix, and attempt to - // retrieve the resulting object. This allows the creation of `index.html` - // objects to represent directory pages. + // Optional. If the requested object path is missing, the service ensures + // the path has a trailing '/', append this suffix, and attempt to retrieve + // the resulting object. This allows the creation of `index.html` objects to + // represent directory pages. MainPageSuffix string `protobuf:"bytes,1,opt,name=main_page_suffix,json=mainPageSuffix,proto3" json:"main_page_suffix,omitempty"` // Optional. If the requested object path is missing, and any // `mainPageSuffix` object is missing, if applicable, the service - // will return the named object from this bucket as the content for a - // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found] + // returns the named object from this bucket as the content for a + // [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) // result. NotFoundPage string `protobuf:"bytes,2,opt,name=not_found_page,json=notFoundPage,proto3" json:"not_found_page,omitempty"` } @@ -6935,9 +6968,11 @@ func (x *Bucket_Website) GetNotFoundPage() string { return "" } -// Configuration for Custom Dual Regions. It should specify precisely two -// eligible regions within the same Multiregion. More information on regions -// may be found [here](https://cloud.google.com/storage/docs/locations). +// Configuration for [configurable dual- +// regions](https://cloud.google.com/storage/docs/locations#configurable). It +// should specify precisely two eligible regions within the same multi-region. +// For details, see +// [locations](https://cloud.google.com/storage/docs/locations). type Bucket_CustomPlacementConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6994,10 +7029,10 @@ type Bucket_Autoclass struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // Output only. Latest instant at which the `enabled` field was set to true // after being disabled/unconfigured or set to false after being enabled. If - // Autoclass is enabled when the bucket is created, the toggle_time is set - // to the bucket creation time. + // Autoclass is enabled when the bucket is created, the value of the + // `toggle_time` field is set to the bucket `create_time`. ToggleTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=toggle_time,json=toggleTime,proto3" json:"toggle_time,omitempty"` - // An object in an Autoclass bucket will eventually cool down to the + // An object in an Autoclass bucket eventually cools down to the // terminal storage class if there is no access to the object. // The only valid values are NEARLINE and ARCHIVE. TerminalStorageClass *string `protobuf:"bytes,3,opt,name=terminal_storage_class,json=terminalStorageClass,proto3,oneof" json:"terminal_storage_class,omitempty"` @@ -7077,7 +7112,7 @@ type Bucket_IpFilter struct { // `Disabled`. When set to `Enabled`, IP filtering rules are applied to a // bucket and all incoming requests to the bucket are evaluated against // these rules. When set to `Disabled`, IP filtering rules are not applied - // to a bucket.". + // to a bucket. Mode *string `protobuf:"bytes,1,opt,name=mode,proto3,oneof" json:"mode,omitempty"` // Public IPs allowed to operate or access the bucket. PublicNetworkSource *Bucket_IpFilter_PublicNetworkSource `protobuf:"bytes,2,opt,name=public_network_source,json=publicNetworkSource,proto3,oneof" json:"public_network_source,omitempty"` @@ -7087,11 +7122,11 @@ type Bucket_IpFilter struct { // Optional. Whether or not to allow VPCs from orgs different than the // bucket's parent org to access the bucket. When set to true, validations // on the existence of the VPCs won't be performed. If set to false, each - // VPC network source will be checked to belong to the same org as the - // bucket as well as validated for existence. + // VPC network source is checked to belong to the same org as the bucket as + // well as validated for existence. AllowCrossOrgVpcs bool `protobuf:"varint,4,opt,name=allow_cross_org_vpcs,json=allowCrossOrgVpcs,proto3" json:"allow_cross_org_vpcs,omitempty"` // Whether or not to allow all P4SA access to the bucket. When set to true, - // IP filter config validation will not apply. + // IP filter config validation doesn't apply. AllowAllServiceAgentAccess *bool `protobuf:"varint,5,opt,name=allow_all_service_agent_access,json=allowAllServiceAgentAccess,proto3,oneof" json:"allow_all_service_agent_access,omitempty"` } @@ -7214,7 +7249,7 @@ type Bucket_Encryption_GoogleManagedEncryptionEnforcementConfig struct { unknownFields protoimpl.UnknownFields // Restriction mode for google-managed encryption for new objects within - // the bucket. Valid values are: "NotRestricted", "FullyRestricted". + // the bucket. Valid values are: `NotRestricted` and `FullyRestricted`. // If `NotRestricted` or unset, creation of new objects with // google-managed encryption is allowed. // If `FullyRestricted`, new objects can't be created using google-managed @@ -7275,7 +7310,7 @@ type Bucket_Encryption_CustomerManagedEncryptionEnforcementConfig struct { unknownFields protoimpl.UnknownFields // Restriction mode for customer-managed encryption for new objects within - // the bucket. Valid values are: "NotRestricted", "FullyRestricted". + // the bucket. Valid values are: `NotRestricted` and `FullyRestricted`. // If `NotRestricted` or unset, creation of new objects with // customer-managed encryption is allowed. // If `FullyRestricted`, new objects can't be created using @@ -7336,8 +7371,8 @@ type Bucket_Encryption_CustomerSuppliedEncryptionEnforcementConfig struct { unknownFields protoimpl.UnknownFields // Restriction mode for customer-supplied encryption for new objects - // within the bucket. Valid values are: "NotRestricted", - // "FullyRestricted". + // within the bucket. Valid values are: `NotRestricted` and + // `FullyRestricted`. // If `NotRestricted` or unset, creation of new objects with // customer-supplied encryption is allowed. // If `FullyRestricted`, new objects can't be created using @@ -7453,7 +7488,7 @@ func (x *Bucket_IamConfig_UniformBucketLevelAccess) GetLockTime() *timestamppb.T } // A lifecycle Rule, combining an action to take on an object and a -// condition which will trigger that action. +// condition which triggers that action. type Bucket_Lifecycle_Rule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7461,7 +7496,7 @@ type Bucket_Lifecycle_Rule struct { // Optional. The action to take. Action *Bucket_Lifecycle_Rule_Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` - // Optional. The condition(s) under which the action will be taken. + // Optional. The condition under which the action is taken. Condition *Bucket_Lifecycle_Rule_Condition `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"` } @@ -7591,8 +7626,8 @@ type Bucket_Lifecycle_Rule_Condition struct { // the live version) newer than this version of the object. NumNewerVersions *int32 `protobuf:"varint,4,opt,name=num_newer_versions,json=numNewerVersions,proto3,oneof" json:"num_newer_versions,omitempty"` // Optional. Objects having any of the storage classes specified by this - // condition will be matched. Values include `MULTI_REGIONAL`, - // `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and + // condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`, + // `NEARLINE`, `COLDLINE`, `STANDARD`, and // `DURABLE_REDUCED_AVAILABILITY`. MatchesStorageClass []string `protobuf:"bytes,5,rep,name=matches_storage_class,json=matchesStorageClass,proto3" json:"matches_storage_class,omitempty"` // Number of days that have elapsed since the custom timestamp set on an @@ -7605,7 +7640,7 @@ type Bucket_Lifecycle_Rule_Condition struct { // This condition is relevant only for versioned objects. An object // version satisfies this condition only if these many days have been // passed since it became noncurrent. The value of the field must be a - // nonnegative integer. If it's zero, the object version will become + // nonnegative integer. If it's zero, the object version becomes // eligible for Lifecycle action as soon as it becomes noncurrent. DaysSinceNoncurrentTime *int32 `protobuf:"varint,9,opt,name=days_since_noncurrent_time,json=daysSinceNoncurrentTime,proto3,oneof" json:"days_since_noncurrent_time,omitempty"` // Optional. This condition is relevant only for versioned objects. An @@ -7985,7 +8020,7 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{ 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x02, 0x0a, 0x12, + 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x6f, 0x72, @@ -8001,140 +8036,612 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{ 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, - 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, - 0x22, 0x72, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, - 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, + 0x01, 0x01, 0x12, 0x39, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x94, 0x01, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x20, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, + 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, 0x69, 0x66, + 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, + 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, + 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, 0x70, 0x72, + 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe5, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x60, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, + 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x15, + 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, + 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x72, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xb3, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, + 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, + 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, + 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xec, + 0x04, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, + 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, + 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, + 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, + 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, + 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, + 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xd8, 0x05, + 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, 0x52, 0x0d, + 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88, 0x01, 0x01, + 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, + 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x06, 0x0a, 0x11, 0x52, 0x65, + 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, + 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x09, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xc0, 0x03, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, - 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, + 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, + 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x16, + 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, + 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x98, 0x06, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, + 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x15, + 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, + 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x48, + 0x05, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x28, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x6f, 0x66, + 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, + 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, + 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x06, 0x0a, 0x12, 0x42, 0x69, + 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, - 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x1d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, - 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x1a, 0x0a, 0x18, + 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, + 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65, + 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x0b, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0c, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, + 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, 0x01, 0x0a, + 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, 0x65, + 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x0b, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, + 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, + 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42, 0x69, 0x64, + 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x28, + 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a, 0x1e, 0x42, + 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x0a, + 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, 0x42, 0x69, + 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, + 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x22, 0xba, + 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a, 0x0e, 0x42, + 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, + 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f, 0x42, 0x69, + 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1b, 0x0a, + 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc5, 0x04, 0x0a, 0x0f, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3a, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, + 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, + 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, + 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, + 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, + 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x87, 0x04, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, + 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, + 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, + 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a, + 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, + 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x65, 0x6e, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x17, + 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, + 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe5, 0x07, 0x0a, 0x14, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, + 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, + 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x22, 0xa3, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x53, + 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x41, + 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, + 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, - 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, - 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, - 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, - 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, - 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x72, - 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x1a, 0xb3, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, - 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, - 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x22, 0xec, 0x04, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, - 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, - 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, - 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, - 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, + 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, + 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, 0x75, 0x73, + 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x66, 0x6c, + 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, + 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, @@ -8142,1833 +8649,1367 @@ var file_google_storage_v2_storage_proto_rawDesc = []byte{ 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, - 0xd8, 0x05, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, - 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x48, 0x04, - 0x52, 0x0d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, + 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42, 0x69, 0x64, + 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, + 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, + 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x22, 0x9e, 0x05, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x72, + 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, + 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, + 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78, 0x69, 0x63, + 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, + 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x67, + 0x6c, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, - 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x6c, 0x22, 0x3f, 0x0a, 0x1b, 0x43, 0x61, - 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x06, 0x0a, 0x11, - 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, - 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x13, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xea, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, + 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, + 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x57, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, + 0x41, 0x02, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x13, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, + 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, + 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1a, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, + 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, + 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, + 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x1e, 0x69, 0x66, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, + 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x20, 0x63, 0x6f, 0x70, + 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1c, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x27, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x63, 0x6f, 0x70, 0x79, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x48, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, - 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, + 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, + 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, + 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xec, 0x07, 0x0a, 0x11, + 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x45, + 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x04, 0x52, 0x11, 0x69, 0x66, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, + 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x05, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x06, 0x52, 0x15, 0x69, 0x66, 0x4d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, + 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x1d, + 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, + 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x98, - 0x06, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x6f, - 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, - 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x11, 0x69, 0x66, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x02, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, - 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, - 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x04, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, + 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, + 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, + 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, + 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb9, 0x02, 0x0a, 0x1a, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x49, 0x64, 0x22, 0xd6, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, + 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, + 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x48, 0x05, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, - 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, - 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x5f, + 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, + 0x65, 0x64, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x02, 0x0a, 0x12, 0x52, 0x65, - 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x4d, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x52, 0x0f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x44, - 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd0, 0x06, 0x0a, 0x12, - 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, - 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, - 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xce, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x61, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x02, 0x18, 0x01, 0x48, 0x04, 0x52, 0x08, - 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x0b, 0x72, - 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x48, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x0c, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x16, - 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, - 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0c, - 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, - 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x10, 0x0a, 0x0e, - 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, - 0x01, 0x0a, 0x15, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, - 0x72, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, - 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, - 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, - 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, - 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x1d, 0x42, - 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x0b, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xed, 0x01, 0x0a, - 0x1e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, - 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, - 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x42, 0x0d, 0x0a, - 0x0b, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x13, - 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x22, 0x55, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, 0x12, 0x2a, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x09, 0x52, 0x65, 0x61, - 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0b, - 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x07, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x49, 0x64, - 0x22, 0xba, 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x72, 0x65, 0x61, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x22, 0x2d, 0x0a, - 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2e, 0x0a, 0x0f, - 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, - 0x1b, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xc5, 0x04, 0x0a, - 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x0e, - 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, - 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, - 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, - 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, - 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x04, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, - 0x12, 0x23, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x05, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, - 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, - 0x61, 0x62, 0x6c, 0x65, 0x22, 0x87, 0x04, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x09, 0x75, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x11, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0f, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, - 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x87, - 0x01, 0x0a, 0x13, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, - 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x41, 0x70, 0x70, - 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, - 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, - 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, - 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, - 0x00, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, - 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x01, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x48, 0x03, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xa3, 0x05, 0x0a, 0x16, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x50, - 0x0a, 0x11, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, - 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x53, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x10, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4f, 0x0a, - 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x52, - 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6c, - 0x75, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, - 0x66, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x5f, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x72, 0x0a, - 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe8, 0x01, 0x0a, 0x17, 0x42, - 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, - 0x52, 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x37, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x48, 0x01, 0x52, 0x0b, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x9e, 0x05, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, - 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, - 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x13, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x6c, 0x65, 0x78, 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x69, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6c, 0x65, 0x78, - 0x69, 0x63, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, 0x65, 0x78, 0x69, 0x63, - 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x0c, 0x73, - 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x66, - 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x41, 0x73, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x47, 0x6c, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x61, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x0d, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xea, 0x0e, 0x0a, 0x14, 0x52, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x31, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, - 0x41, 0x05, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x28, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x13, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, - 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x30, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x41, 0x0a, 0x1a, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x6c, 0x12, 0x33, - 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, - 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, - 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, - 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x12, 0x40, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x17, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x48, 0x05, 0x52, 0x1a, 0x69, 0x66, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x1e, 0x69, - 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x06, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x07, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x43, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x65, - 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x74, 0x65, 0x6e, 0x50, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x20, 0x63, - 0x6f, 0x70, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1d, 0x63, 0x6f, 0x70, 0x79, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x70, - 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1c, 0x63, 0x6f, 0x70, 0x79, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, - 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x27, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x63, 0x6f, - 0x70, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, - 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, 0x5f, 0x69, 0x66, 0x5f, - 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, - 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, - 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xec, 0x07, - 0x0a, 0x11, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x12, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x45, 0x0a, 0x1a, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x17, 0x69, 0x66, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x1a, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x1e, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x48, 0x02, 0x52, 0x1b, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x54, 0x0a, 0x22, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x03, 0x52, 0x1e, 0x69, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x13, 0x69, 0x66, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x04, 0x52, 0x11, - 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x05, 0x52, 0x14, 0x69, 0x66, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x06, 0x52, 0x15, 0x69, - 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, - 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x48, 0x07, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, - 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x69, 0x66, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x14, - 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, 0x1c, - 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xb9, 0x02, 0x0a, - 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x11, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x0f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x52, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x49, 0x64, 0x22, 0xd6, 0x05, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x33, 0x0a, 0x13, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x00, 0x52, 0x11, 0x69, 0x66, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x17, 0x69, 0x66, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x14, 0x69, 0x66, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x15, 0x69, 0x66, 0x4d, 0x65, 0x74, 0x61, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x88, - 0x01, 0x01, 0x12, 0x42, 0x0a, 0x1b, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x18, 0x69, 0x66, 0x4d, 0x65, 0x74, - 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x41, - 0x63, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x6f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x1e, 0x0a, - 0x1c, 0x5f, 0x69, 0x66, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xce, 0x01, - 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, - 0x74, 0x68, 0x6d, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x1b, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, - 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca, - 0x05, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, - 0x0a, 0x12, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, - 0x41, 0x44, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, - 0x80, 0x80, 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, + 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x4b, 0x65, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x1b, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, + 0x36, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xca, 0x05, 0x0a, + 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x73, 0x22, 0xb5, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x12, + 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x14, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80, - 0x01, 0x12, 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24, - 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, - 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, - 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43, - 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, - 0x10, 0x80, 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, - 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, - 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a, - 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54, - 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, - 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41, - 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, - 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, - 0x54, 0x10, 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, - 0x59, 0x43, 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, - 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e, - 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, - 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12, - 0x31, 0x0a, 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, - 0x80, 0x02, 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, - 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, - 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, - 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c, - 0x41, 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f, - 0x55, 0x4e, 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, - 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, - 0x4e, 0x47, 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, - 0x42, 0x45, 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, - 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f, - 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45, - 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51, - 0x55, 0x45, 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54, - 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xb5, 0x37, 0x0a, 0x06, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6f, 0x12, 0x3d, 0x0a, - 0x03, 0x61, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x59, 0x0a, 0x12, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, - 0x63, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12, - 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, - 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, - 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x01, 0x12, 0x1c, 0x0a, 0x15, 0x4d, 0x41, 0x58, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43, + 0x48, 0x55, 0x4e, 0x4b, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x80, 0x80, 0x01, 0x12, + 0x19, 0x0a, 0x12, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x5f, 0x4d, 0x42, 0x10, 0x80, 0x80, 0xc0, 0x02, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, + 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, + 0x41, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x59, 0x54, + 0x45, 0x53, 0x10, 0x80, 0x08, 0x12, 0x2a, 0x0a, 0x25, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, + 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, 0x49, 0x45, + 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, + 0x20, 0x12, 0x29, 0x0a, 0x24, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, + 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, + 0x49, 0x5a, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0x40, 0x12, 0x2a, 0x0a, 0x24, + 0x4d, 0x41, 0x58, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x42, + 0x59, 0x54, 0x45, 0x53, 0x10, 0x80, 0xa0, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x41, 0x58, 0x5f, + 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, + 0x46, 0x49, 0x47, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, + 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, 0x59, 0x43, + 0x4c, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x43, + 0x4b, 0x45, 0x54, 0x10, 0x64, 0x12, 0x26, 0x0a, 0x22, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, + 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x53, 0x10, 0x05, 0x12, 0x31, 0x0a, + 0x2c, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, + 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x10, 0x80, 0x02, + 0x12, 0x33, 0x0a, 0x2e, 0x4d, 0x41, 0x58, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x41, 0x54, 0x54, 0x52, + 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x10, 0x80, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, + 0x45, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x49, 0x45, 0x53, 0x5f, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x10, 0x40, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45, 0x4c, + 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x10, 0x3f, 0x12, 0x1f, 0x0a, 0x1a, 0x4d, 0x41, 0x58, 0x5f, 0x4c, 0x41, 0x42, 0x45, + 0x4c, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x42, 0x59, 0x54, + 0x45, 0x53, 0x10, 0x80, 0x01, 0x12, 0x2e, 0x0a, 0x29, 0x4d, 0x41, 0x58, 0x5f, 0x4f, 0x42, 0x4a, + 0x45, 0x43, 0x54, 0x5f, 0x49, 0x44, 0x53, 0x5f, 0x50, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, + 0x54, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, + 0x53, 0x54, 0x10, 0xe8, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x50, 0x4c, 0x49, 0x54, 0x5f, 0x54, + 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x44, + 0x41, 0x59, 0x53, 0x10, 0x0e, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xb5, 0x37, 0x0a, 0x06, 0x42, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, + 0x74, 0x61, 0x67, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x12, 0x15, 0x0a, 0x03, 0x72, 0x70, 0x6f, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6f, 0x12, 0x3d, 0x0a, 0x03, 0x61, + 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x59, 0x0a, 0x12, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x6c, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x41, 0x63, 0x6c, 0x12, 0x46, 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, + 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, + 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40, 0x0a, 0x07, + 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x49, + 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x6c, 0x6f, 0x67, + 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40, - 0x0a, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x73, 0x69, - 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, - 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x11, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x6c, - 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x62, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, - 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x59, 0x0a, + 0x10, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x69, 0x61, 0x6d, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, - 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, - 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, - 0x59, 0x0a, 0x10, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x65, 0x6e, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x47, 0x0a, 0x0a, 0x69, 0x61, - 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, - 0x5f, 0x70, 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x0c, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x6c, 0x0a, - 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x09, 0x61, - 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, - 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x20, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48, - 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, 0x69, 0x65, 0x72, 0x61, - 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x5d, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x5f, 0x70, + 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, + 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x12, 0x6c, 0x0a, 0x17, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, - 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x59, 0x0a, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x70, - 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x2a, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, - 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x9b, 0x01, 0x0a, - 0x04, 0x43, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x2c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, - 0x41, 0x67, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xa0, 0x0b, 0x0a, 0x0a, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0xb7, 0x01, 0x0a, - 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x12, 0x6b, 0x0a, 0x16, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, + 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x48, 0x69, 0x65, + 0x72, 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, + 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5d, + 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, 0x6f, 0x66, + 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x59, 0x0a, + 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x09, 0x69, 0x70, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x88, 0x01, 0x01, 0x1a, 0x35, 0x0a, 0x07, 0x42, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x2a, + 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x73, 0x1a, 0x9b, 0x01, 0x0a, 0x04, 0x43, + 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2c, 0x0a, + 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0f, 0x6d, + 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x41, 0x67, + 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x1a, 0xa0, 0x0b, 0x0a, 0x0a, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, + 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0xb7, 0x01, 0x0a, 0x2c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x2a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x88, 0x01, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x2a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x88, 0x01, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x2b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x1a, 0xca, 0x01, 0x0a, 0x28, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, + 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x2a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0xc0, 0x01, 0x0a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, - 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x02, 0x52, 0x2b, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x1a, 0xca, 0x01, 0x0a, 0x28, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, - 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcc, 0x01, 0x0a, 0x2a, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, - 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, - 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0xcd, 0x01, 0x0a, 0x2b, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, - 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, - 0x11, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x0a, 0x2d, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x31, 0x0a, 0x2f, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x32, 0x0a, 0x30, 0x5f, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x02, - 0x0a, 0x09, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x1b, - 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, - 0x0a, 0x18, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x77, 0x0a, - 0x18, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, + 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6c, 0x6f, - 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, - 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0xc1, 0x07, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, - 0x12, 0x4c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, - 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, - 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x1a, 0xc6, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1e, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x3d, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, - 0x1c, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x01, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, - 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d, - 0x4e, 0x65, 0x77, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x37, 0x0a, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79, - 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79, - 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, - 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x64, 0x61, 0x79, - 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, - 0x17, 0x64, 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x16, 0x6e, - 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, - 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, - 0xe0, 0x41, 0x01, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, - 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, - 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x42, 0x0a, - 0x0a, 0x08, 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, - 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, - 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1d, 0x0a, 0x1b, - 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x5e, 0x0a, 0x07, 0x4c, - 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x09, 0x6c, 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, - 0x67, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x33, 0x0a, 0x0f, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, - 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x06, 0xe0, 0x41, 0x01, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x1a, 0xca, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x65, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, - 0x69, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x4d, - 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01, - 0x0a, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x74, - 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, - 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x1a, 0xcd, 0x01, 0x0a, 0x2b, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, + 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x42, 0x2f, 0x0a, 0x2d, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x31, 0x0a, 0x2f, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x32, 0x0a, 0x30, 0x5f, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x02, 0x0a, 0x09, + 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x1b, 0x75, 0x6e, + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x61, 0x6d, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x18, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x18, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x50, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x77, 0x0a, 0x18, 0x55, + 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x1a, 0x2b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, - 0x67, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x1a, 0x63, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x6d, - 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, - 0x50, 0x61, 0x67, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x0e, 0x6e, 0x6f, - 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, - 0x64, 0x50, 0x61, 0x67, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, - 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, - 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x61, 0x74, - 0x61, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdb, 0x02, 0x0a, 0x09, 0x41, - 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, - 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x88, 0x01, 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, - 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x48, 0x01, 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x92, 0x08, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0xc1, 0x07, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4c, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x09, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x4b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x1a, 0xc6, 0x05, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, + 0x0a, 0x08, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x44, 0x61, 0x79, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3d, + 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, + 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, + 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x12, 0x6e, + 0x75, 0x6d, 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x02, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x4e, 0x65, + 0x77, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x37, + 0x0a, 0x15, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x16, 0x64, 0x61, 0x79, 0x73, 0x5f, + 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x53, + 0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x44, 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, + 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x64, 0x61, 0x79, 0x73, 0x5f, + 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x48, 0x04, 0x52, 0x17, 0x64, + 0x61, 0x79, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x16, 0x6e, 0x6f, 0x6e, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x14, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x73, + 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x75, 0x6d, + 0x5f, 0x6e, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x19, 0x0a, 0x17, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x64, + 0x61, 0x79, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x5e, 0x0a, 0x07, 0x4c, 0x6f, 0x67, + 0x67, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6c, + 0x6f, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x6c, 0x6f, 0x67, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x33, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x06, 0xe0, + 0x41, 0x01, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xca, + 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x73, + 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x12, + 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x10, + 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x4d, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x46, 0x0a, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, + 0x0a, 0x0f, 0x5f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x1a, 0x2b, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, + 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x63, + 0x0a, 0x07, 0x57, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x10, 0x6d, 0x61, 0x69, + 0x6e, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x61, + 0x67, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f, + 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x50, + 0x61, 0x67, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0e, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdb, 0x02, 0x0a, 0x09, 0x41, 0x75, 0x74, + 0x6f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x16, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x42, 0x25, 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x70, 0x0a, 0x22, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x08, 0x49, 0x70, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, - 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x68, 0x0a, 0x13, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x56, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x76, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x72, 0x67, 0x5f, 0x76, 0x70, 0x63, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x72, 0x67, 0x56, 0x70, 0x63, 0x73, 0x12, - 0x47, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x38, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, - 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, - 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x10, 0x56, 0x70, 0x63, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, 0x72, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, + 0x01, 0x52, 0x1e, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x19, 0x0a, 0x17, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, + 0x25, 0x0a, 0x23, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x8d, 0x05, 0x0a, 0x08, 0x49, 0x70, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x15, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, - 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x58, 0xea, 0x41, 0x55, - 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x23, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x7d, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x72, - 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, - 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, - 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, - 0x6d, 0x6d, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, - 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, - 0x63, 0x22, 0x59, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, - 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, 0x61, 0x73, - 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xbb, 0x01, 0x0a, - 0x1a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x68, 0x0a, + 0x13, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x49, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x56, + 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x76, 0x70, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x72, 0x67, 0x5f, 0x76, 0x70, 0x63, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x72, 0x67, 0x56, 0x70, 0x63, 0x73, 0x12, 0x47, 0x0a, + 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, + 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x4f, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x38, 0x0a, + 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, + 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x77, 0x0a, 0x10, 0x56, 0x70, 0x63, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x16, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x21, 0x0a, 0x1f, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, + 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x36, 0x0a, 0x15, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72, + 0x63, 0x68, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, 0x1d, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x23, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x7d, 0x2a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x06, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x72, 0x6f, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x61, + 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, + 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, + 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1b, + 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0c, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, + 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x6d, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x05, 0xe0, 0x41, 0x01, 0x08, 0x01, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, + 0x63, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, + 0x59, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, + 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x07, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x88, 0x01, 0x01, 0x12, + 0x1e, 0x0a, 0x08, 0x6d, 0x64, 0x35, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6d, 0x64, 0x35, 0x48, 0x61, 0x73, 0x68, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x72, 0x63, 0x33, 0x32, 0x63, 0x22, 0xbb, 0x01, 0x0a, 0x1a, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x68, 0x0a, 0x0b, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, + 0x2d, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, + 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xe3, + 0x11, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, + 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2b, + 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d, 0x65, 0x74, + 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x2e, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x34, + 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3d, + 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, 0x2e, 0x0a, + 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, + 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, + 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x23, 0x0a, + 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, + 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x4a, 0x0a, - 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x1a, 0x68, 0x0a, 0x0b, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x48, 0x6f, + 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x14, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, - 0x6d, 0x12, 0x2d, 0x0a, 0x10, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x01, - 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x22, 0xe3, 0x11, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x23, 0x0a, 0x0a, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, - 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, - 0x12, 0x2b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x6d, - 0x65, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, - 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x34, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x12, 0x3d, 0x0a, 0x03, 0x61, 0x63, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x03, 0x61, 0x63, 0x6c, 0x12, - 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, - 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x45, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x26, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x62, + 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, 0x6f, 0x6c, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x18, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x13, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x01, 0xfa, 0x41, - 0x23, 0x0a, 0x21, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x5a, 0x0a, 0x19, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, - 0x52, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, - 0x6f, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, - 0x48, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f, 0x66, 0x74, + 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61, 0x72, 0x64, + 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, - 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x01, 0x52, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x73, 0x65, 0x64, 0x48, - 0x6f, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x13, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x73, 0x6f, - 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x10, 0x68, 0x61, - 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x03, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, - 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x41, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x75, 0x6e, - 0x74, 0x69, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, - 0x0f, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x36, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, - 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, - 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, - 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x12, 0x46, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, - 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x0b, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x46, 0x0a, - 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x32, 0x9f, 0x1f, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0xd3, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, + 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01, - 0x0a, 0x19, 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, - 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, - 0x2a, 0x2a, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, - 0x58, 0xda, 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x47, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, - 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x53, 0x65, - 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, - 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x5f, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, - 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, - 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, - 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x8c, 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, - 0x2a, 0x2a, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, - 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, 0x12, - 0x8a, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x72, + 0x65, 0x74, 0x61, 0x69, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x36, + 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, + 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x42, + 0x13, 0x0a, 0x11, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x61, 0x6c, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, + 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x46, + 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x46, 0x0a, 0x05, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x32, 0x9f, 0x1f, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x12, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x12, 0x1a, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x0d, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, + 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x22, 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, - 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, 0xda, - 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, - 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0xda, - 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, - 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x22, 0x22, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x12, 0x13, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x58, 0xda, 0x41, 0x17, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, + 0x2a, 0x2a, 0x7d, 0x12, 0x1e, 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0c, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, + 0x2a, 0x2a, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, + 0x93, 0x02, 0x18, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x19, + 0x4c, 0x6f, 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, + 0x63, 0x6b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x06, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, + 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x58, 0xda, + 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, + 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0x5f, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x17, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x2c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, + 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xaa, 0x01, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x8c, + 0x01, 0x12, 0x17, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x7b, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2a, + 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x7b, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x64, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2a, 0x12, 0x8a, 0x01, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x22, 0x37, 0xda, 0x41, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, + 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x7b, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x0d, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0x29, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0c, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x48, 0xda, 0x41, 0x0d, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x38, 0xda, 0x41, 0x18, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, + 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, + 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, 0xd3, 0xe4, + 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, + 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x2a, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, + 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x0a, 0x52, + 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, + 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, + 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, 0xd3, 0xe4, 0x93, + 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8c, + 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, - 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xa5, 0x01, 0x0a, - 0x0a, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x0d, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xda, 0x41, 0x18, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x2c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, + 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x60, 0x0a, + 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, + 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, + 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, + 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x0f, 0x0a, + 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x21, + 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, + 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, - 0x2a, 0x7d, 0x30, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, - 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, - 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x8a, 0xd3, - 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x0a, 0x17, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x8c, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x22, 0x39, 0xda, 0x41, 0x12, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x12, 0x1c, 0x0a, 0x0d, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, - 0x60, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x69, 0x64, 0x69, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x12, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, - 0x0f, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x21, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, - 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x8a, 0xd3, 0xe4, 0x93, - 0x02, 0x32, 0x12, 0x30, 0x0a, 0x21, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, - 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x69, 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, - 0x2c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x8a, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, 0xa7, - 0x02, 0xca, 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, - 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, - 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, - 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x2e, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, - 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, - 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, - 0x61, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, 0x21, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, - 0x79, 0x12, 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x70, 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2a, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x41, 0xda, 0x41, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x8a, 0xd3, + 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, + 0x64, 0x12, 0x20, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x2a, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0a, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x22, 0x47, 0xda, 0x41, 0x27, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2c, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x8a, + 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x0b, 0x7b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3d, 0x2a, 0x2a, 0x7d, 0x1a, 0xa7, 0x02, 0xca, + 0x41, 0x16, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x8a, 0x02, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, + 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x66, + 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2c, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x65, 0x76, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, + 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x64, 0x65, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, + 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0xe2, 0x01, 0xea, 0x41, 0x78, 0x0a, 0x21, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x6b, 0x6d, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x12, + 0x53, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x52, 0x69, 0x6e, 0x67, + 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x2f, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, + 0x6b, 0x65, 0x79, 0x7d, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, + 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, + 0x62, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -10352,1459 +10393,3 @@ func file_google_storage_v2_storage_proto_init() { file_google_storage_v2_storage_proto_goTypes = nil file_google_storage_v2_storage_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// StorageClient is the client API for Storage service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StorageClient interface { - // Permanently deletes an empty bucket. - DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Returns metadata for the specified bucket. - GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) - // Creates a new bucket. - CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) - // Retrieves a list of buckets for a given project. - ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) - // Locks retention policy on a bucket. - LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) - // Gets the IAM policy for a specified bucket. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Updates an IAM policy for the specified bucket. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) - // Tests a set of permissions on the given bucket, object, or managed folder - // to see which, if any, are held by the caller. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, - // `projects/_/buckets/{bucket}/objects/{object}` for an object, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) - // Updates a bucket. Equivalent to JSON API's storage.buckets.patch method. - UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) - // Concatenates a list of existing objects into a new object in the same - // bucket. - ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) - // Deletes an object and its metadata. Deletions are permanent if versioning - // is not enabled for the bucket, or if the generation parameter is used, or - // if [soft delete](https://cloud.google.com/storage/docs/soft-delete) is not - // enabled for the bucket. - // When this API is used to delete an object from a bucket that has soft - // delete policy enabled, the object becomes soft deleted, and the - // `softDeleteTime` and `hardDeleteTime` properties are set on the object. - // This API cannot be used to permanently delete soft-deleted objects. - // Soft-deleted objects are permanently deleted according to their - // `hardDeleteTime`. - // - // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject] - // API to restore soft-deleted objects until the soft delete retention period - // has passed. - // - // **IAM Permissions**: - // - // Requires `storage.objects.delete` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Restores a soft-deleted object. - RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) - // Cancels an in-progress resumable upload. - // - // Any attempts to write to the resumable upload after cancelling the upload - // will fail. - // - // The behavior for currently in progress write operations is not guaranteed - - // they could either complete before the cancellation or fail if the - // cancellation completes first. - CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) - // Retrieves object metadata. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. To return object ACLs, the authenticated user must also have - // the `storage.objects.getIamPolicy` permission. - GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) - // Retrieves object data. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) - // Reads an object's data. - // - // This is a bi-directional API with the added support for reading multiple - // ranges within one stream both within and across multiple messages. - // If the server encountered an error for any of the inputs, the stream will - // be closed with the relevant error code. - // Because the API allows for multiple outstanding requests, when the stream - // is closed the error response will contain a BidiReadObjectRangesError proto - // in the error extension describing the error for each outstanding read_id. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - // - // This API is currently in preview and is not yet available for general - // use. - BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) - // Updates an object's metadata. - // Equivalent to JSON API's storage.objects.patch. - UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) - // Stores a new object and metadata. - // - // An object can be written either in a single message stream or in a - // resumable sequence of message streams. To write using a single stream, - // the client should include in the first message of the stream an - // `WriteObjectSpec` describing the destination bucket, object, and any - // preconditions. Additionally, the final message must set 'finish_write' to - // true, or else it is an error. - // - // For a resumable write, the client should instead call - // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. - // They should then attach the returned `upload_id` to the first message of - // each following call to `WriteObject`. If the stream is closed before - // finishing the upload (either explicitly by the client or due to a network - // error or an error response from the server), the client should do as - // follows: - // - Check the result Status of the stream, to determine if writing can be - // resumed on this stream or must be restarted from scratch (by calling - // `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED, - // INTERNAL, and UNAVAILABLE. For each case, the client should use binary - // exponential backoff before retrying. Additionally, writes can be - // resumed after RESOURCE_EXHAUSTED errors, but only after taking - // appropriate measures, which may include reducing aggregate send rate - // across clients and/or requesting a quota increase for your project. - // - If the call to `WriteObject` returns `ABORTED`, that indicates - // concurrent attempts to update the resumable write, caused either by - // multiple racing clients or by a single client where the previous - // request was timed out on the client side but nonetheless reached the - // server. In this case the client should take steps to prevent further - // concurrent writes (e.g., increase the timeouts, stop using more than - // one process to perform the upload, etc.), and then should follow the - // steps below for resuming the upload. - // - For resumable errors, the client should call `QueryWriteStatus()` and - // then continue writing from the returned `persisted_size`. This may be - // less than the amount of data the client previously sent. Note also that - // it is acceptable to send data starting at an offset earlier than the - // returned `persisted_size`; in this case, the service will skip data at - // offsets that were already persisted (without checking that it matches - // the previously written data), and write only the data starting from the - // persisted offset. Even though the data isn't written, it may still - // incur a performance cost over resuming at the correct write offset. - // This behavior can make client-side handling simpler in some cases. - // - Clients must only send data that is a multiple of 256 KiB per message, - // unless the object is being finished with `finish_write` set to `true`. - // - // The service will not view the object as complete until the client has - // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any - // requests on a stream after sending a request with `finish_write` set to - // `true` will cause an error. The client **should** check the response it - // receives to determine how much data the service was able to commit and - // whether the service views the object as complete. - // - // Attempting to resume an already finalized object will result in an OK - // status, with a `WriteObjectResponse` containing the finalized object's - // metadata. - // - // Alternatively, the BidiWriteObject operation may be used to write an - // object with controls over flushing and the ability to fetch the ability to - // determine the current persisted size. - // - // **IAM Permissions**: - // - // Requires `storage.objects.create` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) - // Stores a new object and metadata. - // - // This is similar to the WriteObject call with the added support for - // manual flushing of persisted state, and the ability to determine current - // persisted size without closing the stream. - // - // The client may specify one or both of the `state_lookup` and `flush` fields - // in each BidiWriteObjectRequest. If `flush` is specified, the data written - // so far will be persisted to storage. If `state_lookup` is specified, the - // service will respond with a BidiWriteObjectResponse that contains the - // persisted size. If both `flush` and `state_lookup` are specified, the flush - // will always occur before a `state_lookup`, so that both may be set in the - // same request and the returned state will be the state of the object - // post-flush. When the stream is closed, a BidiWriteObjectResponse will - // always be sent to the client, regardless of the value of `state_lookup`. - BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) - // Retrieves a list of objects matching the criteria. - // - // **IAM Permissions**: - // - // The authenticated user requires `storage.objects.list` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) - // to use this method. To return object ACLs, the authenticated user must also - // have the `storage.objects.getIamPolicy` permission. - ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) - // Rewrites a source object to a destination object. Optionally overrides - // metadata. - RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) - // Starts a resumable write operation. This - // method is part of the [Resumable - // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature. - // This allows you to upload large objects in multiple chunks, which is more - // resilient to network interruptions than a single upload. The validity - // duration of the write operation, and the consequences of it becoming - // invalid, are service-dependent. - // - // **IAM Permissions**: - // - // Requires `storage.objects.create` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) - // Determines the `persisted_size` of an object that is being written. This - // method is part of the [resumable - // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature. - // The returned value is the size of the object that has been persisted so - // far. The value can be used as the `write_offset` for the next `Write()` - // call. - // - // If the object does not exist, meaning if it was deleted, or the - // first `Write()` has not yet reached the service, this method returns the - // error `NOT_FOUND`. - // - // This method is useful for clients that buffer data and need to know which - // data can be safely evicted. The client can call `QueryWriteStatus()` at any - // time to determine how much data has been logged for this object. - // For any sequence of `QueryWriteStatus()` calls for a given - // object name, the sequence of returned `persisted_size` values are - // non-decreasing. - QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) - // Moves the source object to the destination object in the same bucket. - MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) -} - -type storageClient struct { - cc grpc.ClientConnInterface -} - -func NewStorageClient(cc grpc.ClientConnInterface) StorageClient { - return &storageClient{cc} -} - -func (c *storageClient) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/DeleteBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { - out := new(Bucket) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { - out := new(Bucket) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/CreateBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) { - out := new(ListBucketsResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ListBuckets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) { - out := new(Bucket) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/LockBucketRetentionPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetIamPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { - out := new(iampb.Policy) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/SetIamPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { - out := new(iampb.TestIamPermissionsResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/TestIamPermissions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { - out := new(Bucket) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/UpdateBucket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) { - out := new(Object) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ComposeObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/DeleteObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) { - out := new(Object) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/RestoreObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) { - out := new(CancelResumableWriteResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/CancelResumableWrite", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) { - out := new(Object) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/GetObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[0], "/google.storage.v2.Storage/ReadObject", opts...) - if err != nil { - return nil, err - } - x := &storageReadObjectClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Storage_ReadObjectClient interface { - Recv() (*ReadObjectResponse, error) - grpc.ClientStream -} - -type storageReadObjectClient struct { - grpc.ClientStream -} - -func (x *storageReadObjectClient) Recv() (*ReadObjectResponse, error) { - m := new(ReadObjectResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *storageClient) BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[1], "/google.storage.v2.Storage/BidiReadObject", opts...) - if err != nil { - return nil, err - } - x := &storageBidiReadObjectClient{stream} - return x, nil -} - -type Storage_BidiReadObjectClient interface { - Send(*BidiReadObjectRequest) error - Recv() (*BidiReadObjectResponse, error) - grpc.ClientStream -} - -type storageBidiReadObjectClient struct { - grpc.ClientStream -} - -func (x *storageBidiReadObjectClient) Send(m *BidiReadObjectRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *storageBidiReadObjectClient) Recv() (*BidiReadObjectResponse, error) { - m := new(BidiReadObjectResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *storageClient) UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) { - out := new(Object) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/UpdateObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[2], "/google.storage.v2.Storage/WriteObject", opts...) - if err != nil { - return nil, err - } - x := &storageWriteObjectClient{stream} - return x, nil -} - -type Storage_WriteObjectClient interface { - Send(*WriteObjectRequest) error - CloseAndRecv() (*WriteObjectResponse, error) - grpc.ClientStream -} - -type storageWriteObjectClient struct { - grpc.ClientStream -} - -func (x *storageWriteObjectClient) Send(m *WriteObjectRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *storageWriteObjectClient) CloseAndRecv() (*WriteObjectResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(WriteObjectResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *storageClient) BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Storage_serviceDesc.Streams[3], "/google.storage.v2.Storage/BidiWriteObject", opts...) - if err != nil { - return nil, err - } - x := &storageBidiWriteObjectClient{stream} - return x, nil -} - -type Storage_BidiWriteObjectClient interface { - Send(*BidiWriteObjectRequest) error - Recv() (*BidiWriteObjectResponse, error) - grpc.ClientStream -} - -type storageBidiWriteObjectClient struct { - grpc.ClientStream -} - -func (x *storageBidiWriteObjectClient) Send(m *BidiWriteObjectRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *storageBidiWriteObjectClient) Recv() (*BidiWriteObjectResponse, error) { - m := new(BidiWriteObjectResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *storageClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) { - out := new(ListObjectsResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/ListObjects", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) { - out := new(RewriteResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/RewriteObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) { - out := new(StartResumableWriteResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/StartResumableWrite", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) { - out := new(QueryWriteStatusResponse) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/QueryWriteStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storageClient) MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) { - out := new(Object) - err := c.cc.Invoke(ctx, "/google.storage.v2.Storage/MoveObject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StorageServer is the server API for Storage service. -type StorageServer interface { - // Permanently deletes an empty bucket. - DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) - // Returns metadata for the specified bucket. - GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) - // Creates a new bucket. - CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) - // Retrieves a list of buckets for a given project. - ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) - // Locks retention policy on a bucket. - LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) - // Gets the IAM policy for a specified bucket. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) - // Updates an IAM policy for the specified bucket. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) - // Tests a set of permissions on the given bucket, object, or managed folder - // to see which, if any, are held by the caller. - // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket, - // `projects/_/buckets/{bucket}/objects/{object}` for an object, or - // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - // for a managed folder. - TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) - // Updates a bucket. Equivalent to JSON API's storage.buckets.patch method. - UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) - // Concatenates a list of existing objects into a new object in the same - // bucket. - ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) - // Deletes an object and its metadata. Deletions are permanent if versioning - // is not enabled for the bucket, or if the generation parameter is used, or - // if [soft delete](https://cloud.google.com/storage/docs/soft-delete) is not - // enabled for the bucket. - // When this API is used to delete an object from a bucket that has soft - // delete policy enabled, the object becomes soft deleted, and the - // `softDeleteTime` and `hardDeleteTime` properties are set on the object. - // This API cannot be used to permanently delete soft-deleted objects. - // Soft-deleted objects are permanently deleted according to their - // `hardDeleteTime`. - // - // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject] - // API to restore soft-deleted objects until the soft delete retention period - // has passed. - // - // **IAM Permissions**: - // - // Requires `storage.objects.delete` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) - // Restores a soft-deleted object. - RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) - // Cancels an in-progress resumable upload. - // - // Any attempts to write to the resumable upload after cancelling the upload - // will fail. - // - // The behavior for currently in progress write operations is not guaranteed - - // they could either complete before the cancellation or fail if the - // cancellation completes first. - CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) - // Retrieves object metadata. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. To return object ACLs, the authenticated user must also have - // the `storage.objects.getIamPolicy` permission. - GetObject(context.Context, *GetObjectRequest) (*Object, error) - // Retrieves object data. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error - // Reads an object's data. - // - // This is a bi-directional API with the added support for reading multiple - // ranges within one stream both within and across multiple messages. - // If the server encountered an error for any of the inputs, the stream will - // be closed with the relevant error code. - // Because the API allows for multiple outstanding requests, when the stream - // is closed the error response will contain a BidiReadObjectRangesError proto - // in the error extension describing the error for each outstanding read_id. - // - // **IAM Permissions**: - // - // Requires `storage.objects.get` - // - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - // - // This API is currently in preview and is not yet available for general - // use. - BidiReadObject(Storage_BidiReadObjectServer) error - // Updates an object's metadata. - // Equivalent to JSON API's storage.objects.patch. - UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) - // Stores a new object and metadata. - // - // An object can be written either in a single message stream or in a - // resumable sequence of message streams. To write using a single stream, - // the client should include in the first message of the stream an - // `WriteObjectSpec` describing the destination bucket, object, and any - // preconditions. Additionally, the final message must set 'finish_write' to - // true, or else it is an error. - // - // For a resumable write, the client should instead call - // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. - // They should then attach the returned `upload_id` to the first message of - // each following call to `WriteObject`. If the stream is closed before - // finishing the upload (either explicitly by the client or due to a network - // error or an error response from the server), the client should do as - // follows: - // - Check the result Status of the stream, to determine if writing can be - // resumed on this stream or must be restarted from scratch (by calling - // `StartResumableWrite()`). The resumable errors are DEADLINE_EXCEEDED, - // INTERNAL, and UNAVAILABLE. For each case, the client should use binary - // exponential backoff before retrying. Additionally, writes can be - // resumed after RESOURCE_EXHAUSTED errors, but only after taking - // appropriate measures, which may include reducing aggregate send rate - // across clients and/or requesting a quota increase for your project. - // - If the call to `WriteObject` returns `ABORTED`, that indicates - // concurrent attempts to update the resumable write, caused either by - // multiple racing clients or by a single client where the previous - // request was timed out on the client side but nonetheless reached the - // server. In this case the client should take steps to prevent further - // concurrent writes (e.g., increase the timeouts, stop using more than - // one process to perform the upload, etc.), and then should follow the - // steps below for resuming the upload. - // - For resumable errors, the client should call `QueryWriteStatus()` and - // then continue writing from the returned `persisted_size`. This may be - // less than the amount of data the client previously sent. Note also that - // it is acceptable to send data starting at an offset earlier than the - // returned `persisted_size`; in this case, the service will skip data at - // offsets that were already persisted (without checking that it matches - // the previously written data), and write only the data starting from the - // persisted offset. Even though the data isn't written, it may still - // incur a performance cost over resuming at the correct write offset. - // This behavior can make client-side handling simpler in some cases. - // - Clients must only send data that is a multiple of 256 KiB per message, - // unless the object is being finished with `finish_write` set to `true`. - // - // The service will not view the object as complete until the client has - // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any - // requests on a stream after sending a request with `finish_write` set to - // `true` will cause an error. The client **should** check the response it - // receives to determine how much data the service was able to commit and - // whether the service views the object as complete. - // - // Attempting to resume an already finalized object will result in an OK - // status, with a `WriteObjectResponse` containing the finalized object's - // metadata. - // - // Alternatively, the BidiWriteObject operation may be used to write an - // object with controls over flushing and the ability to fetch the ability to - // determine the current persisted size. - // - // **IAM Permissions**: - // - // Requires `storage.objects.create` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - WriteObject(Storage_WriteObjectServer) error - // Stores a new object and metadata. - // - // This is similar to the WriteObject call with the added support for - // manual flushing of persisted state, and the ability to determine current - // persisted size without closing the stream. - // - // The client may specify one or both of the `state_lookup` and `flush` fields - // in each BidiWriteObjectRequest. If `flush` is specified, the data written - // so far will be persisted to storage. If `state_lookup` is specified, the - // service will respond with a BidiWriteObjectResponse that contains the - // persisted size. If both `flush` and `state_lookup` are specified, the flush - // will always occur before a `state_lookup`, so that both may be set in the - // same request and the returned state will be the state of the object - // post-flush. When the stream is closed, a BidiWriteObjectResponse will - // always be sent to the client, regardless of the value of `state_lookup`. - BidiWriteObject(Storage_BidiWriteObjectServer) error - // Retrieves a list of objects matching the criteria. - // - // **IAM Permissions**: - // - // The authenticated user requires `storage.objects.list` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) - // to use this method. To return object ACLs, the authenticated user must also - // have the `storage.objects.getIamPolicy` permission. - ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) - // Rewrites a source object to a destination object. Optionally overrides - // metadata. - RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) - // Starts a resumable write operation. This - // method is part of the [Resumable - // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature. - // This allows you to upload large objects in multiple chunks, which is more - // resilient to network interruptions than a single upload. The validity - // duration of the write operation, and the consequences of it becoming - // invalid, are service-dependent. - // - // **IAM Permissions**: - // - // Requires `storage.objects.create` - // [IAM permission](https://cloud.google.com/iam/docs/overview#permissions) on - // the bucket. - StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) - // Determines the `persisted_size` of an object that is being written. This - // method is part of the [resumable - // upload](https://cloud.google.com/storage/docs/resumable-uploads) feature. - // The returned value is the size of the object that has been persisted so - // far. The value can be used as the `write_offset` for the next `Write()` - // call. - // - // If the object does not exist, meaning if it was deleted, or the - // first `Write()` has not yet reached the service, this method returns the - // error `NOT_FOUND`. - // - // This method is useful for clients that buffer data and need to know which - // data can be safely evicted. The client can call `QueryWriteStatus()` at any - // time to determine how much data has been logged for this object. - // For any sequence of `QueryWriteStatus()` calls for a given - // object name, the sequence of returned `persisted_size` values are - // non-decreasing. - QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) - // Moves the source object to the destination object in the same bucket. - MoveObject(context.Context, *MoveObjectRequest) (*Object, error) -} - -// UnimplementedStorageServer can be embedded to have forward compatible implementations. -type UnimplementedStorageServer struct { -} - -func (*UnimplementedStorageServer) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteBucket not implemented") -} -func (*UnimplementedStorageServer) GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetBucket not implemented") -} -func (*UnimplementedStorageServer) CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateBucket not implemented") -} -func (*UnimplementedStorageServer) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListBuckets not implemented") -} -func (*UnimplementedStorageServer) LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) { - return nil, status1.Errorf(codes.Unimplemented, "method LockBucketRetentionPolicy not implemented") -} -func (*UnimplementedStorageServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") -} -func (*UnimplementedStorageServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - return nil, status1.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") -} -func (*UnimplementedStorageServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") -} -func (*UnimplementedStorageServer) UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) { - return nil, status1.Errorf(codes.Unimplemented, "method UpdateBucket not implemented") -} -func (*UnimplementedStorageServer) ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ComposeObject not implemented") -} -func (*UnimplementedStorageServer) DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteObject not implemented") -} -func (*UnimplementedStorageServer) RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) { - return nil, status1.Errorf(codes.Unimplemented, "method RestoreObject not implemented") -} -func (*UnimplementedStorageServer) CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CancelResumableWrite not implemented") -} -func (*UnimplementedStorageServer) GetObject(context.Context, *GetObjectRequest) (*Object, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetObject not implemented") -} -func (*UnimplementedStorageServer) ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error { - return status1.Errorf(codes.Unimplemented, "method ReadObject not implemented") -} -func (*UnimplementedStorageServer) BidiReadObject(Storage_BidiReadObjectServer) error { - return status1.Errorf(codes.Unimplemented, "method BidiReadObject not implemented") -} -func (*UnimplementedStorageServer) UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) { - return nil, status1.Errorf(codes.Unimplemented, "method UpdateObject not implemented") -} -func (*UnimplementedStorageServer) WriteObject(Storage_WriteObjectServer) error { - return status1.Errorf(codes.Unimplemented, "method WriteObject not implemented") -} -func (*UnimplementedStorageServer) BidiWriteObject(Storage_BidiWriteObjectServer) error { - return status1.Errorf(codes.Unimplemented, "method BidiWriteObject not implemented") -} -func (*UnimplementedStorageServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListObjects not implemented") -} -func (*UnimplementedStorageServer) RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method RewriteObject not implemented") -} -func (*UnimplementedStorageServer) StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method StartResumableWrite not implemented") -} -func (*UnimplementedStorageServer) QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method QueryWriteStatus not implemented") -} -func (*UnimplementedStorageServer) MoveObject(context.Context, *MoveObjectRequest) (*Object, error) { - return nil, status1.Errorf(codes.Unimplemented, "method MoveObject not implemented") -} - -func RegisterStorageServer(s *grpc.Server, srv StorageServer) { - s.RegisterService(&_Storage_serviceDesc, srv) -} - -func _Storage_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).DeleteBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/DeleteBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).DeleteBucket(ctx, req.(*DeleteBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).GetBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/GetBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).GetBucket(ctx, req.(*GetBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).CreateBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/CreateBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).CreateBucket(ctx, req.(*CreateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListBucketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).ListBuckets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/ListBuckets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).ListBuckets(ctx, req.(*ListBucketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_LockBucketRetentionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LockBucketRetentionPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).LockBucketRetentionPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/LockBucketRetentionPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).LockBucketRetentionPolicy(ctx, req.(*LockBucketRetentionPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.GetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).GetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/GetIamPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.SetIamPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).SetIamPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/SetIamPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(iampb.TestIamPermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).TestIamPermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/TestIamPermissions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateBucketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).UpdateBucket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/UpdateBucket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).UpdateBucket(ctx, req.(*UpdateBucketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_ComposeObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ComposeObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).ComposeObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/ComposeObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).ComposeObject(ctx, req.(*ComposeObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).DeleteObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/DeleteObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).DeleteObject(ctx, req.(*DeleteObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_RestoreObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RestoreObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).RestoreObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/RestoreObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).RestoreObject(ctx, req.(*RestoreObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_CancelResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelResumableWriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).CancelResumableWrite(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/CancelResumableWrite", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).CancelResumableWrite(ctx, req.(*CancelResumableWriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).GetObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/GetObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).GetObject(ctx, req.(*GetObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_ReadObject_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ReadObjectRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StorageServer).ReadObject(m, &storageReadObjectServer{stream}) -} - -type Storage_ReadObjectServer interface { - Send(*ReadObjectResponse) error - grpc.ServerStream -} - -type storageReadObjectServer struct { - grpc.ServerStream -} - -func (x *storageReadObjectServer) Send(m *ReadObjectResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _Storage_BidiReadObject_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(StorageServer).BidiReadObject(&storageBidiReadObjectServer{stream}) -} - -type Storage_BidiReadObjectServer interface { - Send(*BidiReadObjectResponse) error - Recv() (*BidiReadObjectRequest, error) - grpc.ServerStream -} - -type storageBidiReadObjectServer struct { - grpc.ServerStream -} - -func (x *storageBidiReadObjectServer) Send(m *BidiReadObjectResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *storageBidiReadObjectServer) Recv() (*BidiReadObjectRequest, error) { - m := new(BidiReadObjectRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Storage_UpdateObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).UpdateObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/UpdateObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).UpdateObject(ctx, req.(*UpdateObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_WriteObject_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(StorageServer).WriteObject(&storageWriteObjectServer{stream}) -} - -type Storage_WriteObjectServer interface { - SendAndClose(*WriteObjectResponse) error - Recv() (*WriteObjectRequest, error) - grpc.ServerStream -} - -type storageWriteObjectServer struct { - grpc.ServerStream -} - -func (x *storageWriteObjectServer) SendAndClose(m *WriteObjectResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *storageWriteObjectServer) Recv() (*WriteObjectRequest, error) { - m := new(WriteObjectRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Storage_BidiWriteObject_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(StorageServer).BidiWriteObject(&storageBidiWriteObjectServer{stream}) -} - -type Storage_BidiWriteObjectServer interface { - Send(*BidiWriteObjectResponse) error - Recv() (*BidiWriteObjectRequest, error) - grpc.ServerStream -} - -type storageBidiWriteObjectServer struct { - grpc.ServerStream -} - -func (x *storageBidiWriteObjectServer) Send(m *BidiWriteObjectResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *storageBidiWriteObjectServer) Recv() (*BidiWriteObjectRequest, error) { - m := new(BidiWriteObjectRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Storage_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListObjectsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).ListObjects(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/ListObjects", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).ListObjects(ctx, req.(*ListObjectsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_RewriteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RewriteObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).RewriteObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/RewriteObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).RewriteObject(ctx, req.(*RewriteObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_StartResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartResumableWriteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).StartResumableWrite(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/StartResumableWrite", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).StartResumableWrite(ctx, req.(*StartResumableWriteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_QueryWriteStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryWriteStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).QueryWriteStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/QueryWriteStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).QueryWriteStatus(ctx, req.(*QueryWriteStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Storage_MoveObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MoveObjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StorageServer).MoveObject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/google.storage.v2.Storage/MoveObject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StorageServer).MoveObject(ctx, req.(*MoveObjectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Storage_serviceDesc = grpc.ServiceDesc{ - ServiceName: "google.storage.v2.Storage", - HandlerType: (*StorageServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteBucket", - Handler: _Storage_DeleteBucket_Handler, - }, - { - MethodName: "GetBucket", - Handler: _Storage_GetBucket_Handler, - }, - { - MethodName: "CreateBucket", - Handler: _Storage_CreateBucket_Handler, - }, - { - MethodName: "ListBuckets", - Handler: _Storage_ListBuckets_Handler, - }, - { - MethodName: "LockBucketRetentionPolicy", - Handler: _Storage_LockBucketRetentionPolicy_Handler, - }, - { - MethodName: "GetIamPolicy", - Handler: _Storage_GetIamPolicy_Handler, - }, - { - MethodName: "SetIamPolicy", - Handler: _Storage_SetIamPolicy_Handler, - }, - { - MethodName: "TestIamPermissions", - Handler: _Storage_TestIamPermissions_Handler, - }, - { - MethodName: "UpdateBucket", - Handler: _Storage_UpdateBucket_Handler, - }, - { - MethodName: "ComposeObject", - Handler: _Storage_ComposeObject_Handler, - }, - { - MethodName: "DeleteObject", - Handler: _Storage_DeleteObject_Handler, - }, - { - MethodName: "RestoreObject", - Handler: _Storage_RestoreObject_Handler, - }, - { - MethodName: "CancelResumableWrite", - Handler: _Storage_CancelResumableWrite_Handler, - }, - { - MethodName: "GetObject", - Handler: _Storage_GetObject_Handler, - }, - { - MethodName: "UpdateObject", - Handler: _Storage_UpdateObject_Handler, - }, - { - MethodName: "ListObjects", - Handler: _Storage_ListObjects_Handler, - }, - { - MethodName: "RewriteObject", - Handler: _Storage_RewriteObject_Handler, - }, - { - MethodName: "StartResumableWrite", - Handler: _Storage_StartResumableWrite_Handler, - }, - { - MethodName: "QueryWriteStatus", - Handler: _Storage_QueryWriteStatus_Handler, - }, - { - MethodName: "MoveObject", - Handler: _Storage_MoveObject_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ReadObject", - Handler: _Storage_ReadObject_Handler, - ServerStreams: true, - }, - { - StreamName: "BidiReadObject", - Handler: _Storage_BidiReadObject_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "WriteObject", - Handler: _Storage_WriteObject_Handler, - ClientStreams: true, - }, - { - StreamName: "BidiWriteObject", - Handler: _Storage_BidiWriteObject_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "google/storage/v2/storage.proto", -} diff --git a/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go new file mode 100644 index 0000000000..e1c9161c27 --- /dev/null +++ b/vendor/cloud.google.com/go/storage/internal/apiv2/storagepb/storage_grpc.pb.go @@ -0,0 +1,1799 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/storage/v2/storage.proto + +package storagepb + +import ( + context "context" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Storage_DeleteBucket_FullMethodName = "/google.storage.v2.Storage/DeleteBucket" + Storage_GetBucket_FullMethodName = "/google.storage.v2.Storage/GetBucket" + Storage_CreateBucket_FullMethodName = "/google.storage.v2.Storage/CreateBucket" + Storage_ListBuckets_FullMethodName = "/google.storage.v2.Storage/ListBuckets" + Storage_LockBucketRetentionPolicy_FullMethodName = "/google.storage.v2.Storage/LockBucketRetentionPolicy" + Storage_GetIamPolicy_FullMethodName = "/google.storage.v2.Storage/GetIamPolicy" + Storage_SetIamPolicy_FullMethodName = "/google.storage.v2.Storage/SetIamPolicy" + Storage_TestIamPermissions_FullMethodName = "/google.storage.v2.Storage/TestIamPermissions" + Storage_UpdateBucket_FullMethodName = "/google.storage.v2.Storage/UpdateBucket" + Storage_ComposeObject_FullMethodName = "/google.storage.v2.Storage/ComposeObject" + Storage_DeleteObject_FullMethodName = "/google.storage.v2.Storage/DeleteObject" + Storage_RestoreObject_FullMethodName = "/google.storage.v2.Storage/RestoreObject" + Storage_CancelResumableWrite_FullMethodName = "/google.storage.v2.Storage/CancelResumableWrite" + Storage_GetObject_FullMethodName = "/google.storage.v2.Storage/GetObject" + Storage_ReadObject_FullMethodName = "/google.storage.v2.Storage/ReadObject" + Storage_BidiReadObject_FullMethodName = "/google.storage.v2.Storage/BidiReadObject" + Storage_UpdateObject_FullMethodName = "/google.storage.v2.Storage/UpdateObject" + Storage_WriteObject_FullMethodName = "/google.storage.v2.Storage/WriteObject" + Storage_BidiWriteObject_FullMethodName = "/google.storage.v2.Storage/BidiWriteObject" + Storage_ListObjects_FullMethodName = "/google.storage.v2.Storage/ListObjects" + Storage_RewriteObject_FullMethodName = "/google.storage.v2.Storage/RewriteObject" + Storage_StartResumableWrite_FullMethodName = "/google.storage.v2.Storage/StartResumableWrite" + Storage_QueryWriteStatus_FullMethodName = "/google.storage.v2.Storage/QueryWriteStatus" + Storage_MoveObject_FullMethodName = "/google.storage.v2.Storage/MoveObject" +) + +// StorageClient is the client API for Storage service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StorageClient interface { + // Permanently deletes an empty bucket. + // The request fails if there are any live or + // noncurrent objects in the bucket, but the request succeeds if the + // bucket only contains soft-deleted objects or incomplete uploads, such + // as ongoing XML API multipart uploads. Does not permanently delete + // soft-deleted objects. + // + // When this API is used to delete a bucket containing an object that has a + // soft delete policy + // enabled, the object becomes soft deleted, and the + // `softDeleteTime` and `hardDeleteTime` properties are set on the + // object. + // + // Objects and multipart uploads that were in the bucket at the time of + // deletion are also retained for the specified retention duration. When + // a soft-deleted bucket reaches the end of its retention duration, it + // is permanently deleted. The `hardDeleteTime` of the bucket always + // equals + // or exceeds the expiration time of the last soft-deleted object in the + // bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.delete` IAM permission on the bucket. + DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns metadata for the specified bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.get` + // IAM permission on + // the bucket. Additionally, to return specific bucket metadata, the + // authenticated user must have the following permissions: + // + // - To return the IAM policies: `storage.buckets.getIamPolicy` + // - To return the bucket IP filtering rules: `storage.buckets.getIpFilter` + GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) + // Creates a new bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.create` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated user + // must have the following permissions: + // + // - To enable object retention using the `enableObjectRetention` query + // parameter: `storage.buckets.enableObjectRetention` + // - To set the bucket IP filtering rules: `storage.buckets.setIpFilter` + CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) + // Retrieves a list of buckets for a given project, ordered + // lexicographically by name. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.list` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated + // user must have the following permissions: + // + // - To list the IAM policies: `storage.buckets.getIamPolicy` + // - To list the bucket IP filtering rules: `storage.buckets.getIpFilter` + ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) + // Permanently locks the retention + // policy that is + // currently applied to the specified bucket. + // + // Caution: Locking a bucket is an + // irreversible action. Once you lock a bucket: + // + // - You cannot remove the retention policy from the bucket. + // - You cannot decrease the retention period for the policy. + // + // Once locked, you must delete the entire bucket in order to remove the + // bucket's retention policy. However, before you can delete the bucket, you + // must delete all the objects in the bucket, which is only + // possible if all the objects have reached the retention period set by the + // retention policy. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.update` IAM permission on the bucket. + LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) + // Gets the IAM policy for a specified bucket or managed folder. + // The `resource` field in the request should be + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.getIamPolicy` on the bucket or + // `storage.managedFolders.getIamPolicy` IAM permission on the + // managed folder. + GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) + // Updates an IAM policy for the specified bucket or managed folder. + // The `resource` field in the request should be + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) + // Tests a set of permissions on the given bucket, object, or managed folder + // to see which, if any, are held by the caller. The `resource` field in the + // request should be `projects/_/buckets/{bucket}` for a bucket, + // `projects/_/buckets/{bucket}/objects/{object}` for an object, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) + // Updates a bucket. Changes to the bucket are readable immediately after + // writing, but configuration changes might take time to propagate. This + // method supports `patch` semantics. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.update` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated user + // must have the following permissions: + // + // - To set bucket IP filtering rules: `storage.buckets.setIpFilter` + // - To update public access prevention policies or access control lists + // (ACLs): `storage.buckets.setIamPolicy` + UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) + // Concatenates a list of existing objects into a new object in the same + // bucket. The existing source objects are unaffected by this operation. + // + // **IAM Permissions**: + // + // Requires the `storage.objects.create` and `storage.objects.get` IAM + // permissions to use this method. If the new composite object + // overwrites an existing object, the authenticated user must also have + // the `storage.objects.delete` permission. If the request body includes + // the retention property, the authenticated user must also have the + // `storage.objects.setRetention` IAM permission. + ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) + // Deletes an object and its metadata. Deletions are permanent if versioning + // is not enabled for the bucket, or if the generation parameter is used, or + // if soft delete is not + // enabled for the bucket. + // When this API is used to delete an object from a bucket that has soft + // delete policy enabled, the object becomes soft deleted, and the + // `softDeleteTime` and `hardDeleteTime` properties are set on the object. + // This API cannot be used to permanently delete soft-deleted objects. + // Soft-deleted objects are permanently deleted according to their + // `hardDeleteTime`. + // + // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject] + // API to restore soft-deleted objects until the soft delete retention period + // has passed. + // + // **IAM Permissions**: + // + // Requires `storage.objects.delete` IAM permission on the bucket. + DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Restores a + // soft-deleted object. + // When a soft-deleted object is restored, a new copy of that object is + // created in the same bucket and inherits the same metadata as the + // soft-deleted object. The inherited metadata is the metadata that existed + // when the original object became soft deleted, with the following + // exceptions: + // + // - The `createTime` of the new object is set to the time at which the + // soft-deleted object was restored. + // - The `softDeleteTime` and `hardDeleteTime` values are cleared. + // - A new generation is assigned and the metageneration is reset to 1. + // - If the soft-deleted object was in a bucket that had Autoclass enabled, + // the new object is + // restored to Standard storage. + // - The restored object inherits the bucket's default object ACL, unless + // `copySourceAcl` is `true`. + // + // If a live object using the same name already exists in the bucket and + // becomes overwritten, the live object becomes a noncurrent object if Object + // Versioning is enabled on the bucket. If Object Versioning is not enabled, + // the live object becomes soft deleted. + // + // **IAM Permissions**: + // + // Requires the following IAM permissions to use this method: + // + // - `storage.objects.restore` + // - `storage.objects.create` + // - `storage.objects.delete` (only required if overwriting an existing + // object) + // - `storage.objects.getIamPolicy` (only required if `projection` is `full` + // and the relevant bucket + // has uniform bucket-level access disabled) + // - `storage.objects.setIamPolicy` (only required if `copySourceAcl` is + // `true` and the relevant + // bucket has uniform bucket-level access disabled) + RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) + // Cancels an in-progress resumable upload. + // + // Any attempts to write to the resumable upload after cancelling the upload + // fail. + // + // The behavior for any in-progress write operations is not guaranteed; + // they could either complete before the cancellation or fail if the + // cancellation completes first. + CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) + // Retrieves object metadata. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + // To return object ACLs, the authenticated user must also have + // the `storage.objects.getIamPolicy` permission. + GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) + // Retrieves object data. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) + // Reads an object's data. + // + // This bi-directional API reads data from an object, allowing you to + // request multiple data ranges within a single stream, even across + // several messages. If an error occurs with any request, the stream + // closes with a relevant error code. Since you can have multiple + // outstanding requests, the error response includes a + // `BidiReadObjectRangesError` field detailing the specific error for + // each pending `read_id`. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) + // Updates an object's metadata. + // Equivalent to JSON API's `storage.objects.patch` method. + // + // **IAM Permissions**: + // + // Requires `storage.objects.update` IAM permission on the bucket. + UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) + // Stores a new object and metadata. + // + // An object can be written either in a single message stream or in a + // resumable sequence of message streams. To write using a single stream, + // the client should include in the first message of the stream an + // `WriteObjectSpec` describing the destination bucket, object, and any + // preconditions. Additionally, the final message must set 'finish_write' to + // true, or else it is an error. + // + // For a resumable write, the client should instead call + // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. + // They should then attach the returned `upload_id` to the first message of + // each following call to `WriteObject`. If the stream is closed before + // finishing the upload (either explicitly by the client or due to a network + // error or an error response from the server), the client should do as + // follows: + // + // - Check the result Status of the stream, to determine if writing can be + // resumed on this stream or must be restarted from scratch (by calling + // `StartResumableWrite()`). The resumable errors are `DEADLINE_EXCEEDED`, + // `INTERNAL`, and `UNAVAILABLE`. For each case, the client should use + // binary exponential backoff before retrying. Additionally, writes can + // be resumed after `RESOURCE_EXHAUSTED` errors, but only after taking + // appropriate measures, which might include reducing aggregate send rate + // across clients and/or requesting a quota increase for your project. + // - If the call to `WriteObject` returns `ABORTED`, that indicates + // concurrent attempts to update the resumable write, caused either by + // multiple racing clients or by a single client where the previous + // request was timed out on the client side but nonetheless reached the + // server. In this case the client should take steps to prevent further + // concurrent writes. For example, increase the timeouts and stop using + // more than one process to perform the upload. Follow the steps below for + // resuming the upload. + // - For resumable errors, the client should call `QueryWriteStatus()` and + // then continue writing from the returned `persisted_size`. This might be + // less than the amount of data the client previously sent. Note also that + // it is acceptable to send data starting at an offset earlier than the + // returned `persisted_size`; in this case, the service skips data at + // offsets that were already persisted (without checking that it matches + // the previously written data), and write only the data starting from the + // persisted offset. Even though the data isn't written, it might still + // incur a performance cost over resuming at the correct write offset. + // This behavior can make client-side handling simpler in some cases. + // - Clients must only send data that is a multiple of 256 KiB per message, + // unless the object is being finished with `finish_write` set to `true`. + // + // The service does not view the object as complete until the client has + // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any + // requests on a stream after sending a request with `finish_write` set to + // `true` causes an error. The client must check the response it + // receives to determine how much data the service is able to commit and + // whether the service views the object as complete. + // + // Attempting to resume an already finalized object results in an `OK` + // status, with a `WriteObjectResponse` containing the finalized object's + // metadata. + // + // Alternatively, you can use the `BidiWriteObject` operation to write an + // object with controls over flushing and the ability to fetch the ability to + // determine the current persisted size. + // + // **IAM Permissions**: + // + // Requires `storage.objects.create` + // IAM permission on + // the bucket. + WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) + // Stores a new object and metadata. + // + // This is similar to the `WriteObject` call with the added support for + // manual flushing of persisted state, and the ability to determine current + // persisted size without closing the stream. + // + // The client might specify one or both of the `state_lookup` and `flush` + // fields in each `BidiWriteObjectRequest`. If `flush` is specified, the data + // written so far is persisted to storage. If `state_lookup` is specified, the + // service responds with a `BidiWriteObjectResponse` that contains the + // persisted size. If both `flush` and `state_lookup` are specified, the flush + // always occurs before a `state_lookup`, so that both might be set in the + // same request and the returned state is the state of the object + // post-flush. When the stream is closed, a `BidiWriteObjectResponse` + // is always sent to the client, regardless of the value of `state_lookup`. + BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) + // Retrieves a list of objects matching the criteria. + // + // **IAM Permissions**: + // + // The authenticated user requires `storage.objects.list` + // IAM permission to use this method. To return object ACLs, the + // authenticated user must also + // have the `storage.objects.getIamPolicy` permission. + ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) + // Rewrites a source object to a destination object. Optionally overrides + // metadata. + RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) + // Starts a resumable write operation. This + // method is part of the Resumable + // upload feature. + // This allows you to upload large objects in multiple chunks, which is more + // resilient to network interruptions than a single upload. The validity + // duration of the write operation, and the consequences of it becoming + // invalid, are service-dependent. + // + // **IAM Permissions**: + // + // Requires `storage.objects.create` IAM permission on the bucket. + StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) + // Determines the `persisted_size` of an object that is being written. This + // method is part of the resumable + // upload feature. + // The returned value is the size of the object that has been persisted so + // far. The value can be used as the `write_offset` for the next `Write()` + // call. + // + // If the object does not exist, meaning if it was deleted, or the + // first `Write()` has not yet reached the service, this method returns the + // error `NOT_FOUND`. + // + // This method is useful for clients that buffer data and need to know which + // data can be safely evicted. The client can call `QueryWriteStatus()` at any + // time to determine how much data has been logged for this object. + // For any sequence of `QueryWriteStatus()` calls for a given + // object name, the sequence of returned `persisted_size` values are + // non-decreasing. + QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) + // Moves the source object to the destination object in the same bucket. + // This operation moves a source object to a destination object in the + // same bucket by renaming the object. The move itself is an atomic + // transaction, ensuring all steps either complete successfully or no + // changes are made. + // + // **IAM Permissions**: + // + // Requires the following IAM permissions to use this method: + // + // - `storage.objects.move` + // - `storage.objects.create` + // - `storage.objects.delete` (only required if overwriting an existing + // object) + MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) +} + +type storageClient struct { + cc grpc.ClientConnInterface +} + +func NewStorageClient(cc grpc.ClientConnInterface) StorageClient { + return &storageClient{cc} +} + +func (c *storageClient) DeleteBucket(ctx context.Context, in *DeleteBucketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Storage_DeleteBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) GetBucket(ctx context.Context, in *GetBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, Storage_GetBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) CreateBucket(ctx context.Context, in *CreateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, Storage_CreateBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) ListBuckets(ctx context.Context, in *ListBucketsRequest, opts ...grpc.CallOption) (*ListBucketsResponse, error) { + out := new(ListBucketsResponse) + err := c.cc.Invoke(ctx, Storage_ListBuckets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) LockBucketRetentionPolicy(ctx context.Context, in *LockBucketRetentionPolicyRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, Storage_LockBucketRetentionPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { + out := new(iampb.Policy) + err := c.cc.Invoke(ctx, Storage_GetIamPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error) { + out := new(iampb.Policy) + err := c.cc.Invoke(ctx, Storage_SetIamPolicy_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error) { + out := new(iampb.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, Storage_TestIamPermissions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) UpdateBucket(ctx context.Context, in *UpdateBucketRequest, opts ...grpc.CallOption) (*Bucket, error) { + out := new(Bucket) + err := c.cc.Invoke(ctx, Storage_UpdateBucket_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) ComposeObject(ctx context.Context, in *ComposeObjectRequest, opts ...grpc.CallOption) (*Object, error) { + out := new(Object) + err := c.cc.Invoke(ctx, Storage_ComposeObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Storage_DeleteObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) RestoreObject(ctx context.Context, in *RestoreObjectRequest, opts ...grpc.CallOption) (*Object, error) { + out := new(Object) + err := c.cc.Invoke(ctx, Storage_RestoreObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) CancelResumableWrite(ctx context.Context, in *CancelResumableWriteRequest, opts ...grpc.CallOption) (*CancelResumableWriteResponse, error) { + out := new(CancelResumableWriteResponse) + err := c.cc.Invoke(ctx, Storage_CancelResumableWrite_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*Object, error) { + out := new(Object) + err := c.cc.Invoke(ctx, Storage_GetObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) ReadObject(ctx context.Context, in *ReadObjectRequest, opts ...grpc.CallOption) (Storage_ReadObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[0], Storage_ReadObject_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageReadObjectClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Storage_ReadObjectClient interface { + Recv() (*ReadObjectResponse, error) + grpc.ClientStream +} + +type storageReadObjectClient struct { + grpc.ClientStream +} + +func (x *storageReadObjectClient) Recv() (*ReadObjectResponse, error) { + m := new(ReadObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageClient) BidiReadObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiReadObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[1], Storage_BidiReadObject_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageBidiReadObjectClient{stream} + return x, nil +} + +type Storage_BidiReadObjectClient interface { + Send(*BidiReadObjectRequest) error + Recv() (*BidiReadObjectResponse, error) + grpc.ClientStream +} + +type storageBidiReadObjectClient struct { + grpc.ClientStream +} + +func (x *storageBidiReadObjectClient) Send(m *BidiReadObjectRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *storageBidiReadObjectClient) Recv() (*BidiReadObjectResponse, error) { + m := new(BidiReadObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageClient) UpdateObject(ctx context.Context, in *UpdateObjectRequest, opts ...grpc.CallOption) (*Object, error) { + out := new(Object) + err := c.cc.Invoke(ctx, Storage_UpdateObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) WriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_WriteObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[2], Storage_WriteObject_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageWriteObjectClient{stream} + return x, nil +} + +type Storage_WriteObjectClient interface { + Send(*WriteObjectRequest) error + CloseAndRecv() (*WriteObjectResponse, error) + grpc.ClientStream +} + +type storageWriteObjectClient struct { + grpc.ClientStream +} + +func (x *storageWriteObjectClient) Send(m *WriteObjectRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *storageWriteObjectClient) CloseAndRecv() (*WriteObjectResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(WriteObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageClient) BidiWriteObject(ctx context.Context, opts ...grpc.CallOption) (Storage_BidiWriteObjectClient, error) { + stream, err := c.cc.NewStream(ctx, &Storage_ServiceDesc.Streams[3], Storage_BidiWriteObject_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageBidiWriteObjectClient{stream} + return x, nil +} + +type Storage_BidiWriteObjectClient interface { + Send(*BidiWriteObjectRequest) error + Recv() (*BidiWriteObjectResponse, error) + grpc.ClientStream +} + +type storageBidiWriteObjectClient struct { + grpc.ClientStream +} + +func (x *storageBidiWriteObjectClient) Send(m *BidiWriteObjectRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *storageBidiWriteObjectClient) Recv() (*BidiWriteObjectResponse, error) { + m := new(BidiWriteObjectResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) { + out := new(ListObjectsResponse) + err := c.cc.Invoke(ctx, Storage_ListObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) RewriteObject(ctx context.Context, in *RewriteObjectRequest, opts ...grpc.CallOption) (*RewriteResponse, error) { + out := new(RewriteResponse) + err := c.cc.Invoke(ctx, Storage_RewriteObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) StartResumableWrite(ctx context.Context, in *StartResumableWriteRequest, opts ...grpc.CallOption) (*StartResumableWriteResponse, error) { + out := new(StartResumableWriteResponse) + err := c.cc.Invoke(ctx, Storage_StartResumableWrite_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) QueryWriteStatus(ctx context.Context, in *QueryWriteStatusRequest, opts ...grpc.CallOption) (*QueryWriteStatusResponse, error) { + out := new(QueryWriteStatusResponse) + err := c.cc.Invoke(ctx, Storage_QueryWriteStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageClient) MoveObject(ctx context.Context, in *MoveObjectRequest, opts ...grpc.CallOption) (*Object, error) { + out := new(Object) + err := c.cc.Invoke(ctx, Storage_MoveObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StorageServer is the server API for Storage service. +// All implementations should embed UnimplementedStorageServer +// for forward compatibility +type StorageServer interface { + // Permanently deletes an empty bucket. + // The request fails if there are any live or + // noncurrent objects in the bucket, but the request succeeds if the + // bucket only contains soft-deleted objects or incomplete uploads, such + // as ongoing XML API multipart uploads. Does not permanently delete + // soft-deleted objects. + // + // When this API is used to delete a bucket containing an object that has a + // soft delete policy + // enabled, the object becomes soft deleted, and the + // `softDeleteTime` and `hardDeleteTime` properties are set on the + // object. + // + // Objects and multipart uploads that were in the bucket at the time of + // deletion are also retained for the specified retention duration. When + // a soft-deleted bucket reaches the end of its retention duration, it + // is permanently deleted. The `hardDeleteTime` of the bucket always + // equals + // or exceeds the expiration time of the last soft-deleted object in the + // bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.delete` IAM permission on the bucket. + DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) + // Returns metadata for the specified bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.get` + // IAM permission on + // the bucket. Additionally, to return specific bucket metadata, the + // authenticated user must have the following permissions: + // + // - To return the IAM policies: `storage.buckets.getIamPolicy` + // - To return the bucket IP filtering rules: `storage.buckets.getIpFilter` + GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) + // Creates a new bucket. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.create` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated user + // must have the following permissions: + // + // - To enable object retention using the `enableObjectRetention` query + // parameter: `storage.buckets.enableObjectRetention` + // - To set the bucket IP filtering rules: `storage.buckets.setIpFilter` + CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) + // Retrieves a list of buckets for a given project, ordered + // lexicographically by name. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.list` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated + // user must have the following permissions: + // + // - To list the IAM policies: `storage.buckets.getIamPolicy` + // - To list the bucket IP filtering rules: `storage.buckets.getIpFilter` + ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) + // Permanently locks the retention + // policy that is + // currently applied to the specified bucket. + // + // Caution: Locking a bucket is an + // irreversible action. Once you lock a bucket: + // + // - You cannot remove the retention policy from the bucket. + // - You cannot decrease the retention period for the policy. + // + // Once locked, you must delete the entire bucket in order to remove the + // bucket's retention policy. However, before you can delete the bucket, you + // must delete all the objects in the bucket, which is only + // possible if all the objects have reached the retention period set by the + // retention policy. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.update` IAM permission on the bucket. + LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) + // Gets the IAM policy for a specified bucket or managed folder. + // The `resource` field in the request should be + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.getIamPolicy` on the bucket or + // `storage.managedFolders.getIamPolicy` IAM permission on the + // managed folder. + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) + // Updates an IAM policy for the specified bucket or managed folder. + // The `resource` field in the request should be + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) + // Tests a set of permissions on the given bucket, object, or managed folder + // to see which, if any, are held by the caller. The `resource` field in the + // request should be `projects/_/buckets/{bucket}` for a bucket, + // `projects/_/buckets/{bucket}/objects/{object}` for an object, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) + // Updates a bucket. Changes to the bucket are readable immediately after + // writing, but configuration changes might take time to propagate. This + // method supports `patch` semantics. + // + // **IAM Permissions**: + // + // Requires `storage.buckets.update` IAM permission on the bucket. + // Additionally, to enable specific bucket features, the authenticated user + // must have the following permissions: + // + // - To set bucket IP filtering rules: `storage.buckets.setIpFilter` + // - To update public access prevention policies or access control lists + // (ACLs): `storage.buckets.setIamPolicy` + UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) + // Concatenates a list of existing objects into a new object in the same + // bucket. The existing source objects are unaffected by this operation. + // + // **IAM Permissions**: + // + // Requires the `storage.objects.create` and `storage.objects.get` IAM + // permissions to use this method. If the new composite object + // overwrites an existing object, the authenticated user must also have + // the `storage.objects.delete` permission. If the request body includes + // the retention property, the authenticated user must also have the + // `storage.objects.setRetention` IAM permission. + ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) + // Deletes an object and its metadata. Deletions are permanent if versioning + // is not enabled for the bucket, or if the generation parameter is used, or + // if soft delete is not + // enabled for the bucket. + // When this API is used to delete an object from a bucket that has soft + // delete policy enabled, the object becomes soft deleted, and the + // `softDeleteTime` and `hardDeleteTime` properties are set on the object. + // This API cannot be used to permanently delete soft-deleted objects. + // Soft-deleted objects are permanently deleted according to their + // `hardDeleteTime`. + // + // You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject] + // API to restore soft-deleted objects until the soft delete retention period + // has passed. + // + // **IAM Permissions**: + // + // Requires `storage.objects.delete` IAM permission on the bucket. + DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) + // Restores a + // soft-deleted object. + // When a soft-deleted object is restored, a new copy of that object is + // created in the same bucket and inherits the same metadata as the + // soft-deleted object. The inherited metadata is the metadata that existed + // when the original object became soft deleted, with the following + // exceptions: + // + // - The `createTime` of the new object is set to the time at which the + // soft-deleted object was restored. + // - The `softDeleteTime` and `hardDeleteTime` values are cleared. + // - A new generation is assigned and the metageneration is reset to 1. + // - If the soft-deleted object was in a bucket that had Autoclass enabled, + // the new object is + // restored to Standard storage. + // - The restored object inherits the bucket's default object ACL, unless + // `copySourceAcl` is `true`. + // + // If a live object using the same name already exists in the bucket and + // becomes overwritten, the live object becomes a noncurrent object if Object + // Versioning is enabled on the bucket. If Object Versioning is not enabled, + // the live object becomes soft deleted. + // + // **IAM Permissions**: + // + // Requires the following IAM permissions to use this method: + // + // - `storage.objects.restore` + // - `storage.objects.create` + // - `storage.objects.delete` (only required if overwriting an existing + // object) + // - `storage.objects.getIamPolicy` (only required if `projection` is `full` + // and the relevant bucket + // has uniform bucket-level access disabled) + // - `storage.objects.setIamPolicy` (only required if `copySourceAcl` is + // `true` and the relevant + // bucket has uniform bucket-level access disabled) + RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) + // Cancels an in-progress resumable upload. + // + // Any attempts to write to the resumable upload after cancelling the upload + // fail. + // + // The behavior for any in-progress write operations is not guaranteed; + // they could either complete before the cancellation or fail if the + // cancellation completes first. + CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) + // Retrieves object metadata. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + // To return object ACLs, the authenticated user must also have + // the `storage.objects.getIamPolicy` permission. + GetObject(context.Context, *GetObjectRequest) (*Object, error) + // Retrieves object data. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error + // Reads an object's data. + // + // This bi-directional API reads data from an object, allowing you to + // request multiple data ranges within a single stream, even across + // several messages. If an error occurs with any request, the stream + // closes with a relevant error code. Since you can have multiple + // outstanding requests, the error response includes a + // `BidiReadObjectRangesError` field detailing the specific error for + // each pending `read_id`. + // + // **IAM Permissions**: + // + // Requires `storage.objects.get` IAM permission on the bucket. + BidiReadObject(Storage_BidiReadObjectServer) error + // Updates an object's metadata. + // Equivalent to JSON API's `storage.objects.patch` method. + // + // **IAM Permissions**: + // + // Requires `storage.objects.update` IAM permission on the bucket. + UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) + // Stores a new object and metadata. + // + // An object can be written either in a single message stream or in a + // resumable sequence of message streams. To write using a single stream, + // the client should include in the first message of the stream an + // `WriteObjectSpec` describing the destination bucket, object, and any + // preconditions. Additionally, the final message must set 'finish_write' to + // true, or else it is an error. + // + // For a resumable write, the client should instead call + // `StartResumableWrite()`, populating a `WriteObjectSpec` into that request. + // They should then attach the returned `upload_id` to the first message of + // each following call to `WriteObject`. If the stream is closed before + // finishing the upload (either explicitly by the client or due to a network + // error or an error response from the server), the client should do as + // follows: + // + // - Check the result Status of the stream, to determine if writing can be + // resumed on this stream or must be restarted from scratch (by calling + // `StartResumableWrite()`). The resumable errors are `DEADLINE_EXCEEDED`, + // `INTERNAL`, and `UNAVAILABLE`. For each case, the client should use + // binary exponential backoff before retrying. Additionally, writes can + // be resumed after `RESOURCE_EXHAUSTED` errors, but only after taking + // appropriate measures, which might include reducing aggregate send rate + // across clients and/or requesting a quota increase for your project. + // - If the call to `WriteObject` returns `ABORTED`, that indicates + // concurrent attempts to update the resumable write, caused either by + // multiple racing clients or by a single client where the previous + // request was timed out on the client side but nonetheless reached the + // server. In this case the client should take steps to prevent further + // concurrent writes. For example, increase the timeouts and stop using + // more than one process to perform the upload. Follow the steps below for + // resuming the upload. + // - For resumable errors, the client should call `QueryWriteStatus()` and + // then continue writing from the returned `persisted_size`. This might be + // less than the amount of data the client previously sent. Note also that + // it is acceptable to send data starting at an offset earlier than the + // returned `persisted_size`; in this case, the service skips data at + // offsets that were already persisted (without checking that it matches + // the previously written data), and write only the data starting from the + // persisted offset. Even though the data isn't written, it might still + // incur a performance cost over resuming at the correct write offset. + // This behavior can make client-side handling simpler in some cases. + // - Clients must only send data that is a multiple of 256 KiB per message, + // unless the object is being finished with `finish_write` set to `true`. + // + // The service does not view the object as complete until the client has + // sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any + // requests on a stream after sending a request with `finish_write` set to + // `true` causes an error. The client must check the response it + // receives to determine how much data the service is able to commit and + // whether the service views the object as complete. + // + // Attempting to resume an already finalized object results in an `OK` + // status, with a `WriteObjectResponse` containing the finalized object's + // metadata. + // + // Alternatively, you can use the `BidiWriteObject` operation to write an + // object with controls over flushing and the ability to fetch the ability to + // determine the current persisted size. + // + // **IAM Permissions**: + // + // Requires `storage.objects.create` + // IAM permission on + // the bucket. + WriteObject(Storage_WriteObjectServer) error + // Stores a new object and metadata. + // + // This is similar to the `WriteObject` call with the added support for + // manual flushing of persisted state, and the ability to determine current + // persisted size without closing the stream. + // + // The client might specify one or both of the `state_lookup` and `flush` + // fields in each `BidiWriteObjectRequest`. If `flush` is specified, the data + // written so far is persisted to storage. If `state_lookup` is specified, the + // service responds with a `BidiWriteObjectResponse` that contains the + // persisted size. If both `flush` and `state_lookup` are specified, the flush + // always occurs before a `state_lookup`, so that both might be set in the + // same request and the returned state is the state of the object + // post-flush. When the stream is closed, a `BidiWriteObjectResponse` + // is always sent to the client, regardless of the value of `state_lookup`. + BidiWriteObject(Storage_BidiWriteObjectServer) error + // Retrieves a list of objects matching the criteria. + // + // **IAM Permissions**: + // + // The authenticated user requires `storage.objects.list` + // IAM permission to use this method. To return object ACLs, the + // authenticated user must also + // have the `storage.objects.getIamPolicy` permission. + ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) + // Rewrites a source object to a destination object. Optionally overrides + // metadata. + RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) + // Starts a resumable write operation. This + // method is part of the Resumable + // upload feature. + // This allows you to upload large objects in multiple chunks, which is more + // resilient to network interruptions than a single upload. The validity + // duration of the write operation, and the consequences of it becoming + // invalid, are service-dependent. + // + // **IAM Permissions**: + // + // Requires `storage.objects.create` IAM permission on the bucket. + StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) + // Determines the `persisted_size` of an object that is being written. This + // method is part of the resumable + // upload feature. + // The returned value is the size of the object that has been persisted so + // far. The value can be used as the `write_offset` for the next `Write()` + // call. + // + // If the object does not exist, meaning if it was deleted, or the + // first `Write()` has not yet reached the service, this method returns the + // error `NOT_FOUND`. + // + // This method is useful for clients that buffer data and need to know which + // data can be safely evicted. The client can call `QueryWriteStatus()` at any + // time to determine how much data has been logged for this object. + // For any sequence of `QueryWriteStatus()` calls for a given + // object name, the sequence of returned `persisted_size` values are + // non-decreasing. + QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) + // Moves the source object to the destination object in the same bucket. + // This operation moves a source object to a destination object in the + // same bucket by renaming the object. The move itself is an atomic + // transaction, ensuring all steps either complete successfully or no + // changes are made. + // + // **IAM Permissions**: + // + // Requires the following IAM permissions to use this method: + // + // - `storage.objects.move` + // - `storage.objects.create` + // - `storage.objects.delete` (only required if overwriting an existing + // object) + MoveObject(context.Context, *MoveObjectRequest) (*Object, error) +} + +// UnimplementedStorageServer should be embedded to have forward compatible implementations. +type UnimplementedStorageServer struct { +} + +func (UnimplementedStorageServer) DeleteBucket(context.Context, *DeleteBucketRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBucket not implemented") +} +func (UnimplementedStorageServer) GetBucket(context.Context, *GetBucketRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBucket not implemented") +} +func (UnimplementedStorageServer) CreateBucket(context.Context, *CreateBucketRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBucket not implemented") +} +func (UnimplementedStorageServer) ListBuckets(context.Context, *ListBucketsRequest) (*ListBucketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBuckets not implemented") +} +func (UnimplementedStorageServer) LockBucketRetentionPolicy(context.Context, *LockBucketRetentionPolicyRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method LockBucketRetentionPolicy not implemented") +} +func (UnimplementedStorageServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (UnimplementedStorageServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (UnimplementedStorageServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} +func (UnimplementedStorageServer) UpdateBucket(context.Context, *UpdateBucketRequest) (*Bucket, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBucket not implemented") +} +func (UnimplementedStorageServer) ComposeObject(context.Context, *ComposeObjectRequest) (*Object, error) { + return nil, status.Errorf(codes.Unimplemented, "method ComposeObject not implemented") +} +func (UnimplementedStorageServer) DeleteObject(context.Context, *DeleteObjectRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented") +} +func (UnimplementedStorageServer) RestoreObject(context.Context, *RestoreObjectRequest) (*Object, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreObject not implemented") +} +func (UnimplementedStorageServer) CancelResumableWrite(context.Context, *CancelResumableWriteRequest) (*CancelResumableWriteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelResumableWrite not implemented") +} +func (UnimplementedStorageServer) GetObject(context.Context, *GetObjectRequest) (*Object, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetObject not implemented") +} +func (UnimplementedStorageServer) ReadObject(*ReadObjectRequest, Storage_ReadObjectServer) error { + return status.Errorf(codes.Unimplemented, "method ReadObject not implemented") +} +func (UnimplementedStorageServer) BidiReadObject(Storage_BidiReadObjectServer) error { + return status.Errorf(codes.Unimplemented, "method BidiReadObject not implemented") +} +func (UnimplementedStorageServer) UpdateObject(context.Context, *UpdateObjectRequest) (*Object, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateObject not implemented") +} +func (UnimplementedStorageServer) WriteObject(Storage_WriteObjectServer) error { + return status.Errorf(codes.Unimplemented, "method WriteObject not implemented") +} +func (UnimplementedStorageServer) BidiWriteObject(Storage_BidiWriteObjectServer) error { + return status.Errorf(codes.Unimplemented, "method BidiWriteObject not implemented") +} +func (UnimplementedStorageServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListObjects not implemented") +} +func (UnimplementedStorageServer) RewriteObject(context.Context, *RewriteObjectRequest) (*RewriteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewriteObject not implemented") +} +func (UnimplementedStorageServer) StartResumableWrite(context.Context, *StartResumableWriteRequest) (*StartResumableWriteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartResumableWrite not implemented") +} +func (UnimplementedStorageServer) QueryWriteStatus(context.Context, *QueryWriteStatusRequest) (*QueryWriteStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWriteStatus not implemented") +} +func (UnimplementedStorageServer) MoveObject(context.Context, *MoveObjectRequest) (*Object, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveObject not implemented") +} + +// UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StorageServer will +// result in compilation errors. +type UnsafeStorageServer interface { + mustEmbedUnimplementedStorageServer() +} + +func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer) { + s.RegisterService(&Storage_ServiceDesc, srv) +} + +func _Storage_DeleteBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).DeleteBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_DeleteBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).DeleteBucket(ctx, req.(*DeleteBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_GetBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).GetBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_GetBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).GetBucket(ctx, req.(*GetBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_CreateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).CreateBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_CreateBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).CreateBucket(ctx, req.(*CreateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_ListBuckets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBucketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).ListBuckets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_ListBuckets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).ListBuckets(ctx, req.(*ListBucketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_LockBucketRetentionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockBucketRetentionPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).LockBucketRetentionPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_LockBucketRetentionPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).LockBucketRetentionPolicy(ctx, req.(*LockBucketRetentionPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(iampb.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_GetIamPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).GetIamPolicy(ctx, req.(*iampb.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(iampb.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_SetIamPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).SetIamPolicy(ctx, req.(*iampb.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(iampb.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_TestIamPermissions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).TestIamPermissions(ctx, req.(*iampb.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_UpdateBucket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBucketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).UpdateBucket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_UpdateBucket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).UpdateBucket(ctx, req.(*UpdateBucketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_ComposeObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ComposeObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).ComposeObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_ComposeObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).ComposeObject(ctx, req.(*ComposeObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).DeleteObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_DeleteObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).DeleteObject(ctx, req.(*DeleteObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_RestoreObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).RestoreObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_RestoreObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).RestoreObject(ctx, req.(*RestoreObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_CancelResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelResumableWriteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).CancelResumableWrite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_CancelResumableWrite_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).CancelResumableWrite(ctx, req.(*CancelResumableWriteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).GetObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_GetObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).GetObject(ctx, req.(*GetObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_ReadObject_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ReadObjectRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StorageServer).ReadObject(m, &storageReadObjectServer{stream}) +} + +type Storage_ReadObjectServer interface { + Send(*ReadObjectResponse) error + grpc.ServerStream +} + +type storageReadObjectServer struct { + grpc.ServerStream +} + +func (x *storageReadObjectServer) Send(m *ReadObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Storage_BidiReadObject_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(StorageServer).BidiReadObject(&storageBidiReadObjectServer{stream}) +} + +type Storage_BidiReadObjectServer interface { + Send(*BidiReadObjectResponse) error + Recv() (*BidiReadObjectRequest, error) + grpc.ServerStream +} + +type storageBidiReadObjectServer struct { + grpc.ServerStream +} + +func (x *storageBidiReadObjectServer) Send(m *BidiReadObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *storageBidiReadObjectServer) Recv() (*BidiReadObjectRequest, error) { + m := new(BidiReadObjectRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Storage_UpdateObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).UpdateObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_UpdateObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).UpdateObject(ctx, req.(*UpdateObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_WriteObject_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(StorageServer).WriteObject(&storageWriteObjectServer{stream}) +} + +type Storage_WriteObjectServer interface { + SendAndClose(*WriteObjectResponse) error + Recv() (*WriteObjectRequest, error) + grpc.ServerStream +} + +type storageWriteObjectServer struct { + grpc.ServerStream +} + +func (x *storageWriteObjectServer) SendAndClose(m *WriteObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *storageWriteObjectServer) Recv() (*WriteObjectRequest, error) { + m := new(WriteObjectRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Storage_BidiWriteObject_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(StorageServer).BidiWriteObject(&storageBidiWriteObjectServer{stream}) +} + +type Storage_BidiWriteObjectServer interface { + Send(*BidiWriteObjectResponse) error + Recv() (*BidiWriteObjectRequest, error) + grpc.ServerStream +} + +type storageBidiWriteObjectServer struct { + grpc.ServerStream +} + +func (x *storageBidiWriteObjectServer) Send(m *BidiWriteObjectResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *storageBidiWriteObjectServer) Recv() (*BidiWriteObjectRequest, error) { + m := new(BidiWriteObjectRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Storage_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).ListObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_ListObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).ListObjects(ctx, req.(*ListObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_RewriteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RewriteObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).RewriteObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_RewriteObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).RewriteObject(ctx, req.(*RewriteObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_StartResumableWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartResumableWriteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).StartResumableWrite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_StartResumableWrite_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).StartResumableWrite(ctx, req.(*StartResumableWriteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_QueryWriteStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWriteStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).QueryWriteStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_QueryWriteStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).QueryWriteStatus(ctx, req.(*QueryWriteStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Storage_MoveObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServer).MoveObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Storage_MoveObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServer).MoveObject(ctx, req.(*MoveObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Storage_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.storage.v2.Storage", + HandlerType: (*StorageServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteBucket", + Handler: _Storage_DeleteBucket_Handler, + }, + { + MethodName: "GetBucket", + Handler: _Storage_GetBucket_Handler, + }, + { + MethodName: "CreateBucket", + Handler: _Storage_CreateBucket_Handler, + }, + { + MethodName: "ListBuckets", + Handler: _Storage_ListBuckets_Handler, + }, + { + MethodName: "LockBucketRetentionPolicy", + Handler: _Storage_LockBucketRetentionPolicy_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _Storage_GetIamPolicy_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _Storage_SetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _Storage_TestIamPermissions_Handler, + }, + { + MethodName: "UpdateBucket", + Handler: _Storage_UpdateBucket_Handler, + }, + { + MethodName: "ComposeObject", + Handler: _Storage_ComposeObject_Handler, + }, + { + MethodName: "DeleteObject", + Handler: _Storage_DeleteObject_Handler, + }, + { + MethodName: "RestoreObject", + Handler: _Storage_RestoreObject_Handler, + }, + { + MethodName: "CancelResumableWrite", + Handler: _Storage_CancelResumableWrite_Handler, + }, + { + MethodName: "GetObject", + Handler: _Storage_GetObject_Handler, + }, + { + MethodName: "UpdateObject", + Handler: _Storage_UpdateObject_Handler, + }, + { + MethodName: "ListObjects", + Handler: _Storage_ListObjects_Handler, + }, + { + MethodName: "RewriteObject", + Handler: _Storage_RewriteObject_Handler, + }, + { + MethodName: "StartResumableWrite", + Handler: _Storage_StartResumableWrite_Handler, + }, + { + MethodName: "QueryWriteStatus", + Handler: _Storage_QueryWriteStatus_Handler, + }, + { + MethodName: "MoveObject", + Handler: _Storage_MoveObject_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "ReadObject", + Handler: _Storage_ReadObject_Handler, + ServerStreams: true, + }, + { + StreamName: "BidiReadObject", + Handler: _Storage_BidiReadObject_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "WriteObject", + Handler: _Storage_WriteObject_Handler, + ClientStreams: true, + }, + { + StreamName: "BidiWriteObject", + Handler: _Storage_BidiWriteObject_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "google/storage/v2/storage.proto", +} diff --git a/vendor/cloud.google.com/go/storage/internal/version.go b/vendor/cloud.google.com/go/storage/internal/version.go index 07cfc2811f..7d1d0dfd40 100644 --- a/vendor/cloud.google.com/go/storage/internal/version.go +++ b/vendor/cloud.google.com/go/storage/internal/version.go @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Code generated by gapicgen. DO NOT EDIT. + package internal // Version is the current tagged release of the library. -const Version = "1.57.0" +const Version = "1.58.0" diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go index 793c1b2e0e..0c5f5be0ab 100644 --- a/vendor/cloud.google.com/go/storage/reader.go +++ b/vendor/cloud.google.com/go/storage/reader.go @@ -23,8 +23,6 @@ import ( "strings" "sync" "time" - - "cloud.google.com/go/internal/trace" ) var crc32cTable = crc32.MakeTable(crc32.Castagnoli) @@ -116,7 +114,8 @@ func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error) { func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (r *Reader, err error) { // This span covers the life of the reader. It is closed via the context // in Reader.Close. - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Reader") + ctx, _ = startSpan(ctx, "Object.Reader") + defer func() { endSpan(ctx, err) }() if err := o.validate(); err != nil { return nil, err @@ -150,8 +149,6 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) // span now if there is an error. if err == nil { r.ctx = ctx - } else { - trace.EndSpan(ctx, err) } return r, err @@ -167,7 +164,8 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiRangeDownloader, err error) { // This span covers the life of the reader. It is closed via the context // in Reader.Close. - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.MultiRangeDownloader") + ctx, _ = startSpan(ctx, "Object.MultiRangeDownloader") + defer func() { endSpan(ctx, err) }() if err := o.validate(); err != nil { return nil, err @@ -195,8 +193,6 @@ func (o *ObjectHandle) NewMultiRangeDownloader(ctx context.Context) (mrd *MultiR // span now if there is an error. if err == nil { r.ctx = ctx - } else { - trace.EndSpan(ctx, err) } return r, err @@ -285,7 +281,7 @@ type Reader struct { // Close closes the Reader. It must be called when done reading. func (r *Reader) Close() error { err := r.reader.Close() - trace.EndSpan(r.ctx, err) + endSpan(r.ctx, err) return err } @@ -436,7 +432,7 @@ func (mrd *MultiRangeDownloader) Add(output io.Writer, offset, length int64, cal // Call [MultiRangeDownloader.Wait] to avoid this error. func (mrd *MultiRangeDownloader) Close() error { err := mrd.reader.close() - trace.EndSpan(mrd.ctx, err) + endSpan(mrd.ctx, err) return err } diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go index 2f4e093d82..55a81fab79 100644 --- a/vendor/cloud.google.com/go/storage/storage.go +++ b/vendor/cloud.google.com/go/storage/storage.go @@ -40,7 +40,6 @@ import ( "cloud.google.com/go/auth" "cloud.google.com/go/internal/optional" - "cloud.google.com/go/internal/trace" "cloud.google.com/go/storage/internal" "cloud.google.com/go/storage/internal/apiv2/storagepb" "github.com/googleapis/gax-go/v2" @@ -1120,6 +1119,13 @@ type ObjectAttrsToUpdate struct { // extending the RetainUntil time on the object retention must be done // on an ObjectHandle with OverrideUnlockedRetention set to true. Retention *ObjectRetention + + // Contexts allows adding, modifying, or deleting individual object contexts. + // To add or modify a context, set the value field in ObjectCustomContextPayload. + // To delete a context, set the Delete field in ObjectCustomContextPayload to true. + // To remove all contexts, pass Custom as an empty map in Contexts. Passing nil Custom + // map will be no-op. + Contexts *ObjectContexts } // Delete deletes the single specified object. @@ -1248,7 +1254,7 @@ type MoveObjectDestination struct { // It is the caller's responsibility to call Close when writing is done. To // stop writing without saving the data, cancel the context. func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer") + ctx, _ = startSpan(ctx, "Object.Writer") return &Writer{ ctx: ctx, o: o, @@ -1284,7 +1290,7 @@ func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer { // objects which were created append semantics and not finalized. // This feature is in preview and is not yet available for general use. func (o *ObjectHandle) NewWriterFromAppendableObject(ctx context.Context, opts *AppendableWriterOpts) (*Writer, int64, error) { - ctx = trace.StartSpan(ctx, "cloud.google.com/go/storage.Object.Writer") + ctx, _ = startSpan(ctx, "Object.WriterFromAppendableObject") if o.gen < 0 { return nil, 0, errors.New("storage: ObjectHandle.Generation must be set to use NewWriterFromAppendableObject") } @@ -1412,6 +1418,7 @@ func (o *ObjectAttrs) toRawObject(bucket string) *raw.Object { Metadata: o.Metadata, CustomTime: ct, Retention: o.Retention.toRawObjectRetention(), + Contexts: toRawObjectContexts(o.Contexts), } } @@ -1446,6 +1453,7 @@ func (o *ObjectAttrs) toProtoObject(b string) *storagepb.Object { KmsKey: o.KMSKeyName, Generation: o.Generation, Size: o.Size, + Contexts: toProtoObjectContexts(o.Contexts), } } @@ -1489,6 +1497,10 @@ func (uattrs *ObjectAttrsToUpdate) toProtoObject(bucket, object string) *storage o.Metadata = uattrs.Metadata + if uattrs.Contexts != nil { + o.Contexts = toProtoObjectContexts(uattrs.Contexts) + } + return o } @@ -1671,6 +1683,18 @@ type ObjectAttrs struct { // ObjectHandle.Attrs will return ErrObjectNotExist if the object is soft-deleted. // This field is read-only. HardDeleteTime time.Time + + // Contexts store custom key-value metadata that the user could + // annotate object with. These key-value pairs can be used to filter objects + // during list calls. See https://cloud.google.com/storage/docs/object-contexts + // for more details. + Contexts *ObjectContexts +} + +// isZero reports whether the ObjectAttrs struct is empty (i.e. all the +// fields are their zero value). +func (o *ObjectAttrs) isZero() bool { + return reflect.DeepEqual(o, &ObjectAttrs{}) } // ObjectRetention contains the retention configuration for this object. @@ -1778,6 +1802,7 @@ func newObject(o *raw.Object) *ObjectAttrs { Retention: toObjectRetention(o.Retention), SoftDeleteTime: convertTime(o.SoftDeleteTime), HardDeleteTime: convertTime(o.HardDeleteTime), + Contexts: toObjectContexts(o.Contexts), } } @@ -1816,6 +1841,7 @@ func newObjectFromProto(o *storagepb.Object) *ObjectAttrs { ComponentCount: int64(o.ComponentCount), SoftDeleteTime: convertProtoTime(o.GetSoftDeleteTime()), HardDeleteTime: convertProtoTime(o.GetHardDeleteTime()), + Contexts: toObjectContextsFromProto(o.GetContexts()), } } @@ -1928,6 +1954,11 @@ type Query struct { // If true, only objects that have been soft-deleted will be listed. // By default, soft-deleted objects are not listed. SoftDeleted bool + + // Filters objects based on object attributes like custom contexts. + // See https://docs.cloud.google.com/storage/docs/listing-objects#filter-by-object-contexts + // for more details. + Filter string } // attrToFieldMap maps the field names of ObjectAttrs to the underlying field @@ -1966,6 +1997,7 @@ var attrToFieldMap = map[string]string{ "Retention": "retention", "HardDeleteTime": "hardDeleteTime", "SoftDeleteTime": "softDeleteTime", + "Contexts": "contexts", } // attrToProtoFieldMap maps the field names of ObjectAttrs to the underlying field @@ -2001,6 +2033,7 @@ var attrToProtoFieldMap = map[string]string{ "ComponentCount": "component_count", "HardDeleteTime": "hard_delete_time", "SoftDeleteTime": "soft_delete_time", + "Contexts": "contexts", // MediaLink was explicitly excluded from the proto as it is an HTTP-ism. // "MediaLink": "mediaLink", // TODO: add object retention - b/308194853 diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go index e7c8ed51b4..cba6184cb1 100644 --- a/vendor/cloud.google.com/go/storage/writer.go +++ b/vendor/cloud.google.com/go/storage/writer.go @@ -22,8 +22,6 @@ import ( "sync" "time" "unicode/utf8" - - "cloud.google.com/go/internal/trace" ) // Interface internalWriter wraps low-level implementations which may vary @@ -43,17 +41,35 @@ type Writer struct { // attributes are ignored. ObjectAttrs - // SendCRC32C specifies whether to transmit a CRC32C field. It should be set - // to true in addition to setting the Writer's CRC32C field, because zero - // is a valid CRC and normally a zero would not be transmitted. - // If a CRC32C is sent, and the data written does not match the checksum, - // the write will be rejected. + // SendCRC32C specifies whether to transmit a CRC32C checksum. When this is + // true and the Writer's CRC32C field is set, that checksum is sent to GCS. + // If the data written does not match the checksum, the write is rejected. + // It is necessary to set this field to true in addition to setting the + // Writer's CRC32C field because zero is a valid CRC. + // + // When using gRPC, the client automatically calculates and sends checksums + // per-chunk and for the full object. However, A user-provided checksum takes + // precedence over the auto-calculated checksum for full object. + // To disable auto checksum behavior, see DisableAutoChecksum. // - // Note: SendCRC32C must be set to true BEFORE the first call to - // Writer.Write() in order to send the checksum. If it is set after that - // point, the checksum will be ignored. + // Note: SendCRC32C must be set before the first call to Writer.Write(). SendCRC32C bool + // DisableAutoChecksum disables automatic CRC32C checksum calculation and + // validation in gRPC Writer. By default when using gRPC, the Writer + // automatically performs checksum validation for both individual chunks and + // the entire object. Setting this to true disables this behavior. This flag + // is ignored when not using gRPC. + // + // Disabling automatic checksumming does not prevent a user-provided checksum + // from being sent. If SendCRC32C is true and the Writer's CRC32C field is + // populated, that checksum will still be sent to GCS for validation. + // + // Note: DisableAutoChecksum must be set before the first call to + // Writer.Write(). Automatic checksumming is not enabled for writes + // using the HTTP client or for unfinalized writes to appendable objects in gRPC. + DisableAutoChecksum bool + // ChunkSize controls the maximum number of bytes of the object that the // Writer will attempt to send to the server in a single request. Objects // smaller than the size will be sent in a single request, while larger @@ -261,7 +277,7 @@ func (w *Writer) Close() error { w.closed = true w.mu.Lock() defer w.mu.Unlock() - trace.EndSpan(w.ctx, w.err) + endSpan(w.ctx, w.err) return w.err } @@ -274,6 +290,8 @@ func (w *Writer) openWriter() (err error) { } isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist) + // Append operations that takeover a specific generation are idempotent. + isIdempotent = isIdempotent || w.Append && w.o.gen > 0 opts := makeStorageOpts(isIdempotent, w.o.retry, w.o.userProject) params := &openWriterParams{ ctx: w.ctx, @@ -286,6 +304,7 @@ func (w *Writer) openWriter() (err error) { appendGen: w.o.gen, encryptionKey: w.o.encryptionKey, sendCRC32C: w.SendCRC32C, + disableAutoChecksum: w.DisableAutoChecksum, append: w.Append, finalizeOnClose: w.FinalizeOnClose, donec: w.donec, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md index 1799c6ef22..d730a3bc35 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md @@ -1,5 +1,40 @@ # Release History +## 1.21.1 (2026-04-16) + +### Bugs Fixed + +* Fixed an issue in `ResponseError.Error()` where the request URL path was being logged unescaped. +* Redact query parameters when logging errors. +* For `runtime.JoinPaths`, don't add a slash between root and paths when `paths` starts with `?` (query string). + +### Other Changes + +* Upgraded to Go 1.25.0. +* Upgraded dependencies. + +## 1.21.0 (2026-01-12) + +### Features Added + +* Added `runtime/datetime` package which provides specialized time type wrappers for serializing and deserializing +time values in various formats used by Azure services. + +### Other Changes + +* Aligned `cloud.AzureGovernment` and `cloud.AzureChina` audience values with Azure CLI + +## 1.20.0 (2025-11-06) + +### Features Added + +* Added `runtime.FetcherForNextLinkOptions.HTTPVerb` to specify the HTTP verb when fetching the next page via next link. Defaults to `http.MethodGet`. + +### Bugs Fixed + +* Fixed potential panic when decoding base64 strings. +* Fixed an issue in resource identifier parsing which prevented it from returning an error for malformed resource IDs. + ## 1.19.1 (2025-09-11) ### Bugs Fixed diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go index c373cc43fd..d103de88a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go index 1bdd16a3d0..370754179b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go index b8348b7d82..c602e77d1b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -217,6 +214,7 @@ func appendNext(parent *ResourceID, parts []string, id string) (*ResourceID, err func splitStringAndOmitEmpty(v, sep string) []string { r := make([]string, 0) for _, s := range strings.Split(v, sep) { + s = strings.TrimSpace(s) if len(s) == 0 { continue } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go index ca03ac9713..34d09b6d7f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_type.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go index f18caf8489..787c8e5031 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/policy/policy.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go index d1c3191f2e..7f7b0f1419 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_identifier.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go index fc7fbffd26..270d495e4f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/resource_type.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go index 6a7c916b43..fa0f292060 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go index 810ac9d9fa..3bfb7d02d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go index 6cea184240..cc84d542d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_trace_namespace.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go index 1400d43799..0b58f542e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/runtime.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -10,11 +7,11 @@ import "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" func init() { cloud.AzureChina.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ - Audience: "https://management.core.chinacloudapi.cn", + Audience: "https://management.core.chinacloudapi.cn/", Endpoint: "https://management.chinacloudapi.cn", } cloud.AzureGovernment.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ - Audience: "https://management.core.usgovcloudapi.net", + Audience: "https://management.core.usgovcloudapi.net/", Endpoint: "https://management.usgovcloudapi.net", } cloud.AzurePublic.Services[cloud.ResourceManager] = cloud.ServiceConfiguration{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go index 9d077a3e12..4ef739a6c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/cloud.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go index 985b1bde2f..39d0d489e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud/doc.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go index 9d1c2f0c05..c3572985b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go index 654a5f4043..4862a9f688 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go index 03cb227d0d..66111a403f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/errors.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go index 2b19d01f76..4a5d7462d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/etag.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go index 460170034a..96be304eb7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/exported.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -92,7 +89,7 @@ func DecodeByteArray(s string, v *[]byte, format Base64Encoding) error { return nil } payload := string(s) - if payload[0] == '"' { + if len(payload) >= 2 && payload[0] == '"' && payload[len(payload)-1] == '"' { // remove surrounding quotes payload = payload[1 : len(payload)-1] } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go index e45f831ed2..5d9892a055 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go index 9b3f5badb5..4bf722630a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -115,7 +112,7 @@ func NewRequest(ctx context.Context, httpMethod string, endpoint string) (*Reque if req.URL.Host == "" { return nil, errors.New("no Host in request URL") } - if !(req.URL.Scheme == "http" || req.URL.Scheme == "https") { + if req.URL.Scheme != "http" && req.URL.Scheme != "https" { return nil, fmt.Errorf("unsupported protocol scheme %s", req.URL.Scheme) } // populate values so that the same instance is propagated across policies diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go index 8aec256bd0..8246b6a5b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/response_error.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -134,7 +131,7 @@ func (e *ResponseError) Error() string { msg := &bytes.Buffer{} if e.RawResponse != nil { if e.RawResponse.Request != nil { - fmt.Fprintf(msg, "%s %s://%s%s\n", e.RawResponse.Request.Method, e.RawResponse.Request.URL.Scheme, e.RawResponse.Request.URL.Host, e.RawResponse.Request.URL.Path) + fmt.Fprintf(msg, "%s %s://%s%s\n", e.RawResponse.Request.Method, e.RawResponse.Request.URL.Scheme, e.RawResponse.Request.URL.Host, e.RawResponse.Request.URL.EscapedPath()) } else { fmt.Fprintln(msg, "Request information not available") } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go index 6fc6d1400e..d3e7191f73 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/log/log.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go index a534627605..fcaf6e168f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/async/async.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -128,10 +125,11 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error { } var req *exported.Request var err error - if p.Method == http.MethodPatch || p.Method == http.MethodPut { + switch p.Method { + case http.MethodPatch, http.MethodPut: // for PATCH and PUT, the final GET is on the original resource URL req, err = exported.NewRequest(ctx, http.MethodGet, p.OrigURL) - } else if p.Method == http.MethodPost { + case http.MethodPost: if p.FinalState == pollers.FinalStateViaAzureAsyncOp { // no final GET required } else if p.FinalState == pollers.FinalStateViaOriginalURI { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go index 8751b05147..8eebebf78f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/body/body.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go index 7f8d11b8ba..3284ea7097 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/fake/fake.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go index 048285275d..cbd8e5880b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/loc/loc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go index f496331893..a89aed378b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go index 37ed647f4e..2f15bc1de5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/poller.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go index 6a7a32e034..de54543190 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/util.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -165,7 +162,10 @@ func ResultHelper[T any](resp *http.Response, failed bool, jsonPath string, out return nil } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() + if !poller.StatusCodeValid(resp) || failed { // the LRO failed. unmarshall the error and update state return azexported.NewResponseError(resp) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go index 8aebe5ce53..8ad391dd26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -40,5 +37,5 @@ const ( Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. - Version = "v1.19.1" + Version = "v1.21.1" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go index d3da2c5fdf..e82d4f00c9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go index 2f3901bff3..174bbf99b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go index f260dac363..6880cd9cd3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/log/log.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go index fad2579ed6..01d788ad26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go index 368a2199e0..074d1a600e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy/policy.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go index c9cfa438cb..2c169da79c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go index c0d56158e2..931d6f862f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/errors.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go index c66fc0a90a..743513be4b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -99,6 +96,11 @@ type FetcherForNextLinkOptions struct { // StatusCodes contains additional HTTP status codes indicating success. // The default value is http.StatusOK. StatusCodes []int + + // HTTPVerb specifies the HTTP verb to use when fetching the next page. + // The default value is http.MethodGet. + // This field is only used when NextReq is not specified. + HTTPVerb string } // FetcherForNextLink is a helper containing boilerplate code to simplify creating a PagingHandler[T].Fetcher from a next link URL. @@ -119,7 +121,11 @@ func FetcherForNextLink(ctx context.Context, pl Pipeline, nextLink string, first if options.NextReq != nil { req, err = options.NextReq(ctx, nextLink) } else { - req, err = NewRequest(ctx, http.MethodGet, nextLink) + verb := http.MethodGet + if options.HTTPVerb != "" { + verb = options.HTTPVerb + } + req, err = NewRequest(ctx, verb, nextLink) } } if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go index 6b1f5c083e..3d95fe30dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pipeline.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go index c3646feb55..21c1430be7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_api_version.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go index 99dc029f0c..08ce2e4b08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_body_download.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go index c230af0afa..fa6d643f1e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_header.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -34,6 +31,7 @@ func httpHeaderPolicy(req *policy.Request) (*http.Response, error) { // WithHTTPHeader adds the specified http.Header to the parent context. // Use this to specify custom HTTP headers at the API-call level. // Any overlapping headers will have their values replaced with the values specified here. +// // Deprecated: use [policy.WithHTTPHeader] instead. func WithHTTPHeader(parent context.Context, header http.Header) context.Context { return policy.WithHTTPHeader(parent, header) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go index f375195c4b..7017d5e106 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_http_trace.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -8,10 +5,8 @@ package runtime import ( "context" - "errors" "fmt" "net/http" - "net/url" "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported" @@ -76,14 +71,7 @@ func (h *httpTracePolicy) Do(req *policy.Request) (resp *http.Response, err erro span.SetAttributes(tracing.Attribute{Key: attrAZServiceReqID, Value: reqID}) } } else if err != nil { - var urlErr *url.Error - if errors.As(err, &urlErr) { - // calling *url.Error.Error() will include the unsanitized URL - // which we don't want. in addition, we already have the HTTP verb - // and sanitized URL in the trace so we aren't losing any info - err = urlErr.Err - } - span.SetStatus(tracing.SpanStatusError, err.Error()) + span.SetStatus(tracing.SpanStatusError, getSanitizedURLString(err.Error(), req.Raw().URL, h.allowedQP)) } span.End() }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go index bb00f6c2fd..eaa6c7375c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_include_response.go @@ -1,6 +1,3 @@ -//go:build go1.16 -// +build go1.16 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -29,6 +26,7 @@ func includeResponsePolicy(req *policy.Request) (*http.Response, error) { // WithCaptureResponse applies the HTTP response retrieval annotation to the parent context. // The resp parameter will contain the HTTP response after the request has completed. +// // Deprecated: use [policy.WithCaptureResponse] instead. func WithCaptureResponse(parent context.Context, resp **http.Response) context.Context { return policy.WithCaptureResponse(parent, resp) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go index f048d7fb53..d9e6481de8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_logging.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -161,6 +158,27 @@ func getSanitizedURL(u url.URL, allowedQueryParams map[string]struct{}) string { return u.String() } +// getSanitizedURLString returns s with the query params of u redacted. +// if s doesn't contain u, then s is returned unchanged. +func getSanitizedURLString(s string, u *url.URL, allowedQueryParams map[string]struct{}) string { + if u.RawQuery == "" { + // the URL doesn't have any query params, so nothing to redact + return s + } + + urlIndex := strings.Index(strings.ToLower(s), strings.ToLower(u.String())) + if urlIndex < 0 { + // the URL isn't in the string, so nothing to redact + return s + } + + // replace the unsanitized URL in the error message with the sanitized version + sanitizedURL := getSanitizedURL(*u, allowedQueryParams) + s = s[:urlIndex] + sanitizedURL + s[urlIndex+len(u.String()):] + + return s +} + // writeRequestWithResponse appends a formatted HTTP request into a Buffer. If request and/or err are // not nil, then these are also written into the Buffer. func (p *logPolicy) writeRequestWithResponse(b *bytes.Buffer, req *policy.Request, resp *http.Response, err error) { @@ -174,7 +192,7 @@ func (p *logPolicy) writeRequestWithResponse(b *bytes.Buffer, req *policy.Reques } if err != nil { fmt.Fprintln(b, " --------------------------------------------------------------------------------") - fmt.Fprint(b, " ERROR:\n"+err.Error()+"\n") + fmt.Fprint(b, " ERROR:\n"+getSanitizedURLString(err.Error(), req.Raw().URL, p.allowedQP)+"\n") } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go index 360a7f2118..a8f1cbac3f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_request_id.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go index 4c3a31fea7..696e1d9f49 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -117,7 +114,10 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { // wrap the body so we control when it's actually closed. // do this outside the for loop so defers don't accumulate. rwbody = &retryableRequestBody{body: req.Body()} - defer rwbody.realClose() + defer func() { + // TODO: https://github.com/Azure/azure-sdk-for-go/issues/25649 + _ = rwbody.realClose() + }() } try := int32(1) for { @@ -222,6 +222,7 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { // WithRetryOptions adds the specified RetryOptions to the parent context. // Use this to specify custom RetryOptions at the API-call level. +// // Deprecated: use [policy.WithRetryOptions] instead. func WithRetryOptions(parent context.Context, options policy.RetryOptions) context.Context { return policy.WithRetryOptions(parent, options) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go index 80a9035461..2c60e9d23a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_telemetry.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go index a89ae9b7b9..2e172cdd1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -87,7 +84,10 @@ func NewPoller[T any](resp *http.Response, pl exported.Pipeline, options *NewPol }, nil } - defer resp.Body.Close() + defer func() { + _ = resp.Body.Close() + }() + // this is a back-stop in case the swagger is incorrect (i.e. missing one or more status codes for success). // ideally the codegen should return an error if the initial response failed and not even create a poller. if !poller.StatusCodeValid(resp) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go index 7d34b7803a..20d86496d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -93,12 +90,16 @@ func JoinPaths(root string, paths ...string) string { } if qps != "" { - p = p + "?" + qps + if strings.Contains(p, "?") { + p = p + "&" + qps + } else { + p = p + "?" + qps + } } if strings.HasSuffix(root, "/") && strings.HasPrefix(p, "/") { root = root[:len(root)-1] - } else if !strings.HasSuffix(root, "/") && !strings.HasPrefix(p, "/") { + } else if !strings.HasSuffix(root, "/") && !strings.HasPrefix(p, "/") && !strings.HasPrefix(p, "?") { p = "/" + p } return root + p diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go index 048566e02c..e95f8c8ecf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/response.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -84,8 +81,9 @@ func UnmarshalAsXML(resp *http.Response, v any) error { // Drain reads the response body to completion then closes it. The bytes read are discarded. func Drain(resp *http.Response) { if resp != nil && resp.Body != nil { + // TODO: this might not be necessary when the bodyDownloadPolicy is in play _, _ = io.Copy(io.Discard, resp.Body) - resp.Body.Close() + _ = resp.Body.Close() } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go index 2124c1d48b..928e9bf925 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/transport_default_http_client.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go index cadaef3d58..10d0414861 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go index 2468540bd7..c93824a661 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming/progress.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go index faa98c9dc5..13263fbc94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright 2017 Microsoft Corporation. All rights reserved. // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go index e0e4817b90..e434f77956 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/to.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go index 80282d4ab0..c00c21a3b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/constants.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go index 1ade7c560f..8f32485608 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing/tracing.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md index 217d279fd4..4a6349e167 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.13.1 (2025-11-10) + +### Bugs Fixed + +- `AzureCLICredential` quoted arguments incorrectly on Windows + ## 1.13.0 (2025-10-07) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go index e2ca8bced2..cb7dbe2e4b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util.go @@ -12,7 +12,6 @@ import ( "errors" "os" "os/exec" - "runtime" "strings" "time" ) @@ -30,17 +29,9 @@ var shellExec = func(ctx context.Context, credName, command string) ([]byte, err ctx, cancel = context.WithTimeout(ctx, cliTimeout) defer cancel() } - var cmd *exec.Cmd - if runtime.GOOS == "windows" { - dir := os.Getenv("SYSTEMROOT") - if dir == "" { - return nil, newCredentialUnavailableError(credName, `environment variable "SYSTEMROOT" has no value`) - } - cmd = exec.CommandContext(ctx, "cmd.exe", "/c", command) - cmd.Dir = dir - } else { - cmd = exec.CommandContext(ctx, "/bin/sh", "-c", command) - cmd.Dir = "/bin" + cmd, err := buildCmd(ctx, credName, command) + if err != nil { + return nil, err } cmd.Env = os.Environ() stderr := bytes.Buffer{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_nonwindows.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_nonwindows.go new file mode 100644 index 0000000000..681fcd0cf9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_nonwindows.go @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +//go:build !windows + +package azidentity + +import ( + "context" + "os/exec" +) + +func buildCmd(ctx context.Context, _, command string) (*exec.Cmd, error) { + cmd := exec.CommandContext(ctx, "/bin/sh", "-c", command) + cmd.Dir = "/bin" + return cmd, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_windows.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_windows.go new file mode 100644 index 0000000000..09c7a1a977 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/developer_credential_util_windows.go @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package azidentity + +import ( + "context" + "os" + "os/exec" + "syscall" +) + +func buildCmd(ctx context.Context, credName, command string) (*exec.Cmd, error) { + dir := os.Getenv("SYSTEMROOT") + if dir == "" { + return nil, newCredentialUnavailableError(credName, `environment variable "SYSTEMROOT" has no value`) + } + cmd := exec.CommandContext(ctx, "cmd.exe") + cmd.Dir = dir + cmd.SysProcAttr = &syscall.SysProcAttr{CmdLine: "/c " + command} + return cmd, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go index bb8bddb16e..041f11658d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go @@ -14,5 +14,5 @@ const ( module = "github.com/Azure/azure-sdk-for-go/sdk/" + component // Version is the semantic version (see http://semver.org) of this module. - version = "v1.13.0" + version = "v1.13.1" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/diag.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/diag.go index 245af7d2be..c6ce89e1d4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/diag.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/diag.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -42,7 +39,7 @@ func StackTrace(skipFrames, totalFrames int) string { sb.WriteString("()\n\t") sb.WriteString(frame.File) sb.WriteRune(':') - sb.WriteString(fmt.Sprintf("%d\n", frame.Line)) + fmt.Fprintf(&sb, "%d\n", frame.Line) if !more { break } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/doc.go index 66bf13e5f0..198a7ba75e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/diag/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/doc.go index 8c6eacb618..545f36625a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/errorinfo.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/errorinfo.go index 779657b23b..d6e570f91d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/errorinfo.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo/errorinfo.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/exported/exported.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/exported/exported.go index 9948f604b3..16bb492767 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/exported/exported.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/exported/exported.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -10,6 +7,7 @@ import ( "errors" "io" "net/http" + "slices" ) // HasStatusCode returns true if the Response's status code is one of the specified values. @@ -18,12 +16,7 @@ func HasStatusCode(resp *http.Response, statusCodes ...int) bool { if resp == nil { return false } - for _, sc := range statusCodes { - if resp.StatusCode == sc { - return true - } - } - return false + return slices.Contains(statusCodes, resp.StatusCode) } // PayloadOptions contains the optional values for the Payload func. @@ -57,7 +50,7 @@ func Payload(resp *http.Response, opts *PayloadOptions) ([]byte, error) { } bytesBody, err := io.ReadAll(resp.Body) - resp.Body.Close() + _ = resp.Body.Close() if err != nil { return nil, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/doc.go index d7876d297a..452fbf06ea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go index 76dadf7d35..4bba1cfda6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/log/log.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/poller/util.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/poller/util.go index db8269627d..718b235121 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/poller/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/poller/util.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go index 02aa1fb3bc..153f4cc623 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/temporal/resource.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -93,7 +90,7 @@ func (er *Resource[TResource, TState]) Get(state TState) (TResource, error) { } // Getting here means that this thread/goroutine will wait for the updated resource } else if er.shouldRefresh(resource, state) { - if !(er.acquiring || backoff(now, er.lastAttempt)) { + if !er.acquiring && !backoff(now, er.lastAttempt) { // If another thread/goroutine is not acquiring/renewing the resource, and none has attempted // to do so within the last 30 seconds, this thread/goroutine will do it er.acquiring, acquire = true, true diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/doc.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/doc.go index a3824bee8b..296a1096b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/doc.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/doc.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/uuid.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/uuid.go index 278ac9cd1c..072fa21ca4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/uuid.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/internal/uuid/uuid.go @@ -1,6 +1,3 @@ -//go:build go1.18 -// +build go1.18 - // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/CHANGELOG.md index 5794101aed..78fe312e7e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 1.6.3 (2025-10-16) + +### Other Changes +* Updated service version to `2025-11-05` +* Updated `azidentity` version to `1.13.0` +* Updated `azcore` version to `1.19.1` + ## 1.6.2 (2025-07-23) ### Other Changes diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/internal/exported/version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/internal/exported/version.go index 0f463a46aa..0e86085ed7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/internal/exported/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/internal/exported/version.go @@ -8,5 +8,5 @@ package exported const ( ModuleName = "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" - ModuleVersion = "v1.6.2" + ModuleVersion = "v1.6.3" ) diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential/confidential.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential/confidential.go index 549d68ab99..29c004320d 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential/confidential.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential/confidential.go @@ -596,6 +596,11 @@ func (cca Client) AcquireTokenSilent(ctx context.Context, scopes []string, opts return AuthResult{}, errors.New("call another AcquireToken method to request a new token having these claims") } + // For service principal scenarios, require WithSilentAccount for public API + if o.account.IsZero() { + return AuthResult{}, errors.New("WithSilentAccount option is required") + } + silentParameters := base.AcquireTokenSilentParameters{ Scopes: scopes, Account: o.account, @@ -604,8 +609,15 @@ func (cca Client) AcquireTokenSilent(ctx context.Context, scopes []string, opts IsAppCache: o.account.IsZero(), TenantID: o.tenantID, AuthnScheme: o.authnScheme, + Claims: o.claims, } + return cca.acquireTokenSilentInternal(ctx, silentParameters) +} + +// acquireTokenSilentInternal is the internal implementation shared by AcquireTokenSilent and AcquireTokenByCredential +func (cca Client) acquireTokenSilentInternal(ctx context.Context, silentParameters base.AcquireTokenSilentParameters) (AuthResult, error) { + return cca.base.AcquireTokenSilent(ctx, silentParameters) } @@ -708,8 +720,10 @@ func (cca Client) AcquireTokenByAuthCode(ctx context.Context, code string, redir // acquireTokenByCredentialOptions contains optional configuration for AcquireTokenByCredential type acquireTokenByCredentialOptions struct { - claims, tenantID string - authnScheme AuthenticationScheme + claims, tenantID string + authnScheme AuthenticationScheme + extraBodyParameters map[string]string + cacheKeyComponents map[string]string } // AcquireByCredentialOption is implemented by options for AcquireTokenByCredential @@ -719,7 +733,7 @@ type AcquireByCredentialOption interface { // AcquireTokenByCredential acquires a security token from the authority, using the client credentials grant. // -// Options: [WithClaims], [WithTenantID] +// Options: [WithClaims], [WithTenantID], [WithFMIPath], [WithAttribute] func (cca Client) AcquireTokenByCredential(ctx context.Context, scopes []string, opts ...AcquireByCredentialOption) (AuthResult, error) { o := acquireTokenByCredentialOptions{} err := options.ApplyOptions(&o, opts) @@ -736,6 +750,29 @@ func (cca Client) AcquireTokenByCredential(ctx context.Context, scopes []string, if o.authnScheme != nil { authParams.AuthnScheme = o.authnScheme } + authParams.ExtraBodyParameters = o.extraBodyParameters + authParams.CacheKeyComponents = o.cacheKeyComponents + if o.claims == "" { + silentParameters := base.AcquireTokenSilentParameters{ + Scopes: scopes, + Account: Account{}, // empty account for app token + RequestType: accesstokens.ATConfidential, + Credential: cca.cred, + IsAppCache: true, + TenantID: o.tenantID, + AuthnScheme: o.authnScheme, + Claims: o.claims, + ExtraBodyParameters: o.extraBodyParameters, + CacheKeyComponents: o.cacheKeyComponents, + } + + // Use internal method with empty account (service principal scenario) + cache, err := cca.acquireTokenSilentInternal(ctx, silentParameters) + if err == nil { + return cache, nil + } + } + token, err := cca.base.Token.Credential(ctx, authParams, cca.cred) if err != nil { return AuthResult{}, err @@ -781,3 +818,63 @@ func (cca Client) Account(ctx context.Context, accountID string) (Account, error func (cca Client) RemoveAccount(ctx context.Context, account Account) error { return cca.base.RemoveAccount(ctx, account) } + +// WithFMIPath specifies the path to a federated managed identity. +// The path should point to a valid FMI configuration file that contains the necessary +// identity information for authentication. +func WithFMIPath(path string) interface { + AcquireByCredentialOption + options.CallOption +} { + return struct { + AcquireByCredentialOption + options.CallOption + }{ + CallOption: options.NewCallOption( + func(a any) error { + switch t := a.(type) { + case *acquireTokenByCredentialOptions: + if t.extraBodyParameters == nil { + t.extraBodyParameters = make(map[string]string) + } + if t.cacheKeyComponents == nil { + t.cacheKeyComponents = make(map[string]string) + } + t.cacheKeyComponents["fmi_path"] = path + t.extraBodyParameters["fmi_path"] = path + default: + return fmt.Errorf("unexpected options type %T", a) + } + return nil + }, + ), + } +} + +// WithAttribute specifies an identity attribute to include in the token request. +// The attribute is sent as "attributes" in the request body and returned as "xmc_attr" +// in the access token claims. This is sometimes used withFMIPath +func WithAttribute(attrValue string) interface { + AcquireByCredentialOption + options.CallOption +} { + return struct { + AcquireByCredentialOption + options.CallOption + }{ + CallOption: options.NewCallOption( + func(a any) error { + switch t := a.(type) { + case *acquireTokenByCredentialOptions: + if t.extraBodyParameters == nil { + t.extraBodyParameters = make(map[string]string) + } + t.extraBodyParameters["attributes"] = attrValue + default: + return fmt.Errorf("unexpected options type %T", a) + } + return nil + }, + ), + } +} diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/base.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/base.go index 61c1c4cec1..abf54f7e50 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/base.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/base.go @@ -46,16 +46,18 @@ type accountManager interface { // AcquireTokenSilentParameters contains the parameters to acquire a token silently (from cache). type AcquireTokenSilentParameters struct { - Scopes []string - Account shared.Account - RequestType accesstokens.AppType - Credential *accesstokens.Credential - IsAppCache bool - TenantID string - UserAssertion string - AuthorizationType authority.AuthorizeType - Claims string - AuthnScheme authority.AuthenticationScheme + Scopes []string + Account shared.Account + RequestType accesstokens.AppType + Credential *accesstokens.Credential + IsAppCache bool + TenantID string + UserAssertion string + AuthorizationType authority.AuthorizeType + Claims string + AuthnScheme authority.AuthenticationScheme + ExtraBodyParameters map[string]string + CacheKeyComponents map[string]string } // AcquireTokenAuthCodeParameters contains the parameters required to acquire an access token using the auth code flow. @@ -327,7 +329,12 @@ func (b Client) AcquireTokenSilent(ctx context.Context, silent AcquireTokenSilen if silent.AuthnScheme != nil { authParams.AuthnScheme = silent.AuthnScheme } - + if silent.CacheKeyComponents != nil { + authParams.CacheKeyComponents = silent.CacheKeyComponents + } + if silent.ExtraBodyParameters != nil { + authParams.ExtraBodyParameters = silent.ExtraBodyParameters + } m := b.pmanager if authParams.AuthorizationType != authority.ATOnBehalfOf { authParams.AuthorizationType = authority.ATRefreshToken @@ -367,8 +374,19 @@ func (b Client) AcquireTokenSilent(ctx context.Context, silent AcquireTokenSilen // If the token is not same, we don't need to refresh it. // Which means it refreshed. if str, err := m.Read(ctx, authParams); err == nil && str.AccessToken.Secret == ar.AccessToken { - if tr, er := b.Token.Credential(ctx, authParams, silent.Credential); er == nil { - return b.AuthResultFromToken(ctx, authParams, tr) + switch silent.RequestType { + case accesstokens.ATConfidential: + if tr, er := b.Token.Credential(ctx, authParams, silent.Credential); er == nil { + return b.AuthResultFromToken(ctx, authParams, tr) + } + case accesstokens.ATPublic: + token, err := b.Token.Refresh(ctx, silent.RequestType, authParams, silent.Credential, storageTokenResponse.RefreshToken) + if err != nil { + return ar, err + } + return b.AuthResultFromToken(ctx, authParams, token) + case accesstokens.ATUnknown: + return ar, errors.New("silent request type cannot be ATUnknown") } } } @@ -446,6 +464,9 @@ func (b Client) AcquireTokenOnBehalfOf(ctx context.Context, onBehalfOfParams Acq authParams.Claims = onBehalfOfParams.Claims authParams.Scopes = onBehalfOfParams.Scopes authParams.UserAssertion = onBehalfOfParams.UserAssertion + if authParams.ExtraBodyParameters != nil { + authParams.ExtraBodyParameters = silentParameters.ExtraBodyParameters + } token, err := b.Token.OnBehalfOf(ctx, authParams, onBehalfOfParams.Credential) if err == nil { ar, err = b.AuthResultFromToken(ctx, authParams, token) diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/items.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/items.go index 7379e2233c..b7d1a670b1 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/items.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/items.go @@ -79,6 +79,7 @@ type AccessToken struct { UserAssertionHash string `json:"user_assertion_hash,omitempty"` TokenType string `json:"token_type,omitempty"` AuthnSchemeKeyID string `json:"keyid,omitempty"` + ExtCacheKey string `json:"ext_cache_key,omitempty"` AdditionalFields map[string]interface{} } @@ -105,15 +106,21 @@ func NewAccessToken(homeID, env, realm, clientID string, cachedAt, refreshOn, ex // Key outputs the key that can be used to uniquely look up this entry in a map. func (a AccessToken) Key() string { ks := []string{a.HomeAccountID, a.Environment, a.CredentialType, a.ClientID, a.Realm, a.Scopes} - key := strings.Join( - ks, - shared.CacheKeySeparator, - ) + // add token type to key for new access tokens types. skip for bearer token type to // preserve fwd and back compat between a common cache and msal clients if !strings.EqualFold(a.TokenType, authority.AccessTokenTypeBearer) { - key = strings.Join([]string{key, a.TokenType}, shared.CacheKeySeparator) + ks = append(ks, a.TokenType) } + // add extra body param hash to key if present + if a.ExtCacheKey != "" { + ks[2] = "atext" // if the there is extra cache we add "atext" to the key replacing accesstoken + ks = append(ks, a.ExtCacheKey) + } + key := strings.Join( + ks, + shared.CacheKeySeparator, + ) return strings.ToLower(key) } diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/storage.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/storage.go index 84a234967f..825d8a0f66 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/storage.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base/storage/storage.go @@ -135,7 +135,8 @@ func (m *Manager) Read(ctx context.Context, authParameters authority.AuthParams) aliases = metadata.Aliases } - accessToken := m.readAccessToken(homeAccountID, aliases, realm, clientID, scopes, tokenType, authnSchemeKeyID) + accessToken := m.readAccessToken(homeAccountID, aliases, realm, clientID, scopes, tokenType, authnSchemeKeyID, authParameters.CacheExtKeyGenerator()) + tr.AccessToken = accessToken if homeAccountID == "" { @@ -203,6 +204,7 @@ func (m *Manager) Write(authParameters authority.AuthParams, tokenResponse acces authnSchemeKeyID, ) + accessToken.ExtCacheKey = authParameters.CacheExtKeyGenerator() // Since we have a valid access token, cache it before moving on. if err := accessToken.Validate(); err == nil { if err := m.writeAccessToken(accessToken); err != nil { @@ -291,26 +293,49 @@ func (m *Manager) aadMetadata(ctx context.Context, authorityInfo authority.Info) return m.aadCache[authorityInfo.Host], nil } -func (m *Manager) readAccessToken(homeID string, envAliases []string, realm, clientID string, scopes []string, tokenType, authnSchemeKeyID string) AccessToken { +func (m *Manager) readAccessToken(homeID string, envAliases []string, realm, clientID string, scopes []string, tokenType, authnSchemeKeyID, extCacheKey string) AccessToken { m.contractMu.RLock() - // TODO: linear search (over a map no less) is slow for a large number (thousands) of tokens. - // this shows up as the dominating node in a profile. for real-world scenarios this likely isn't - // an issue, however if it does become a problem then we know where to look. - for k, at := range m.contract.AccessTokens { + + tokensToSearch := m.contract.AccessTokens + + for k, at := range tokensToSearch { + // TODO: linear search (over a map no less) is slow for a large number (thousands) of tokens. + // this shows up as the dominating node in a profile. for real-world scenarios this likely isn't + // an issue, however if it does become a problem then we know where to look. if at.HomeAccountID == homeID && at.Realm == realm && at.ClientID == clientID { - if (strings.EqualFold(at.TokenType, tokenType) && at.AuthnSchemeKeyID == authnSchemeKeyID) || (at.TokenType == "" && (tokenType == "" || tokenType == "Bearer")) { - if checkAlias(at.Environment, envAliases) && isMatchingScopes(scopes, at.Scopes) { - m.contractMu.RUnlock() - if needsUpgrade(k) { - m.contractMu.Lock() - defer m.contractMu.Unlock() - at = upgrade(m.contract.AccessTokens, k) + // Match token type and authentication scheme + tokenTypeMatch := (strings.EqualFold(at.TokenType, tokenType) && at.AuthnSchemeKeyID == authnSchemeKeyID) || + (at.TokenType == "" && (tokenType == "" || tokenType == "Bearer")) + environmentAndScopesMatch := checkAlias(at.Environment, envAliases) && isMatchingScopes(scopes, at.Scopes) + + if tokenTypeMatch && environmentAndScopesMatch { + // For hashed tokens, check that the key contains the hash + if extCacheKey != "" { + if !strings.Contains(k, extCacheKey) { + continue // Skip this token if the key doesn't contain the hash + } + } else { + // If no extCacheKey is provided, only match tokens that also have no extCacheKey + if at.ExtCacheKey != "" { + continue // Skip tokens that require a hash when no hash is provided } + } + // Handle token upgrade if needed + if needsUpgrade(k) { + m.contractMu.RUnlock() + m.contractMu.Lock() + at = upgrade(tokensToSearch, k) + m.contractMu.Unlock() return at } + + m.contractMu.RUnlock() + return at } } } + + // No token found, unlock and return empty token m.contractMu.RUnlock() return AccessToken{} } diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go index d738c7591e..481f9e4341 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go @@ -281,6 +281,9 @@ func (c Client) FromClientSecret(ctx context.Context, authParameters authority.A qv.Set(clientID, authParameters.ClientID) addScopeQueryParam(qv, authParameters) + // Add extra body parameters if provided + addExtraBodyParameters(ctx, qv, authParameters) + return c.doTokenResp(ctx, authParameters, qv) } @@ -296,6 +299,9 @@ func (c Client) FromAssertion(ctx context.Context, authParameters authority.Auth qv.Set(clientInfo, clientInfoVal) addScopeQueryParam(qv, authParameters) + // Add extra body parameters if provided + addExtraBodyParameters(ctx, qv, authParameters) + return c.doTokenResp(ctx, authParameters, qv) } @@ -329,6 +335,8 @@ func (c Client) FromUserAssertionClientCertificate(ctx context.Context, authPara qv.Set("requested_token_use", "on_behalf_of") addScopeQueryParam(qv, authParameters) + // Add extra body parameters if provided + addExtraBodyParameters(ctx, qv, authParameters) return c.doTokenResp(ctx, authParameters, qv) } @@ -466,3 +474,12 @@ func addScopeQueryParam(queryParams url.Values, authParameters authority.AuthPar scopes := AppendDefaultScopes(authParameters) queryParams.Set("scope", strings.Join(scopes, " ")) } + +// addExtraBodyParameters evaluates and adds extra body parameters to the request +func addExtraBodyParameters(ctx context.Context, v url.Values, ap authority.AuthParams) { + for key, value := range ap.ExtraBodyParameters { + if value != "" { + v.Set(key, value) + } + } +} diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go index 3f40374640..debd465dba 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go @@ -15,6 +15,7 @@ import ( "net/url" "os" "path" + "sort" "strings" "time" @@ -47,6 +48,8 @@ type jsonCaller interface { } // For backward compatibility, accept both old and new China endpoints for a transition period. +// This list is derived from the AAD instance discovery metadata and represents all known trusted hosts +// across different Azure clouds (Public, China, Germany, US Government, etc.) var aadTrustedHostList = map[string]bool{ "login.windows.net": true, // Microsoft Azure Worldwide - Used in validation scenarios where host is not this list "login.partner.microsoftonline.cn": true, // Microsoft Azure China (new) @@ -55,6 +58,9 @@ var aadTrustedHostList = map[string]bool{ "login-us.microsoftonline.com": true, // Microsoft Azure US Government - Legacy "login.microsoftonline.us": true, // Microsoft Azure US Government "login.microsoftonline.com": true, // Microsoft Azure Worldwide + "login.microsoft.com": true, + "sts.windows.net": true, + "login.usgovcloudapi.net": true, } // TrustedHost checks if an AAD host is trusted/valid. @@ -103,36 +109,46 @@ func (r *TenantDiscoveryResponse) Validate() error { // ValidateIssuerMatchesAuthority validates that the issuer in the TenantDiscoveryResponse matches the authority. // This is used to identity security or configuration issues in authorities and the OIDC endpoint func (r *TenantDiscoveryResponse) ValidateIssuerMatchesAuthority(authorityURI string, aliases map[string]bool) error { - if authorityURI == "" { return errors.New("TenantDiscoveryResponse: empty authorityURI provided for validation") } + if r.Issuer == "" { + return errors.New("TenantDiscoveryResponse: empty issuer in response") + } - // Parse the issuer URL issuerURL, err := url.Parse(r.Issuer) if err != nil { return fmt.Errorf("TenantDiscoveryResponse: failed to parse issuer URL: %w", err) } + authorityURL, err := url.Parse(authorityURI) + if err != nil { + return fmt.Errorf("TenantDiscoveryResponse: failed to parse authority URL: %w", err) + } + + // Fast path: exact scheme + host match + if issuerURL.Scheme == authorityURL.Scheme && issuerURL.Host == authorityURL.Host { + return nil + } - // Even if it doesn't match the authority, issuers from known and trusted hosts are valid + // Alias-based acceptance if aliases != nil && aliases[issuerURL.Host] { return nil } - // Parse the authority URL for comparison - authorityURL, err := url.Parse(authorityURI) - if err != nil { - return fmt.Errorf("TenantDiscoveryResponse: failed to parse authority URL: %w", err) + issuerHost := issuerURL.Host + authorityHost := authorityURL.Host + + // Accept if issuer host is trusted + if TrustedHost(issuerHost) { + return nil } - // Check if the scheme and host match (paths can be ignored when validating the issuer) - if issuerURL.Scheme == authorityURL.Scheme && issuerURL.Host == authorityURL.Host { + // Accept if authority is a regional variant ending with "." + if strings.HasSuffix(authorityHost, "."+issuerHost) { return nil } - // If we get here, validation failed - return fmt.Errorf("TenantDiscoveryResponse: issuer from OIDC discovery '%s' does not match authority '%s' or a known pattern", - r.Issuer, authorityURI) + return fmt.Errorf("TenantDiscoveryResponse: issuer '%s' does not match authority '%s' or any trusted/alias rule", r.Issuer, authorityURI) } type InstanceDiscoveryMetadata struct { @@ -256,6 +272,12 @@ type AuthParams struct { DomainHint string // AuthnScheme is an optional scheme for formatting access tokens AuthnScheme AuthenticationScheme + // ExtraBodyParameters are additional parameters to include in token requests. + // The functions are evaluated at request time to get the parameter values. + // These parameters are also included in the cache key. + ExtraBodyParameters map[string]string + // CacheKeyComponents are additional components to include in the cache key. + CacheKeyComponents map[string]string } // NewAuthParams creates an authorization parameters object. @@ -642,8 +664,42 @@ func (a *AuthParams) AssertionHash() string { } func (a *AuthParams) AppKey() string { + baseKey := a.ClientID + "_" if a.AuthorityInfo.Tenant != "" { - return fmt.Sprintf("%s_%s_AppTokenCache", a.ClientID, a.AuthorityInfo.Tenant) + baseKey += a.AuthorityInfo.Tenant + } + + // Include extra body parameters in the cache key + paramHash := a.CacheExtKeyGenerator() + if paramHash != "" { + baseKey = fmt.Sprintf("%s_%s", baseKey, paramHash) + } + + return baseKey + "_AppTokenCache" +} + +// CacheExtKeyGenerator computes a hash of the Cache key components key and values +// to include in the cache key. This ensures tokens acquired with different +// parameters are cached separately. +func (a *AuthParams) CacheExtKeyGenerator() string { + if len(a.CacheKeyComponents) == 0 { + return "" + } + + // Sort keys to ensure consistent hashing + keys := make([]string, 0, len(a.CacheKeyComponents)) + for k := range a.CacheKeyComponents { + keys = append(keys, k) } - return fmt.Sprintf("%s__AppTokenCache", a.ClientID) + sort.Strings(keys) + + // Create a string by concatenating key+value pairs + keyStr := "" + for _, key := range keys { + // Append key followed by its value with no separator + keyStr += key + a.CacheKeyComponents[key] + } + + hash := sha256.Sum256([]byte(keyStr)) + return strings.ToLower(base64.RawURLEncoding.EncodeToString(hash[:])) } diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go index 7beed26174..797c086cb8 100644 --- a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go +++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go @@ -368,9 +368,9 @@ type AcquireByUsernamePasswordOption interface { acquireByUsernamePasswordOption() } -// AcquireTokenByUsernamePassword acquires a security token from the authority, via Username/Password Authentication. -// NOTE: this flow is NOT recommended. +// Deprecated: This API will be removed in a future release. Use a more secure flow instead. Follow this migration guide: https://aka.ms/msal-ropc-migration // +// AcquireTokenByUsernamePassword acquires a security token from the authority, via Username/Password Authentication. // Options: [WithClaims], [WithTenantID] func (pca Client) AcquireTokenByUsernamePassword(ctx context.Context, scopes []string, username, password string, opts ...AcquireByUsernamePasswordOption) (AuthResult, error) { o := acquireTokenByUsernamePasswordOptions{} diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go index c69f43dbae..6c4e8143eb 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go @@ -595,10 +595,11 @@ func gaugeToTimeSeries[N int64 | float64](point metricdata.DataPoint[N], metrics return nil, err } return &monitoringpb.TimeSeries{ - Resource: mr, - Unit: string(metrics.Unit), - MetricKind: googlemetricpb.MetricDescriptor_GAUGE, - ValueType: valueType, + Resource: mr, + Unit: metrics.Unit, + Description: metrics.Description, + MetricKind: googlemetricpb.MetricDescriptor_GAUGE, + ValueType: valueType, Points: []*monitoringpb.Point{{ Interval: &monitoringpb.TimeInterval{ EndTime: timestamp, @@ -615,10 +616,11 @@ func sumToTimeSeries[N int64 | float64](point metricdata.DataPoint[N], metrics m } value, valueType := numberDataPointToValue[N](point) return &monitoringpb.TimeSeries{ - Resource: mr, - Unit: string(metrics.Unit), - MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, - ValueType: valueType, + Resource: mr, + Unit: metrics.Unit, + Description: metrics.Description, + MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, + ValueType: valueType, Points: []*monitoringpb.Point{{ Interval: interval, Value: value, @@ -639,10 +641,11 @@ func histogramToTimeSeries[N int64 | float64](point metricdata.HistogramDataPoin setSumOfSquaredDeviation(point, distributionValue) } return &monitoringpb.TimeSeries{ - Resource: mr, - Unit: string(metrics.Unit), - MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, - ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION, + Resource: mr, + Unit: metrics.Unit, + Description: metrics.Description, + MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, + ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION, Points: []*monitoringpb.Point{{ Interval: interval, Value: &monitoringpb.TypedValue{ @@ -662,10 +665,11 @@ func expHistogramToTimeSeries[N int64 | float64](point metricdata.ExponentialHis distributionValue := expHistToDistribution(point, projectID) // TODO: Implement "setSumOfSquaredDeviationExpHist" for parameter "enableSOSD" functionality. return &monitoringpb.TimeSeries{ - Resource: mr, - Unit: string(metrics.Unit), - MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, - ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION, + Resource: mr, + Unit: metrics.Unit, + Description: metrics.Description, + MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE, + ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION, Points: []*monitoringpb.Point{{ Interval: interval, Value: &monitoringpb.TypedValue{ diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go index 8f2927b110..8aeb981c11 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata" monitoring "cloud.google.com/go/monitoring/apiv3/v2" - semconv "go.opentelemetry.io/otel/semconv/v1.24.0" + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" apioption "google.golang.org/api/option" ) diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go index bee9d33328..4f525295ec 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go @@ -17,5 +17,5 @@ package metric // Version is the current release version of the OpenTelemetry // Operations Metric Exporter in use. func Version() string { - return "0.53.0" + return "0.54.0" } diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go index 510391b824..65bd8f5545 100644 --- a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go +++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go @@ -17,7 +17,7 @@ package resourcemapping import ( "strings" - semconv "go.opentelemetry.io/otel/semconv/v1.24.0" + semconv "go.opentelemetry.io/otel/semconv/v1.37.0" monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres" ) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance-networks.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance-networks.go new file mode 100644 index 0000000000..f24834c41f --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance-networks.go @@ -0,0 +1,57 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + pvmclient "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// Instance-scoped networks under a PVM: +type IBMPIInstanceNetworksClient struct { + IBMPIClient +} + +func NewIBMPIInstanceNetworksClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPIInstanceNetworksClient { + return &IBMPIInstanceNetworksClient{*NewIBMPIClient(ctx, sess, cloudInstanceID)} +} + +// GetAll returns the wrapper that contains all networks on a PVM instance. +func (c *IBMPIInstanceNetworksClient) GetAll(pvmInstanceID string) (*models.PVMInstanceNetworks, error) { + params := pvmclient.NewPcloudPvminstancesNetworksGetallParams(). + WithContext(c.ctx). + WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(c.cloudInstanceID). + WithPvmInstanceID(pvmInstanceID) + + resp, err := c.session.Power.PCloudpVMInstances.PcloudPvminstancesNetworksGetall(params, c.session.AuthInfo(c.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get networks for pvm instance %s: %w", pvmInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get networks for pvm instance %s", pvmInstanceID) + } + return resp.Payload, nil +} + +// Get returns the wrapper for a specific network on a PVM instance. +func (c *IBMPIInstanceNetworksClient) Get(pvmInstanceID, networkID string) (*models.PVMInstanceNetworks, error) { + params := pvmclient.NewPcloudPvminstancesNetworksGetParams(). + WithContext(c.ctx). + WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(c.cloudInstanceID). + WithPvmInstanceID(pvmInstanceID). + WithNetworkID(networkID) + + resp, err := c.session.Power.PCloudpVMInstances.PcloudPvminstancesNetworksGet(params, c.session.AuthInfo(c.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get network %s for pvm instance %s: %w", networkID, pvmInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get network %s for pvm instance %s", networkID, pvmInstanceID) + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network-peers.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network-peers.go index a5593289e9..71fdc3670d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network-peers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network-peers.go @@ -27,14 +27,138 @@ func (f *IBMPINetworkPeerClient) GetNetworkPeers() (*models.NetworkPeers, error) if !f.session.IsOnPrem() { return nil, fmt.Errorf(helpers.NotOffPremSupported) } - params := network_peers.NewV1NetworkPeersListParams().WithContext(f.ctx). + params := network_peers.NewV1NetworkPeersGetallParams().WithContext(f.ctx). WithTimeout(helpers.PIGetTimeOut) - resp, err := f.session.Power.NetworkPeers.V1NetworkPeersList(params, f.session.AuthInfo(f.cloudInstanceID)) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get Network Peers for cloud instance %s with error %w", f.cloudInstanceID, err)) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get network peers for cloud instance %s with error %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { - return nil, fmt.Errorf("failed to Get Network Peers for cloud instance %s", f.cloudInstanceID) + return nil, fmt.Errorf("failed to Get network peers for cloud instance %s", f.cloudInstanceID) + } + return resp.Payload, nil +} + +// Delete a network peer +func (f *IBMPINetworkPeerClient) DeleteNetworkPeer(id string) error { + if !f.session.IsOnPrem() { + return fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersIDDeleteParams().WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut).WithNetworkPeerID(id) + _, err := f.session.Power.NetworkPeers.V1NetworkPeersIDDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Delete network peer %s for cloud instance %s with error %w", id, f.cloudInstanceID, err)) + } + return nil + +} + +// Get a network peer +func (f *IBMPINetworkPeerClient) GetNetworkPeer(id string) (*models.NetworkPeer, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersIDGetParams().WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut).WithNetworkPeerID(id) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersIDGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get network peer %s for cloud instance %s with error %w", id, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get network peer %s for cloud instance %s", id, f.cloudInstanceID) + } + return resp.Payload, nil + +} + +// Update a network peer +func (f *IBMPINetworkPeerClient) UpdateNetworkPeer(id string, body *models.NetworkPeerUpdate) (*models.NetworkPeer, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersIDPutParams().WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut).WithNetworkPeerID(id).WithBody(body) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersIDPut(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Update network peer %s for cloud instance %s with error %w", id, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Update network peer %s", id) + } + return resp.Payload, nil +} + +// Get all network peers interfaces +func (f *IBMPINetworkPeerClient) GetAllNetworkPeersInterfaces() (models.PeerInterfaces, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersInterfacesGetallParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersInterfacesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get network peers interfaces for cloud instance %s with error %w", f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get network peers interfaces for cloud instance %s", f.cloudInstanceID) + } + return resp.Payload, nil +} + +// Create a network peer +func (f *IBMPINetworkPeerClient) CreateNetworkPeer(body *models.NetworkPeerCreate) (*models.NetworkPeer, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersPostParams().WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).WithBody(body) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Create network peer for cloud instance %s with error %w", f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Create network peer for cloud instance %s", f.cloudInstanceID) + } + return resp.Payload, nil +} + +// Delete network peer's route filter +func (f *IBMPINetworkPeerClient) DeleteNetworkPeersRouteFilter(id, routeFilterID string) error { + if !f.session.IsOnPrem() { + return fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersRouteFilterIDDeleteParams().WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut).WithNetworkPeerID(id).WithRouteFilterID(routeFilterID) + _, err := f.session.Power.NetworkPeers.V1NetworkPeersRouteFilterIDDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Delete network peer's %s route filter %s for cloud instance %s with error %w", id, routeFilterID, f.cloudInstanceID, err)) + } + return nil +} + +// Get network peer's route filter +func (f *IBMPINetworkPeerClient) GetNetworkPeersRouteFilter(id, routeFilterID string) (*models.RouteFilter, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersRouteFilterIDGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithNetworkPeerID(id).WithRouteFilterID(routeFilterID) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersRouteFilterIDGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get network peer's %s route filter %s for cloud instance %s with error %w", id, routeFilterID, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get network peer's %s route filter %s for cloud instance %s", id, routeFilterID, f.cloudInstanceID) + } + return resp.Payload, nil +} + +// Create network peer's route filter +func (f *IBMPINetworkPeerClient) CreateNetworkPeersRouteFilters(id string, body *models.RouteFilterCreate) (*models.RouteFilter, error) { + if !f.session.IsOnPrem() { + return nil, fmt.Errorf(helpers.NotOffPremSupported) + } + params := network_peers.NewV1NetworkPeersRouteFiltersPostParams().WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).WithNetworkPeerID(id).WithBody(body) + resp, err := f.session.Power.NetworkPeers.V1NetworkPeersRouteFiltersPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Create network peer's %s route filter for cloud instance %s with error %w", id, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Create network peer's %s route filter for cloud instance %s", id, f.cloudInstanceID) } return resp.Payload, nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpmem.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpmem.go new file mode 100644 index 0000000000..01d4c8c0bc --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpmem.go @@ -0,0 +1,77 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPIVPMEMClient +type IBMPIVPMEMClient struct { + IBMPIClient +} + +// NewIBMPIVPMEMClient +func NewIBMPIVPMEMClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPIVPMEMClient { + return &IBMPIVPMEMClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} + +// PvmInstance create VPMEM volumes +func (f *IBMPIVPMEMClient) CreatePvmVpmemVolumes(pvminstanceID string, body *models.VPMemVolumeAttach) (*models.VPMemVolumes, error) { + params := p_cloud_v_p_mem_volumes.NewPcloudPvminstancesVpmemVolumesPostParams().WithContext(f.ctx). + WithTimeout(helpers.PICreateTimeOut).WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(pvminstanceID). + WithBody(body) + resp, err := f.session.Power.PCloudvpMemVolumes.PcloudPvminstancesVpmemVolumesPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to create a VPMEM volumes for pvminstance %s in %s with %w", pvminstanceID, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to create a VPMEM volumes for pvminstance %s in %s", pvminstanceID, f.cloudInstanceID) + } + return resp.Payload, nil +} + +// PvmInstance get VPMEM volume +func (f *IBMPIVPMEMClient) GetPvmVpmemVolume(pvminstanceID, vpmemVolumeID string) (*models.VPMemVolumeReference, error) { + params := p_cloud_v_p_mem_volumes.NewPcloudPvminstancesVpmemVolumesGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(pvminstanceID).WithVpmemVolumeID(vpmemVolumeID) + resp, err := f.session.Power.PCloudvpMemVolumes.PcloudPvminstancesVpmemVolumesGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get VPMEM volume %s for pvminstance %s in %s with %w", vpmemVolumeID, pvminstanceID, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get VPMEM volume %s for pvminstance %s in %s", vpmemVolumeID, pvminstanceID, f.cloudInstanceID) + } + return resp.Payload, nil +} + +// PvmInstance delete VPMEM volume +func (f *IBMPIVPMEMClient) DeletePvmVpmemVolume(pvminstanceID, vpmemVolumeID string) error { + params := p_cloud_v_p_mem_volumes.NewPcloudPvminstancesVpmemVolumesDeleteParams().WithContext(f.ctx). + WithTimeout(helpers.PIDeleteTimeOut).WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(pvminstanceID).WithVpmemVolumeID(vpmemVolumeID) + _, err := f.session.Power.PCloudvpMemVolumes.PcloudPvminstancesVpmemVolumesDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return fmt.Errorf("failed to delete VPMEM volume %s for pvminstance %s in %s :%w", vpmemVolumeID, pvminstanceID, f.cloudInstanceID, err) + } + return nil +} + +// PvmInstance get all VPMEM volumes +func (f *IBMPIVPMEMClient) GetAllPvmVpmemVolumes(pvminstanceID string) (*models.VPMemVolumes, error) { + params := p_cloud_v_p_mem_volumes.NewPcloudPvminstancesVpmemVolumesGetallParams().WithContext(f.ctx). + WithTimeout(helpers.PIGetTimeOut).WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(pvminstanceID) + resp, err := f.session.Power.PCloudvpMemVolumes.PcloudPvminstancesVpmemVolumesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get VPMEM volumes for pvminstance %s in %s with %w", pvminstanceID, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to get VPMEM volumes for pvminstance %s in %s", pvminstanceID, f.cloudInstanceID) + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go index 137911c23b..7563fe44f7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go @@ -45,7 +45,7 @@ func (f *IBMPIWorkspacesClient) Get(cloudInstanceID string) (*models.Workspace, return nil, fmt.Errorf(helpers.NotOnPremSupported) } params := workspaces.NewV1WorkspacesGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithWorkspaceID(cloudInstanceID) - resp, err := f.session.Power.Workspaces.V1WorkspacesGet(params, f.session.AuthInfo(f.cloudInstanceID)) + resp, err := f.session.Power.Workspaces.V1WorkspacesGet(params, f.session.AuthInfoV2()) if err != nil { return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetWorkspaceOperationFailed, f.cloudInstanceID, err)) } @@ -61,7 +61,7 @@ func (f *IBMPIWorkspacesClient) GetAll() (*models.Workspaces, error) { return nil, fmt.Errorf(helpers.NotOnPremSupported) } params := workspaces.NewV1WorkspacesGetallParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) - resp, err := f.session.Power.Workspaces.V1WorkspacesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + resp, err := f.session.Power.Workspaces.V1WorkspacesGetall(params, f.session.AuthInfoV2()) if err != nil { return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Workspaces: %w", err)) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go index 5389d38bf4..8e1f300425 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go @@ -125,6 +125,17 @@ func (s *IBMPISession) AuthInfo(cloudInstanceID string) runtime.ClientAuthInfoWr }) } +// AuthInfoV2 only set Authorization since some apis do not require CRN in the header +func (s *IBMPISession) AuthInfoV2() runtime.ClientAuthInfoWriter { + return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { + auth, err := fetchAuthorizationData(s.Options.Authenticator) + if err != nil { + return err + } + return r.SetHeaderParam("Authorization", auth) + }) +} + // IsOnPrem returns true if the operation is being done on premise (at a satellite region) func (s *IBMPISession) IsOnPrem() bool { return strings.Contains(s.Options.Zone, helpers.PIStratosRegionPrefix) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go index 175237cbc1..0884ce2a8b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go @@ -83,7 +83,7 @@ type ClientService interface { ServiceBrokerAuthCallback returns an access token and set cookie */ func (a *Client) ServiceBrokerAuthCallback(params *ServiceBrokerAuthCallbackParams, opts ...ClientOption) (*ServiceBrokerAuthCallbackOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthCallbackParams() } @@ -102,17 +102,22 @@ func (a *Client) ServiceBrokerAuthCallback(params *ServiceBrokerAuthCallbackPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthCallbackOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.callback: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -121,7 +126,7 @@ func (a *Client) ServiceBrokerAuthCallback(params *ServiceBrokerAuthCallbackPara ServiceBrokerAuthDeviceCodePost requests a authorization device code */ func (a *Client) ServiceBrokerAuthDeviceCodePost(params *ServiceBrokerAuthDeviceCodePostParams, opts ...ClientOption) (*ServiceBrokerAuthDeviceCodePostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthDeviceCodePostParams() } @@ -140,17 +145,22 @@ func (a *Client) ServiceBrokerAuthDeviceCodePost(params *ServiceBrokerAuthDevice for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthDeviceCodePostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.device.code.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -159,7 +169,7 @@ func (a *Client) ServiceBrokerAuthDeviceCodePost(params *ServiceBrokerAuthDevice ServiceBrokerAuthDeviceTokenPost polls for authorization device token */ func (a *Client) ServiceBrokerAuthDeviceTokenPost(params *ServiceBrokerAuthDeviceTokenPostParams, opts ...ClientOption) (*ServiceBrokerAuthDeviceTokenPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthDeviceTokenPostParams() } @@ -178,17 +188,22 @@ func (a *Client) ServiceBrokerAuthDeviceTokenPost(params *ServiceBrokerAuthDevic for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthDeviceTokenPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.device.token.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -197,7 +212,7 @@ func (a *Client) ServiceBrokerAuthDeviceTokenPost(params *ServiceBrokerAuthDevic ServiceBrokerAuthInfoToken information about current access token */ func (a *Client) ServiceBrokerAuthInfoToken(params *ServiceBrokerAuthInfoTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthInfoTokenOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthInfoTokenParams() } @@ -217,17 +232,22 @@ func (a *Client) ServiceBrokerAuthInfoToken(params *ServiceBrokerAuthInfoTokenPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthInfoTokenOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.info.token: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -236,7 +256,7 @@ func (a *Client) ServiceBrokerAuthInfoToken(params *ServiceBrokerAuthInfoTokenPa ServiceBrokerAuthInfoUser information about current user */ func (a *Client) ServiceBrokerAuthInfoUser(params *ServiceBrokerAuthInfoUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthInfoUserOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthInfoUserParams() } @@ -256,17 +276,22 @@ func (a *Client) ServiceBrokerAuthInfoUser(params *ServiceBrokerAuthInfoUserPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthInfoUserOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.info.user: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -275,7 +300,7 @@ func (a *Client) ServiceBrokerAuthInfoUser(params *ServiceBrokerAuthInfoUserPara ServiceBrokerAuthLogin logins */ func (a *Client) ServiceBrokerAuthLogin(params *ServiceBrokerAuthLoginParams, opts ...ClientOption) (*ServiceBrokerAuthLoginOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthLoginParams() } @@ -294,17 +319,22 @@ func (a *Client) ServiceBrokerAuthLogin(params *ServiceBrokerAuthLoginParams, op for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthLoginOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.login: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -313,7 +343,7 @@ func (a *Client) ServiceBrokerAuthLogin(params *ServiceBrokerAuthLoginParams, op ServiceBrokerAuthLogout logouts */ func (a *Client) ServiceBrokerAuthLogout(params *ServiceBrokerAuthLogoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthLogoutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthLogoutParams() } @@ -333,17 +363,22 @@ func (a *Client) ServiceBrokerAuthLogout(params *ServiceBrokerAuthLogoutParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthLogoutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.logout: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -352,7 +387,7 @@ func (a *Client) ServiceBrokerAuthLogout(params *ServiceBrokerAuthLogoutParams, ServiceBrokerAuthRegistration registrations of a new tenant and login */ func (a *Client) ServiceBrokerAuthRegistration(params *ServiceBrokerAuthRegistrationParams, opts ...ClientOption) (*ServiceBrokerAuthRegistrationOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthRegistrationParams() } @@ -371,17 +406,22 @@ func (a *Client) ServiceBrokerAuthRegistration(params *ServiceBrokerAuthRegistra for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthRegistrationOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.registration: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -390,7 +430,7 @@ func (a *Client) ServiceBrokerAuthRegistration(params *ServiceBrokerAuthRegistra ServiceBrokerAuthRegistrationCallback associates the user with a tenant and returns an access token */ func (a *Client) ServiceBrokerAuthRegistrationCallback(params *ServiceBrokerAuthRegistrationCallbackParams, opts ...ClientOption) (*ServiceBrokerAuthRegistrationCallbackOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthRegistrationCallbackParams() } @@ -409,17 +449,22 @@ func (a *Client) ServiceBrokerAuthRegistrationCallback(params *ServiceBrokerAuth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthRegistrationCallbackOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.registration.callback: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -428,7 +473,7 @@ func (a *Client) ServiceBrokerAuthRegistrationCallback(params *ServiceBrokerAuth ServiceBrokerAuthTokenPost requests a new token from a refresh token */ func (a *Client) ServiceBrokerAuthTokenPost(params *ServiceBrokerAuthTokenPostParams, opts ...ClientOption) (*ServiceBrokerAuthTokenPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerAuthTokenPostParams() } @@ -447,17 +492,22 @@ func (a *Client) ServiceBrokerAuthTokenPost(params *ServiceBrokerAuthTokenPostPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerAuthTokenPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.auth.token.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go index cb6002eebd..1d46121a8e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthCallbackReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthCallbackOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthCallbackOK) readResponse(response runtime.ClientRespon o.Payload = new(models.AccessToken) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthCallbackBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthCallbackUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthCallbackForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthCallbackNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthCallbackInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go index 273f5fcd3d..fd8b25086f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthDeviceCodePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthDeviceCodePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthDeviceCodePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthDeviceCodePostOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthDeviceCodePostOK) readResponse(response runtime.Client o.Payload = new(models.DeviceCode) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthDeviceCodePostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthDeviceCodePostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthDeviceCodePostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go index 511eb84beb..89c7e5da47 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go @@ -8,6 +8,7 @@ package authentication import ( "context" "encoding/json" + stderrors "errors" "fmt" "io" @@ -24,7 +25,7 @@ type ServiceBrokerAuthDeviceTokenPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthDeviceTokenPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthDeviceTokenPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthDeviceTokenPostOK() @@ -136,7 +137,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostOK) readResponse(response runtime.Clien o.Payload = new(models.Token) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -206,7 +207,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -276,7 +277,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -346,7 +347,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -416,7 +417,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -486,7 +487,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -556,7 +557,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go index c9ad50f443..9ea15536a7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthInfoTokenReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthInfoTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthInfoTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthInfoTokenOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthInfoTokenOK) readResponse(response runtime.ClientRespo o.Payload = new(models.TokenExtra) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthInfoTokenBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthInfoTokenUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthInfoTokenForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthInfoTokenNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthInfoTokenInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go index 672d5a3987..c5a39d26d3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthInfoUserReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthInfoUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthInfoUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthInfoUserOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthInfoUserOK) readResponse(response runtime.ClientRespon o.Payload = new(models.UserInfo) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthInfoUserBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthInfoUserUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthInfoUserForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthInfoUserNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthInfoUserInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go index 1836f4f969..48f0ba14c8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthLoginReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthLoginReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthLoginReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthLoginOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthLoginOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.AccessToken) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthLoginBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthLoginUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthLoginForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthLoginNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthLoginInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go index fabf4561f8..46e41a57eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthLogoutReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthLogoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthLogoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthLogoutOK() @@ -126,7 +127,7 @@ func (o *ServiceBrokerAuthLogoutOK) GetPayload() models.Object { func (o *ServiceBrokerAuthLogoutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *ServiceBrokerAuthLogoutBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *ServiceBrokerAuthLogoutUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *ServiceBrokerAuthLogoutForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *ServiceBrokerAuthLogoutNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *ServiceBrokerAuthLogoutInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go index 85f5534886..01fa8bc41e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthRegistrationCallbackReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthRegistrationCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthRegistrationCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthRegistrationCallbackOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackOK) readResponse(response runtime. o.Payload = new(models.AccessToken) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go index 3df3f3f525..4be96dcc87 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthRegistrationReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthRegistrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthRegistrationOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerAuthRegistrationOK) readResponse(response runtime.ClientRe o.Payload = new(models.AccessToken) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerAuthRegistrationBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerAuthRegistrationUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerAuthRegistrationForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerAuthRegistrationNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerAuthRegistrationInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go index cc218ffb52..e17701fc72 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go @@ -7,6 +7,7 @@ package authentication import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerAuthTokenPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerAuthTokenPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerAuthTokenPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerAuthTokenPostOK() @@ -134,7 +135,7 @@ func (o *ServiceBrokerAuthTokenPostOK) readResponse(response runtime.ClientRespo o.Payload = new(models.Token) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *ServiceBrokerAuthTokenPostBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *ServiceBrokerAuthTokenPostUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *ServiceBrokerAuthTokenPostForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *ServiceBrokerAuthTokenPostNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *ServiceBrokerAuthTokenPostTooManyRequests) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *ServiceBrokerAuthTokenPostInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go index b77f3a34c5..923208056a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go @@ -7,6 +7,7 @@ package bluemix_service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type BluemixServiceInstanceGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *BluemixServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *BluemixServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewBluemixServiceInstanceGetOK() @@ -122,7 +123,7 @@ func (o *BluemixServiceInstanceGetOK) readResponse(response runtime.ClientRespon o.Payload = new(models.ServiceInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *BluemixServiceInstanceGetBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *BluemixServiceInstanceGetUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *BluemixServiceInstanceGetForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *BluemixServiceInstanceGetNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go index e930240a29..eadb971817 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go @@ -7,6 +7,7 @@ package bluemix_service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type BluemixServiceInstancePutReader struct { } // ReadResponse reads a server response into the received o. -func (o *BluemixServiceInstancePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *BluemixServiceInstancePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewBluemixServiceInstancePutOK() @@ -122,7 +123,7 @@ func (o *BluemixServiceInstancePutOK) readResponse(response runtime.ClientRespon o.Payload = new(models.ServiceInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *BluemixServiceInstancePutBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *BluemixServiceInstancePutUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *BluemixServiceInstancePutForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *BluemixServiceInstancePutNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go index e6ac7174e9..2a7f251671 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go @@ -67,7 +67,7 @@ type ClientService interface { BluemixServiceInstanceGet gets the current state information associated with the service instance */ func (a *Client) BluemixServiceInstanceGet(params *BluemixServiceInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BluemixServiceInstanceGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewBluemixServiceInstanceGetParams() } @@ -87,17 +87,22 @@ func (a *Client) BluemixServiceInstanceGet(params *BluemixServiceInstanceGetPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*BluemixServiceInstanceGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for bluemix.serviceInstance.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) BluemixServiceInstanceGet(params *BluemixServiceInstanceGetPara BluemixServiceInstancePut updates disable or enable the state of a provisioned service instance */ func (a *Client) BluemixServiceInstancePut(params *BluemixServiceInstancePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BluemixServiceInstancePutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewBluemixServiceInstancePutParams() } @@ -126,17 +131,22 @@ func (a *Client) BluemixServiceInstancePut(params *BluemixServiceInstancePutPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*BluemixServiceInstancePutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for bluemix.serviceInstance.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go index dc74d0ae87..1b8ac58d12 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go @@ -65,7 +65,7 @@ type ClientService interface { CatalogGet gets the catalog of services that the service broker offers */ func (a *Client) CatalogGet(params *CatalogGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CatalogGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewCatalogGetParams() } @@ -85,17 +85,22 @@ func (a *Client) CatalogGet(params *CatalogGetParams, authInfo runtime.ClientAut for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*CatalogGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for catalog.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go index cb56dfa5f2..db925bd701 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go @@ -7,6 +7,7 @@ package catalog import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type CatalogGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *CatalogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *CatalogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewCatalogGetOK() @@ -122,7 +123,7 @@ func (o *CatalogGetOK) readResponse(response runtime.ClientResponse, consumer ru o.Payload = new(models.Catalog) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *CatalogGetBadRequest) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *CatalogGetUnauthorized) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *CatalogGetForbidden) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *CatalogGetNotFound) readResponse(response runtime.ClientResponse, consu o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go index 9ccf8b60c8..13c8bb37b1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go @@ -71,7 +71,7 @@ type ClientService interface { V1DatacentersGet gets a datacenter s information and capabilities */ func (a *Client) V1DatacentersGet(params *V1DatacentersGetParams, opts ...ClientOption) (*V1DatacentersGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1DatacentersGetParams() } @@ -90,17 +90,22 @@ func (a *Client) V1DatacentersGet(params *V1DatacentersGetParams, opts ...Client for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1DatacentersGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.datacenters.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -109,7 +114,7 @@ func (a *Client) V1DatacentersGet(params *V1DatacentersGetParams, opts ...Client V1DatacentersGetall gets all datacenters information and capabilities */ func (a *Client) V1DatacentersGetall(params *V1DatacentersGetallParams, opts ...ClientOption) (*V1DatacentersGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1DatacentersGetallParams() } @@ -128,17 +133,22 @@ func (a *Client) V1DatacentersGetall(params *V1DatacentersGetallParams, opts ... for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1DatacentersGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.datacenters.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +157,7 @@ func (a *Client) V1DatacentersGetall(params *V1DatacentersGetallParams, opts ... V1DatacentersPrivateGet gets a private datacenter s information and capabilities */ func (a *Client) V1DatacentersPrivateGet(params *V1DatacentersPrivateGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1DatacentersPrivateGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1DatacentersPrivateGetParams() } @@ -167,17 +177,22 @@ func (a *Client) V1DatacentersPrivateGet(params *V1DatacentersPrivateGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1DatacentersPrivateGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.datacentersPrivate.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -186,7 +201,7 @@ func (a *Client) V1DatacentersPrivateGet(params *V1DatacentersPrivateGetParams, V1DatacentersPrivateGetall gets private datacenter information and capabilities */ func (a *Client) V1DatacentersPrivateGetall(params *V1DatacentersPrivateGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1DatacentersPrivateGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1DatacentersPrivateGetallParams() } @@ -206,17 +221,22 @@ func (a *Client) V1DatacentersPrivateGetall(params *V1DatacentersPrivateGetallPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1DatacentersPrivateGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.datacentersPrivate.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go index 8ddd956d5c..6892839690 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go @@ -7,6 +7,7 @@ package datacenters import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1DatacentersGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1DatacentersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1DatacentersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1DatacentersGetOK() @@ -122,7 +123,7 @@ func (o *V1DatacentersGetOK) readResponse(response runtime.ClientResponse, consu o.Payload = new(models.Datacenter) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *V1DatacentersGetBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *V1DatacentersGetUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *V1DatacentersGetForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *V1DatacentersGetInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go index a088af4d26..142ee9f3c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go @@ -7,6 +7,7 @@ package datacenters import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1DatacentersGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1DatacentersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1DatacentersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1DatacentersGetallOK() @@ -122,7 +123,7 @@ func (o *V1DatacentersGetallOK) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Datacenters) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *V1DatacentersGetallBadRequest) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *V1DatacentersGetallUnauthorized) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *V1DatacentersGetallForbidden) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *V1DatacentersGetallInternalServerError) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_get_responses.go index f23ed3a16e..9fcf2745e2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_get_responses.go @@ -7,6 +7,7 @@ package datacenters import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1DatacentersPrivateGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1DatacentersPrivateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1DatacentersPrivateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1DatacentersPrivateGetOK() @@ -122,7 +123,7 @@ func (o *V1DatacentersPrivateGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.Datacenter) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *V1DatacentersPrivateGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *V1DatacentersPrivateGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *V1DatacentersPrivateGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *V1DatacentersPrivateGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_getall_responses.go index f4ba186aa0..7c1b77e0bd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_private_getall_responses.go @@ -7,6 +7,7 @@ package datacenters import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1DatacentersPrivateGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1DatacentersPrivateGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1DatacentersPrivateGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1DatacentersPrivateGetallOK() @@ -122,7 +123,7 @@ func (o *V1DatacentersPrivateGetallOK) readResponse(response runtime.ClientRespo o.Payload = new(models.Datacenters) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *V1DatacentersPrivateGetallBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *V1DatacentersPrivateGetallUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *V1DatacentersPrivateGetallForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *V1DatacentersPrivateGetallInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go index 893c2aa477..ad8aaf87e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go @@ -65,7 +65,7 @@ type ClientService interface { ServiceBrokerHardwareplatformsGet availables hardware statistics and limits */ func (a *Client) ServiceBrokerHardwareplatformsGet(params *ServiceBrokerHardwareplatformsGetParams, opts ...ClientOption) (*ServiceBrokerHardwareplatformsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerHardwareplatformsGetParams() } @@ -84,17 +84,22 @@ func (a *Client) ServiceBrokerHardwareplatformsGet(params *ServiceBrokerHardware for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerHardwareplatformsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.hardwareplatforms.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go index a269f65f04..9fb60984e3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go @@ -7,6 +7,7 @@ package hardware_platforms import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerHardwareplatformsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerHardwareplatformsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerHardwareplatformsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerHardwareplatformsGetOK() @@ -126,7 +127,7 @@ func (o *ServiceBrokerHardwareplatformsGetOK) GetPayload() models.HardwarePlatfo func (o *ServiceBrokerHardwareplatformsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *ServiceBrokerHardwareplatformsGetBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *ServiceBrokerHardwareplatformsGetUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *ServiceBrokerHardwareplatformsGetForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *ServiceBrokerHardwareplatformsGetNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *ServiceBrokerHardwareplatformsGetInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/host_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/host_groups_client.go index e7fd62b255..6ee71ff1ea 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/host_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/host_groups_client.go @@ -83,7 +83,7 @@ type ClientService interface { V1AvailableHosts lists all the hosts that can be reserved */ func (a *Client) V1AvailableHosts(params *V1AvailableHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1AvailableHostsOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1AvailableHostsParams() } @@ -103,17 +103,22 @@ func (a *Client) V1AvailableHosts(params *V1AvailableHostsParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1AvailableHostsOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.availableHosts: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -122,7 +127,7 @@ func (a *Client) V1AvailableHosts(params *V1AvailableHostsParams, authInfo runti V1HostGroupsGet gets the list of host groups for the workspace */ func (a *Client) V1HostGroupsGet(params *V1HostGroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostGroupsGetParams() } @@ -142,17 +147,22 @@ func (a *Client) V1HostGroupsGet(params *V1HostGroupsGetParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostGroupsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hostGroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -161,7 +171,7 @@ func (a *Client) V1HostGroupsGet(params *V1HostGroupsGetParams, authInfo runtime V1HostGroupsIDGet gets the details of a host group */ func (a *Client) V1HostGroupsIDGet(params *V1HostGroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostGroupsIDGetParams() } @@ -181,17 +191,22 @@ func (a *Client) V1HostGroupsIDGet(params *V1HostGroupsIDGetParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostGroupsIDGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hostGroups.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -200,7 +215,7 @@ func (a *Client) V1HostGroupsIDGet(params *V1HostGroupsIDGetParams, authInfo run V1HostGroupsIDPut shares unshare a host group with another workspace */ func (a *Client) V1HostGroupsIDPut(params *V1HostGroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsIDPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostGroupsIDPutParams() } @@ -220,17 +235,22 @@ func (a *Client) V1HostGroupsIDPut(params *V1HostGroupsIDPutParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostGroupsIDPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hostGroups.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -239,7 +259,7 @@ func (a *Client) V1HostGroupsIDPut(params *V1HostGroupsIDPutParams, authInfo run V1HostGroupsPost creates a host group with one or more host */ func (a *Client) V1HostGroupsPost(params *V1HostGroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostGroupsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostGroupsPostParams() } @@ -259,17 +279,22 @@ func (a *Client) V1HostGroupsPost(params *V1HostGroupsPostParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostGroupsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hostGroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -278,7 +303,7 @@ func (a *Client) V1HostGroupsPost(params *V1HostGroupsPostParams, authInfo runti V1HostsGet gets the list of all the hosts the workspace has access to */ func (a *Client) V1HostsGet(params *V1HostsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostsGetParams() } @@ -298,17 +323,22 @@ func (a *Client) V1HostsGet(params *V1HostsGetParams, authInfo runtime.ClientAut for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hosts.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -317,7 +347,7 @@ func (a *Client) V1HostsGet(params *V1HostsGetParams, authInfo runtime.ClientAut V1HostsIDDelete releases a host from its host group */ func (a *Client) V1HostsIDDelete(params *V1HostsIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsIDDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostsIDDeleteParams() } @@ -337,17 +367,22 @@ func (a *Client) V1HostsIDDelete(params *V1HostsIDDeleteParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostsIDDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hosts.id.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -356,7 +391,7 @@ func (a *Client) V1HostsIDDelete(params *V1HostsIDDeleteParams, authInfo runtime V1HostsIDGet gets the details about a host */ func (a *Client) V1HostsIDGet(params *V1HostsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsIDGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostsIDGetParams() } @@ -376,17 +411,22 @@ func (a *Client) V1HostsIDGet(params *V1HostsIDGetParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostsIDGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hosts.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -395,7 +435,7 @@ func (a *Client) V1HostsIDGet(params *V1HostsIDGetParams, authInfo runtime.Clien V1HostsIDPut modifies the display name of a host */ func (a *Client) V1HostsIDPut(params *V1HostsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsIDPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostsIDPutParams() } @@ -415,17 +455,22 @@ func (a *Client) V1HostsIDPut(params *V1HostsIDPutParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostsIDPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hosts.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -434,7 +479,7 @@ func (a *Client) V1HostsIDPut(params *V1HostsIDPutParams, authInfo runtime.Clien V1HostsPost adds new host s to an existing host group */ func (a *Client) V1HostsPost(params *V1HostsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1HostsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1HostsPostParams() } @@ -454,17 +499,22 @@ func (a *Client) V1HostsPost(params *V1HostsPostParams, authInfo runtime.ClientA for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1HostsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.hosts.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_available_hosts_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_available_hosts_responses.go index eee8389334..56b1723f71 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_available_hosts_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_available_hosts_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1AvailableHostsReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1AvailableHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1AvailableHostsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1AvailableHostsOK() @@ -126,7 +127,7 @@ func (o *V1AvailableHostsOK) GetPayload() models.AvailableHostList { func (o *V1AvailableHostsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *V1AvailableHostsBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *V1AvailableHostsUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *V1AvailableHostsForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *V1AvailableHostsInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *V1AvailableHostsGatewayTimeout) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_get_responses.go index e112020b05..1b93cce912 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_get_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostGroupsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostGroupsGetOK() @@ -126,7 +127,7 @@ func (o *V1HostGroupsGetOK) GetPayload() models.HostGroupList { func (o *V1HostGroupsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *V1HostGroupsGetBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *V1HostGroupsGetUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *V1HostGroupsGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *V1HostGroupsGetInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *V1HostGroupsGetGatewayTimeout) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_get_responses.go index 0aa259da90..dd2002d197 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_get_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostGroupsIDGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostGroupsIDGetOK() @@ -134,7 +135,7 @@ func (o *V1HostGroupsIDGetOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.HostGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1HostGroupsIDGetBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1HostGroupsIDGetUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1HostGroupsIDGetForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1HostGroupsIDGetNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1HostGroupsIDGetInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1HostGroupsIDGetGatewayTimeout) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_put_responses.go index 0afb7f05e5..104fc66efb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_id_put_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostGroupsIDPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostGroupsIDPutOK() @@ -140,7 +141,7 @@ func (o *V1HostGroupsIDPutOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.HostGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1HostGroupsIDPutBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1HostGroupsIDPutUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1HostGroupsIDPutForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1HostGroupsIDPutNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1HostGroupsIDPutConflict) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1HostGroupsIDPutInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1HostGroupsIDPutGatewayTimeout) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_post_responses.go index f20ccba92d..7553595fed 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_host_groups_post_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostGroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1HostGroupsPostCreated() @@ -140,7 +141,7 @@ func (o *V1HostGroupsPostCreated) readResponse(response runtime.ClientResponse, o.Payload = new(models.HostGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1HostGroupsPostBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1HostGroupsPostUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1HostGroupsPostForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1HostGroupsPostConflict) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1HostGroupsPostUnprocessableEntity) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1HostGroupsPostInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1HostGroupsPostGatewayTimeout) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_get_responses.go index 632109b83c..4306d09833 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_get_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostsGetOK() @@ -126,7 +127,7 @@ func (o *V1HostsGetOK) GetPayload() models.HostList { func (o *V1HostsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *V1HostsGetBadRequest) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *V1HostsGetUnauthorized) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *V1HostsGetForbidden) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *V1HostsGetInternalServerError) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *V1HostsGetGatewayTimeout) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_delete_responses.go index afda9239ba..9ba7871914 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_delete_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostsIDDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewV1HostsIDDeleteAccepted() @@ -132,7 +133,7 @@ func (o *V1HostsIDDeleteAccepted) GetPayload() models.Object { func (o *V1HostsIDDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1HostsIDDeleteBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1HostsIDDeleteUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1HostsIDDeleteForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1HostsIDDeleteNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1HostsIDDeleteInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1HostsIDDeleteGatewayTimeout) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_get_responses.go index 3ea59092e8..75a78e2f87 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_get_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostsIDGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostsIDGetOK() @@ -134,7 +135,7 @@ func (o *V1HostsIDGetOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.Host) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1HostsIDGetBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1HostsIDGetUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1HostsIDGetForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1HostsIDGetNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1HostsIDGetInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1HostsIDGetGatewayTimeout) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_put_responses.go index d71402c9e5..3f089e0a5f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_id_put_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostsIDPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1HostsIDPutOK() @@ -140,7 +141,7 @@ func (o *V1HostsIDPutOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.Host) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1HostsIDPutBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1HostsIDPutUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1HostsIDPutForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1HostsIDPutNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1HostsIDPutUnprocessableEntity) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1HostsIDPutInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1HostsIDPutGatewayTimeout) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_post_responses.go index 55d71133e4..2c935319d6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/host_groups/v1_hosts_post_responses.go @@ -7,6 +7,7 @@ package host_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1HostsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1HostsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1HostsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1HostsPostCreated() @@ -132,7 +133,7 @@ func (o *V1HostsPostCreated) GetPayload() models.HostList { func (o *V1HostsPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1HostsPostBadRequest) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1HostsPostUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1HostsPostForbidden) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1HostsPostUnprocessableEntity) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1HostsPostInternalServerError) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1HostsPostGatewayTimeout) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go index cefa48c36c..2433923447 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go @@ -71,7 +71,7 @@ type ClientService interface { ServiceBrokerHealth gets current server health */ func (a *Client) ServiceBrokerHealth(params *ServiceBrokerHealthParams, opts ...ClientOption) (*ServiceBrokerHealthOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerHealthParams() } @@ -90,17 +90,22 @@ func (a *Client) ServiceBrokerHealth(params *ServiceBrokerHealthParams, opts ... for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerHealthOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.health: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -109,7 +114,7 @@ func (a *Client) ServiceBrokerHealth(params *ServiceBrokerHealthParams, opts ... ServiceBrokerHealthHead gets current server health */ func (a *Client) ServiceBrokerHealthHead(params *ServiceBrokerHealthHeadParams, opts ...ClientOption) (*ServiceBrokerHealthHeadOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerHealthHeadParams() } @@ -128,17 +133,22 @@ func (a *Client) ServiceBrokerHealthHead(params *ServiceBrokerHealthHeadParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerHealthHeadOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.health.head: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +157,7 @@ func (a *Client) ServiceBrokerHealthHead(params *ServiceBrokerHealthHeadParams, ServiceBrokerTestTimeout gets current server version */ func (a *Client) ServiceBrokerTestTimeout(params *ServiceBrokerTestTimeoutParams, opts ...ClientOption) (*ServiceBrokerTestTimeoutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerTestTimeoutParams() } @@ -166,17 +176,22 @@ func (a *Client) ServiceBrokerTestTimeout(params *ServiceBrokerTestTimeoutParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerTestTimeoutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.test.timeout: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -185,7 +200,7 @@ func (a *Client) ServiceBrokerTestTimeout(params *ServiceBrokerTestTimeoutParams ServiceBrokerVersion gets current server version */ func (a *Client) ServiceBrokerVersion(params *ServiceBrokerVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerVersionOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerVersionParams() } @@ -205,17 +220,22 @@ func (a *Client) ServiceBrokerVersion(params *ServiceBrokerVersionParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerVersionOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.version: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go index de2604f7af..f379331f74 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go @@ -7,6 +7,7 @@ package iaas_service_broker import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerHealthHeadReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerHealthHeadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerHealthHeadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerHealthHeadOK() @@ -122,7 +123,7 @@ func (o *ServiceBrokerHealthHeadOK) readResponse(response runtime.ClientResponse o.Payload = new(models.Health) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *ServiceBrokerHealthHeadBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *ServiceBrokerHealthHeadUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *ServiceBrokerHealthHeadForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *ServiceBrokerHealthHeadNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go index e89666a858..c989f8589e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go @@ -7,6 +7,7 @@ package iaas_service_broker import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerHealthReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerHealthReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerHealthReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerHealthOK() @@ -122,7 +123,7 @@ func (o *ServiceBrokerHealthOK) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Health) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *ServiceBrokerHealthBadRequest) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *ServiceBrokerHealthUnauthorized) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *ServiceBrokerHealthForbidden) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *ServiceBrokerHealthNotFound) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go index b2304c38bf..060b564401 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go @@ -7,6 +7,7 @@ package iaas_service_broker import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerTestTimeoutReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerTestTimeoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerTestTimeoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerTestTimeoutOK() @@ -120,7 +121,7 @@ func (o *ServiceBrokerTestTimeoutOK) GetPayload() models.Object { func (o *ServiceBrokerTestTimeoutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *ServiceBrokerTestTimeoutBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *ServiceBrokerTestTimeoutUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *ServiceBrokerTestTimeoutForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *ServiceBrokerTestTimeoutNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go index 04859bcca5..baa7ecddc0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go @@ -7,6 +7,7 @@ package iaas_service_broker import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerVersionReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerVersionOK() @@ -122,7 +123,7 @@ func (o *ServiceBrokerVersionOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Version) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *ServiceBrokerVersionBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *ServiceBrokerVersionUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *ServiceBrokerVersionForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *ServiceBrokerVersionNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_capacity_management_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_capacity_management_client.go new file mode 100644 index 0000000000..e78ded4b8b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_capacity_management_client.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_capacity_management + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// New creates a new internal capacity management API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +// New creates a new internal capacity management API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal capacity management API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + +/* +Client for internal capacity management API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + InternalV1CapacityManagementPut(params *InternalV1CapacityManagementPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1CapacityManagementPutOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +InternalV1CapacityManagementPut enables or disable capacity on a system type +*/ +func (a *Client) InternalV1CapacityManagementPut(params *InternalV1CapacityManagementPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1CapacityManagementPutOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewInternalV1CapacityManagementPutParams() + } + op := &runtime.ClientOperation{ + ID: "internal.v1.capacity-management.put", + Method: "PUT", + PathPattern: "/internal/v1/capacity-management", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &InternalV1CapacityManagementPutReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*InternalV1CapacityManagementPutOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for internal.v1.capacity-management.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_parameters.go new file mode 100644 index 0000000000..8a3f0e04ef --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_capacity_management + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewInternalV1CapacityManagementPutParams creates a new InternalV1CapacityManagementPutParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewInternalV1CapacityManagementPutParams() *InternalV1CapacityManagementPutParams { + return &InternalV1CapacityManagementPutParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewInternalV1CapacityManagementPutParamsWithTimeout creates a new InternalV1CapacityManagementPutParams object +// with the ability to set a timeout on a request. +func NewInternalV1CapacityManagementPutParamsWithTimeout(timeout time.Duration) *InternalV1CapacityManagementPutParams { + return &InternalV1CapacityManagementPutParams{ + timeout: timeout, + } +} + +// NewInternalV1CapacityManagementPutParamsWithContext creates a new InternalV1CapacityManagementPutParams object +// with the ability to set a context for a request. +func NewInternalV1CapacityManagementPutParamsWithContext(ctx context.Context) *InternalV1CapacityManagementPutParams { + return &InternalV1CapacityManagementPutParams{ + Context: ctx, + } +} + +// NewInternalV1CapacityManagementPutParamsWithHTTPClient creates a new InternalV1CapacityManagementPutParams object +// with the ability to set a custom HTTPClient for a request. +func NewInternalV1CapacityManagementPutParamsWithHTTPClient(client *http.Client) *InternalV1CapacityManagementPutParams { + return &InternalV1CapacityManagementPutParams{ + HTTPClient: client, + } +} + +/* +InternalV1CapacityManagementPutParams contains all the parameters to send to the API endpoint + + for the internal v1 capacity management put operation. + + Typically these are written to a http.Request. +*/ +type InternalV1CapacityManagementPutParams struct { + + /* Body. + + Parameters for enabling and disabling capacity + */ + Body *models.InternalCapacityManagementRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the internal v1 capacity management put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1CapacityManagementPutParams) WithDefaults() *InternalV1CapacityManagementPutParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the internal v1 capacity management put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1CapacityManagementPutParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) WithTimeout(timeout time.Duration) *InternalV1CapacityManagementPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) WithContext(ctx context.Context) *InternalV1CapacityManagementPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) WithHTTPClient(client *http.Client) *InternalV1CapacityManagementPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) WithBody(body *models.InternalCapacityManagementRequest) *InternalV1CapacityManagementPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the internal v1 capacity management put params +func (o *InternalV1CapacityManagementPutParams) SetBody(body *models.InternalCapacityManagementRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *InternalV1CapacityManagementPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_responses.go new file mode 100644 index 0000000000..74c5ec8a2c --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management/internal_v1_capacity_management_put_responses.go @@ -0,0 +1,411 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_capacity_management + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// InternalV1CapacityManagementPutReader is a Reader for the InternalV1CapacityManagementPut structure. +type InternalV1CapacityManagementPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *InternalV1CapacityManagementPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewInternalV1CapacityManagementPutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewInternalV1CapacityManagementPutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewInternalV1CapacityManagementPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewInternalV1CapacityManagementPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewInternalV1CapacityManagementPutInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PUT /internal/v1/capacity-management] internal.v1.capacity-management.put", response, response.Code()) + } +} + +// NewInternalV1CapacityManagementPutOK creates a InternalV1CapacityManagementPutOK with default headers values +func NewInternalV1CapacityManagementPutOK() *InternalV1CapacityManagementPutOK { + return &InternalV1CapacityManagementPutOK{} +} + +/* +InternalV1CapacityManagementPutOK describes a response with status code 200, with default header values. + +OK +*/ +type InternalV1CapacityManagementPutOK struct { + Payload *models.InternalCapacityManagementResponse +} + +// IsSuccess returns true when this internal v1 capacity management put o k response has a 2xx status code +func (o *InternalV1CapacityManagementPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 capacity management put o k response has a 3xx status code +func (o *InternalV1CapacityManagementPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 capacity management put o k response has a 4xx status code +func (o *InternalV1CapacityManagementPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 capacity management put o k response has a 5xx status code +func (o *InternalV1CapacityManagementPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 capacity management put o k response a status code equal to that given +func (o *InternalV1CapacityManagementPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 capacity management put o k response +func (o *InternalV1CapacityManagementPutOK) Code() int { + return 200 +} + +func (o *InternalV1CapacityManagementPutOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutOK %s", 200, payload) +} + +func (o *InternalV1CapacityManagementPutOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutOK %s", 200, payload) +} + +func (o *InternalV1CapacityManagementPutOK) GetPayload() *models.InternalCapacityManagementResponse { + return o.Payload +} + +func (o *InternalV1CapacityManagementPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InternalCapacityManagementResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1CapacityManagementPutBadRequest creates a InternalV1CapacityManagementPutBadRequest with default headers values +func NewInternalV1CapacityManagementPutBadRequest() *InternalV1CapacityManagementPutBadRequest { + return &InternalV1CapacityManagementPutBadRequest{} +} + +/* +InternalV1CapacityManagementPutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type InternalV1CapacityManagementPutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 capacity management put bad request response has a 2xx status code +func (o *InternalV1CapacityManagementPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 capacity management put bad request response has a 3xx status code +func (o *InternalV1CapacityManagementPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 capacity management put bad request response has a 4xx status code +func (o *InternalV1CapacityManagementPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 capacity management put bad request response has a 5xx status code +func (o *InternalV1CapacityManagementPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 capacity management put bad request response a status code equal to that given +func (o *InternalV1CapacityManagementPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the internal v1 capacity management put bad request response +func (o *InternalV1CapacityManagementPutBadRequest) Code() int { + return 400 +} + +func (o *InternalV1CapacityManagementPutBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutBadRequest %s", 400, payload) +} + +func (o *InternalV1CapacityManagementPutBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutBadRequest %s", 400, payload) +} + +func (o *InternalV1CapacityManagementPutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1CapacityManagementPutBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1CapacityManagementPutUnauthorized creates a InternalV1CapacityManagementPutUnauthorized with default headers values +func NewInternalV1CapacityManagementPutUnauthorized() *InternalV1CapacityManagementPutUnauthorized { + return &InternalV1CapacityManagementPutUnauthorized{} +} + +/* +InternalV1CapacityManagementPutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type InternalV1CapacityManagementPutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 capacity management put unauthorized response has a 2xx status code +func (o *InternalV1CapacityManagementPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 capacity management put unauthorized response has a 3xx status code +func (o *InternalV1CapacityManagementPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 capacity management put unauthorized response has a 4xx status code +func (o *InternalV1CapacityManagementPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 capacity management put unauthorized response has a 5xx status code +func (o *InternalV1CapacityManagementPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 capacity management put unauthorized response a status code equal to that given +func (o *InternalV1CapacityManagementPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 capacity management put unauthorized response +func (o *InternalV1CapacityManagementPutUnauthorized) Code() int { + return 401 +} + +func (o *InternalV1CapacityManagementPutUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutUnauthorized %s", 401, payload) +} + +func (o *InternalV1CapacityManagementPutUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutUnauthorized %s", 401, payload) +} + +func (o *InternalV1CapacityManagementPutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1CapacityManagementPutUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1CapacityManagementPutForbidden creates a InternalV1CapacityManagementPutForbidden with default headers values +func NewInternalV1CapacityManagementPutForbidden() *InternalV1CapacityManagementPutForbidden { + return &InternalV1CapacityManagementPutForbidden{} +} + +/* +InternalV1CapacityManagementPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1CapacityManagementPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 capacity management put forbidden response has a 2xx status code +func (o *InternalV1CapacityManagementPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 capacity management put forbidden response has a 3xx status code +func (o *InternalV1CapacityManagementPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 capacity management put forbidden response has a 4xx status code +func (o *InternalV1CapacityManagementPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 capacity management put forbidden response has a 5xx status code +func (o *InternalV1CapacityManagementPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 capacity management put forbidden response a status code equal to that given +func (o *InternalV1CapacityManagementPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 capacity management put forbidden response +func (o *InternalV1CapacityManagementPutForbidden) Code() int { + return 403 +} + +func (o *InternalV1CapacityManagementPutForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutForbidden %s", 403, payload) +} + +func (o *InternalV1CapacityManagementPutForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutForbidden %s", 403, payload) +} + +func (o *InternalV1CapacityManagementPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1CapacityManagementPutForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1CapacityManagementPutInternalServerError creates a InternalV1CapacityManagementPutInternalServerError with default headers values +func NewInternalV1CapacityManagementPutInternalServerError() *InternalV1CapacityManagementPutInternalServerError { + return &InternalV1CapacityManagementPutInternalServerError{} +} + +/* +InternalV1CapacityManagementPutInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type InternalV1CapacityManagementPutInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 capacity management put internal server error response has a 2xx status code +func (o *InternalV1CapacityManagementPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 capacity management put internal server error response has a 3xx status code +func (o *InternalV1CapacityManagementPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 capacity management put internal server error response has a 4xx status code +func (o *InternalV1CapacityManagementPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 capacity management put internal server error response has a 5xx status code +func (o *InternalV1CapacityManagementPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 capacity management put internal server error response a status code equal to that given +func (o *InternalV1CapacityManagementPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 capacity management put internal server error response +func (o *InternalV1CapacityManagementPutInternalServerError) Code() int { + return 500 +} + +func (o *InternalV1CapacityManagementPutInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutInternalServerError %s", 500, payload) +} + +func (o *InternalV1CapacityManagementPutInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /internal/v1/capacity-management][%d] internalV1CapacityManagementPutInternalServerError %s", 500, payload) +} + +func (o *InternalV1CapacityManagementPutInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1CapacityManagementPutInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_operations_dedicated_hosts_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_operations_dedicated_hosts_client.go index c148318538..634e292cd6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_operations_dedicated_hosts_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_operations_dedicated_hosts_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsDedicatedhostsDelete deletes a dedicated host c r n */ func (a *Client) InternalV1OperationsDedicatedhostsDelete(params *InternalV1OperationsDedicatedhostsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsDedicatedhostsDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsDedicatedhostsDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsDedicatedhostsDelete(params *InternalV1Oper for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsDedicatedhostsDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.dedicatedhosts.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsDedicatedhostsDelete(params *InternalV1Oper InternalV1OperationsDedicatedhostsPost creates a c r n for a dedicated host */ func (a *Client) InternalV1OperationsDedicatedhostsPost(params *InternalV1OperationsDedicatedhostsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsDedicatedhostsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsDedicatedhostsPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsDedicatedhostsPost(params *InternalV1Operat for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsDedicatedhostsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.dedicatedhosts.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_delete_responses.go index 07ce013b39..b5ef01cb57 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_dedicated_hosts import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsDedicatedhostsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsDedicatedhostsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsDedicatedhostsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsDedicatedhostsDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteBadRequest) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteUnauthorized) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteForbidden) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteNotFound) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteGone) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteTooManyRequests) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsDedicatedhostsDeleteInternalServerError) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_post_responses.go index bcf2fbb389..c8510a4431 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts/internal_v1_operations_dedicatedhosts_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_dedicated_hosts import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsDedicatedhostsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsDedicatedhostsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsDedicatedhostsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsDedicatedhostsPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsDedicatedhostsPostCreated) readResponse(response ru o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsDedicatedhostsPostBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsDedicatedhostsPostUnauthorized) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsDedicatedhostsPostForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsDedicatedhostsPostTooManyRequests) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsDedicatedhostsPostInternalServerError) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_operations_images_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_operations_images_client.go index fbb725cd07..7426d5dfa2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_operations_images_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_operations_images_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsImagesDelete deletes an image c r n */ func (a *Client) InternalV1OperationsImagesDelete(params *InternalV1OperationsImagesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsImagesDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsImagesDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsImagesDelete(params *InternalV1OperationsIm for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsImagesDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.images.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsImagesDelete(params *InternalV1OperationsIm InternalV1OperationsImagesPost creates a c r n for an image */ func (a *Client) InternalV1OperationsImagesPost(params *InternalV1OperationsImagesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsImagesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsImagesPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsImagesPost(params *InternalV1OperationsImag for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsImagesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.images.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_delete_responses.go index 20a8942f36..2ea0d0c133 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsImagesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsImagesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsImagesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsImagesDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsImagesDeleteBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsImagesDeleteUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsImagesDeleteForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsImagesDeleteNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsImagesDeleteGone) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsImagesDeleteTooManyRequests) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsImagesDeleteInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_post_responses.go index ae899eba8e..0908607466 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images/internal_v1_operations_images_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsImagesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsImagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsImagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsImagesPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsImagesPostCreated) readResponse(response runtime.Cl o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsImagesPostBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsImagesPostUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsImagesPostForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsImagesPostTooManyRequests) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsImagesPostInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_operations_network_address_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_operations_network_address_groups_client.go index 3151549cae..fdcedd7512 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_operations_network_address_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_operations_network_address_groups_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsNetworkaddressgroupsDelete deletes a network address group c r n */ func (a *Client) InternalV1OperationsNetworkaddressgroupsDelete(params *InternalV1OperationsNetworkaddressgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworkaddressgroupsDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworkaddressgroupsDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsNetworkaddressgroupsDelete(params *Internal for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworkaddressgroupsDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networkaddressgroups.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsNetworkaddressgroupsDelete(params *Internal InternalV1OperationsNetworkaddressgroupsPost creates a c r n for a network address group */ func (a *Client) InternalV1OperationsNetworkaddressgroupsPost(params *InternalV1OperationsNetworkaddressgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworkaddressgroupsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworkaddressgroupsPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsNetworkaddressgroupsPost(params *InternalV1 for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworkaddressgroupsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networkaddressgroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_delete_responses.go index 2ef0bbe677..07c04fa3e4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworkaddressgroupsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworkaddressgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworkaddressgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsNetworkaddressgroupsDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteBadRequest) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteUnauthorized) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteForbidden) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteNotFound) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteGone) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteTooManyRequests) readResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsDeleteInternalServerError) read o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_post_responses.go index d1bf11ca3b..a00ab984ea 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups/internal_v1_operations_networkaddressgroups_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworkaddressgroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworkaddressgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworkaddressgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsNetworkaddressgroupsPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostCreated) readResponse(respo o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostBadRequest) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostUnauthorized) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostForbidden) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostTooManyRequests) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsNetworkaddressgroupsPostInternalServerError) readRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_operations_network_interfaces_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_operations_network_interfaces_client.go index ce01598036..258e1e72e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_operations_network_interfaces_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_operations_network_interfaces_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsNetworkinterfacesDelete deletes a network interfaces c r n */ func (a *Client) InternalV1OperationsNetworkinterfacesDelete(params *InternalV1OperationsNetworkinterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworkinterfacesDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworkinterfacesDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsNetworkinterfacesDelete(params *InternalV1O for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworkinterfacesDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networkinterfaces.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsNetworkinterfacesDelete(params *InternalV1O InternalV1OperationsNetworkinterfacesPost creates a c r n for a network interface */ func (a *Client) InternalV1OperationsNetworkinterfacesPost(params *InternalV1OperationsNetworkinterfacesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworkinterfacesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworkinterfacesPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsNetworkinterfacesPost(params *InternalV1Ope for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworkinterfacesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networkinterfaces.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_delete_responses.go index de64aeb800..3f48e17f65 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_interfaces import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworkinterfacesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworkinterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworkinterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsNetworkinterfacesDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteBadRequest) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteUnauthorized) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteForbidden) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteNotFound) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteGone) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteTooManyRequests) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsNetworkinterfacesDeleteInternalServerError) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_post_responses.go index d660a3b82c..092b8c82c7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_interfaces/internal_v1_operations_networkinterfaces_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_interfaces import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworkinterfacesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworkinterfacesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworkinterfacesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsNetworkinterfacesPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostCreated) readResponse(response o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostBadRequest) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostUnauthorized) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostForbidden) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostTooManyRequests) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsNetworkinterfacesPostInternalServerError) readRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_operations_network_security_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_operations_network_security_groups_client.go index ea5918a187..3aaa7f22f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_operations_network_security_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_operations_network_security_groups_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsNetworksecuritygroupsDelete deletes a network security group c r n */ func (a *Client) InternalV1OperationsNetworksecuritygroupsDelete(params *InternalV1OperationsNetworksecuritygroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworksecuritygroupsDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworksecuritygroupsDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsNetworksecuritygroupsDelete(params *Interna for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworksecuritygroupsDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networksecuritygroups.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsNetworksecuritygroupsDelete(params *Interna InternalV1OperationsNetworksecuritygroupsPost creates a c r n for a network security group */ func (a *Client) InternalV1OperationsNetworksecuritygroupsPost(params *InternalV1OperationsNetworksecuritygroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworksecuritygroupsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworksecuritygroupsPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsNetworksecuritygroupsPost(params *InternalV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworksecuritygroupsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networksecuritygroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_delete_responses.go index 3b6aa923f1..9529624582 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworksecuritygroupsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworksecuritygroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworksecuritygroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsNetworksecuritygroupsDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteBadRequest) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteUnauthorized) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteForbidden) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteNotFound) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteGone) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteTooManyRequests) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsDeleteInternalServerError) rea o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_post_responses.go index c9ffef42ea..bf86b6779b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_security_groups/internal_v1_operations_networksecuritygroups_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworksecuritygroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworksecuritygroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworksecuritygroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsNetworksecuritygroupsPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostCreated) readResponse(resp o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostBadRequest) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostUnauthorized) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostForbidden) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostTooManyRequests) readRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsNetworksecuritygroupsPostInternalServerError) readR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_operations_networks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_operations_networks_client.go index ac8150365b..d1c7690d76 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_operations_networks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_operations_networks_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsNetworksDelete deletes a network c r n */ func (a *Client) InternalV1OperationsNetworksDelete(params *InternalV1OperationsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworksDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworksDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsNetworksDelete(params *InternalV1Operations for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworksDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networks.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsNetworksDelete(params *InternalV1Operations InternalV1OperationsNetworksPost creates a c r n for a network */ func (a *Client) InternalV1OperationsNetworksPost(params *InternalV1OperationsNetworksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsNetworksPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsNetworksPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsNetworksPost(params *InternalV1OperationsNe for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsNetworksPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.networks.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_delete_responses.go index 2900213ede..730c14146c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsNetworksDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsNetworksDeleteBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsNetworksDeleteUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsNetworksDeleteForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsNetworksDeleteNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsNetworksDeleteGone) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsNetworksDeleteTooManyRequests) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsNetworksDeleteInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_post_responses.go index 0c2cf1de30..a951b55d2f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_networks/internal_v1_operations_networks_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsNetworksPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsNetworksPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsNetworksPostCreated) readResponse(response runtime. o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsNetworksPostBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsNetworksPostUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsNetworksPostForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsNetworksPostTooManyRequests) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsNetworksPostInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_operations_pvm_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_operations_pvm_instances_client.go index 337a49bde0..6c5ba4a0aa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_operations_pvm_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_operations_pvm_instances_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsPvminstancesDelete deletes a p VM instance c r n */ func (a *Client) InternalV1OperationsPvminstancesDelete(params *InternalV1OperationsPvminstancesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsPvminstancesDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsPvminstancesDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsPvminstancesDelete(params *InternalV1Operat for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsPvminstancesDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.pvminstances.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsPvminstancesDelete(params *InternalV1Operat InternalV1OperationsPvminstancesPost creates a c r n for a p VM instance */ func (a *Client) InternalV1OperationsPvminstancesPost(params *InternalV1OperationsPvminstancesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsPvminstancesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsPvminstancesPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsPvminstancesPost(params *InternalV1Operatio for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsPvminstancesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.pvminstances.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_delete_responses.go index 53e031bb02..8b6ce40986 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_pvm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsPvminstancesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsPvminstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsPvminstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsPvminstancesDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsPvminstancesDeleteBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsPvminstancesDeleteUnauthorized) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsPvminstancesDeleteForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsPvminstancesDeleteNotFound) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsPvminstancesDeleteGone) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsPvminstancesDeleteTooManyRequests) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsPvminstancesDeleteInternalServerError) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_post_responses.go index 4f8afe72f0..6345aafc10 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances/internal_v1_operations_pvminstances_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_pvm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsPvminstancesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsPvminstancesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsPvminstancesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsPvminstancesPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsPvminstancesPostCreated) readResponse(response runt o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsPvminstancesPostBadRequest) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsPvminstancesPostUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsPvminstancesPostForbidden) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsPvminstancesPostTooManyRequests) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsPvminstancesPostInternalServerError) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_operations_shared_processor_pools_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_operations_shared_processor_pools_client.go index 74541b168a..5294fed2d8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_operations_shared_processor_pools_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_operations_shared_processor_pools_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsSharedprocessorpoolsDelete deletes a shared processor pool c r n */ func (a *Client) InternalV1OperationsSharedprocessorpoolsDelete(params *InternalV1OperationsSharedprocessorpoolsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsSharedprocessorpoolsDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsSharedprocessorpoolsDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsSharedprocessorpoolsDelete(params *Internal for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsSharedprocessorpoolsDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.sharedprocessorpools.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsSharedprocessorpoolsDelete(params *Internal InternalV1OperationsSharedprocessorpoolsPost creates a c r n for a shared processor pool */ func (a *Client) InternalV1OperationsSharedprocessorpoolsPost(params *InternalV1OperationsSharedprocessorpoolsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsSharedprocessorpoolsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsSharedprocessorpoolsPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsSharedprocessorpoolsPost(params *InternalV1 for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsSharedprocessorpoolsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.sharedprocessorpools.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_delete_responses.go index d9795554c2..251c82598c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsSharedprocessorpoolsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsSharedprocessorpoolsDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteBadRequest) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteUnauthorized) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteForbidden) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteNotFound) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteGone) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteTooManyRequests) readResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsDeleteInternalServerError) read o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_post_responses.go index 532c2c1b06..8bef93c687 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools/internal_v1_operations_sharedprocessorpools_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsSharedprocessorpoolsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsSharedprocessorpoolsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsSharedprocessorpoolsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsSharedprocessorpoolsPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostCreated) readResponse(respo o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostBadRequest) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostUnauthorized) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostForbidden) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostTooManyRequests) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsSharedprocessorpoolsPostInternalServerError) readRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_operations_snapshots_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_operations_snapshots_client.go index 322a95856e..cd4dc8c45e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_operations_snapshots_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_operations_snapshots_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsSnapshotsDelete deletes a snapshot c r n */ func (a *Client) InternalV1OperationsSnapshotsDelete(params *InternalV1OperationsSnapshotsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsSnapshotsDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsSnapshotsDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsSnapshotsDelete(params *InternalV1Operation for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsSnapshotsDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.snapshots.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsSnapshotsDelete(params *InternalV1Operation InternalV1OperationsSnapshotsPost creates a c r n for a snapshot */ func (a *Client) InternalV1OperationsSnapshotsPost(params *InternalV1OperationsSnapshotsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsSnapshotsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsSnapshotsPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsSnapshotsPost(params *InternalV1OperationsS for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsSnapshotsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.snapshots.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_delete_responses.go index bd7a7876e9..e07bff00dd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsSnapshotsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsSnapshotsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsSnapshotsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsSnapshotsDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsSnapshotsDeleteBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsSnapshotsDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsSnapshotsDeleteForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsSnapshotsDeleteNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsSnapshotsDeleteGone) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsSnapshotsDeleteTooManyRequests) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsSnapshotsDeleteInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_post_responses.go index 6caf7781e7..bff26c91fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots/internal_v1_operations_snapshots_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsSnapshotsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsSnapshotsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsSnapshotsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsSnapshotsPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsSnapshotsPostCreated) readResponse(response runtime o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsSnapshotsPostBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsSnapshotsPostUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsSnapshotsPostForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsSnapshotsPostTooManyRequests) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsSnapshotsPostInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_operationsvp_mem_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_operationsvp_mem_volumes_client.go new file mode 100644 index 0000000000..5f141221f8 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_operationsvp_mem_volumes_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_operations_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// New creates a new internal operations v p mem volumes API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +// New creates a new internal operations v p mem volumes API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new internal operations v p mem volumes API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + +/* +Client for internal operations v p mem volumes API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + InternalV1OperationsVpmemVolumesDelete(params *InternalV1OperationsVpmemVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVpmemVolumesDeleteNoContent, error) + + InternalV1OperationsVpmemVolumesPost(params *InternalV1OperationsVpmemVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVpmemVolumesPostCreated, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +InternalV1OperationsVpmemVolumesDelete deletes a v p m e m volume c r n +*/ +func (a *Client) InternalV1OperationsVpmemVolumesDelete(params *InternalV1OperationsVpmemVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVpmemVolumesDeleteNoContent, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewInternalV1OperationsVpmemVolumesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "internal.v1.operations.vpmem-volumes.delete", + Method: "DELETE", + PathPattern: "/internal/v1/operations/vpmem-volumes/{resource_crn}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &InternalV1OperationsVpmemVolumesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*InternalV1OperationsVpmemVolumesDeleteNoContent) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for internal.v1.operations.vpmem-volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +InternalV1OperationsVpmemVolumesPost creates a c r n for a v p m e m volume +*/ +func (a *Client) InternalV1OperationsVpmemVolumesPost(params *InternalV1OperationsVpmemVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVpmemVolumesPostCreated, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewInternalV1OperationsVpmemVolumesPostParams() + } + op := &runtime.ClientOperation{ + ID: "internal.v1.operations.vpmem-volumes.post", + Method: "POST", + PathPattern: "/internal/v1/operations/vpmem-volumes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &InternalV1OperationsVpmemVolumesPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*InternalV1OperationsVpmemVolumesPostCreated) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for internal.v1.operations.vpmem-volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_parameters.go new file mode 100644 index 0000000000..02abee0b35 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_parameters.go @@ -0,0 +1,217 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_operations_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewInternalV1OperationsVpmemVolumesDeleteParams creates a new InternalV1OperationsVpmemVolumesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewInternalV1OperationsVpmemVolumesDeleteParams() *InternalV1OperationsVpmemVolumesDeleteParams { + return &InternalV1OperationsVpmemVolumesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewInternalV1OperationsVpmemVolumesDeleteParamsWithTimeout creates a new InternalV1OperationsVpmemVolumesDeleteParams object +// with the ability to set a timeout on a request. +func NewInternalV1OperationsVpmemVolumesDeleteParamsWithTimeout(timeout time.Duration) *InternalV1OperationsVpmemVolumesDeleteParams { + return &InternalV1OperationsVpmemVolumesDeleteParams{ + timeout: timeout, + } +} + +// NewInternalV1OperationsVpmemVolumesDeleteParamsWithContext creates a new InternalV1OperationsVpmemVolumesDeleteParams object +// with the ability to set a context for a request. +func NewInternalV1OperationsVpmemVolumesDeleteParamsWithContext(ctx context.Context) *InternalV1OperationsVpmemVolumesDeleteParams { + return &InternalV1OperationsVpmemVolumesDeleteParams{ + Context: ctx, + } +} + +// NewInternalV1OperationsVpmemVolumesDeleteParamsWithHTTPClient creates a new InternalV1OperationsVpmemVolumesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewInternalV1OperationsVpmemVolumesDeleteParamsWithHTTPClient(client *http.Client) *InternalV1OperationsVpmemVolumesDeleteParams { + return &InternalV1OperationsVpmemVolumesDeleteParams{ + HTTPClient: client, + } +} + +/* +InternalV1OperationsVpmemVolumesDeleteParams contains all the parameters to send to the API endpoint + + for the internal v1 operations vpmem volumes delete operation. + + Typically these are written to a http.Request. +*/ +type InternalV1OperationsVpmemVolumesDeleteParams struct { + + /* Authorization. + + Authentication of the service token + */ + Authorization string + + /* CRN. + + the CRN of the workspace + */ + CRN string + + /* IBMUserAuthorization. + + Authentication of the operation account user + */ + IBMUserAuthorization string + + /* ResourceCrn. + + Encoded resource CRN, "/" to be encoded into "%2F", example 'crn:v1:staging:public:power-iaas:satloc_dal_clp2joc20ppo19876n50:a%2Fc7e6bd2517ad44eabbd61fcc25cf68d5:79bffc73-0035-4e7b-b34a-15da38927424:network:d8d51d44-053b-4df3-90b6-31fbe72ba600' + */ + ResourceCrn string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the internal v1 operations vpmem volumes delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithDefaults() *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the internal v1 operations vpmem volumes delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithTimeout(timeout time.Duration) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithContext(ctx context.Context) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithHTTPClient(client *http.Client) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthorization adds the authorization to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithAuthorization(authorization string) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetAuthorization(authorization) + return o +} + +// SetAuthorization adds the authorization to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetAuthorization(authorization string) { + o.Authorization = authorization +} + +// WithCRN adds the cRN to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithCRN(cRN string) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetCRN(cRN) + return o +} + +// SetCRN adds the cRN to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetCRN(cRN string) { + o.CRN = cRN +} + +// WithIBMUserAuthorization adds the iBMUserAuthorization to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithIBMUserAuthorization(iBMUserAuthorization string) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetIBMUserAuthorization(iBMUserAuthorization) + return o +} + +// SetIBMUserAuthorization adds the iBMUserAuthorization to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetIBMUserAuthorization(iBMUserAuthorization string) { + o.IBMUserAuthorization = iBMUserAuthorization +} + +// WithResourceCrn adds the resourceCrn to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WithResourceCrn(resourceCrn string) *InternalV1OperationsVpmemVolumesDeleteParams { + o.SetResourceCrn(resourceCrn) + return o +} + +// SetResourceCrn adds the resourceCrn to the internal v1 operations vpmem volumes delete params +func (o *InternalV1OperationsVpmemVolumesDeleteParams) SetResourceCrn(resourceCrn string) { + o.ResourceCrn = resourceCrn +} + +// WriteToRequest writes these params to a swagger request +func (o *InternalV1OperationsVpmemVolumesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // header param Authorization + if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil { + return err + } + + // header param CRN + if err := r.SetHeaderParam("CRN", o.CRN); err != nil { + return err + } + + // header param IBM-UserAuthorization + if err := r.SetHeaderParam("IBM-UserAuthorization", o.IBMUserAuthorization); err != nil { + return err + } + + // path param resource_crn + if err := r.SetPathParam("resource_crn", o.ResourceCrn); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_responses.go new file mode 100644 index 0000000000..a33cc83df0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_delete_responses.go @@ -0,0 +1,625 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_operations_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// InternalV1OperationsVpmemVolumesDeleteReader is a Reader for the InternalV1OperationsVpmemVolumesDelete structure. +type InternalV1OperationsVpmemVolumesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *InternalV1OperationsVpmemVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 204: + result := NewInternalV1OperationsVpmemVolumesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewInternalV1OperationsVpmemVolumesDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewInternalV1OperationsVpmemVolumesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewInternalV1OperationsVpmemVolumesDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewInternalV1OperationsVpmemVolumesDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 410: + result := NewInternalV1OperationsVpmemVolumesDeleteGone() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewInternalV1OperationsVpmemVolumesDeleteTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewInternalV1OperationsVpmemVolumesDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}] internal.v1.operations.vpmem-volumes.delete", response, response.Code()) + } +} + +// NewInternalV1OperationsVpmemVolumesDeleteNoContent creates a InternalV1OperationsVpmemVolumesDeleteNoContent with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteNoContent() *InternalV1OperationsVpmemVolumesDeleteNoContent { + return &InternalV1OperationsVpmemVolumesDeleteNoContent{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteNoContent describes a response with status code 204, with default header values. + +Deleted +*/ +type InternalV1OperationsVpmemVolumesDeleteNoContent struct { +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete no content response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete no content response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete no content response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete no content response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete no content response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) IsCode(code int) bool { + return code == 204 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete no content response +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) Code() int { + return 204 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteNoContent", 204) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) String() string { + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteNoContent", 204) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteBadRequest creates a InternalV1OperationsVpmemVolumesDeleteBadRequest with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteBadRequest() *InternalV1OperationsVpmemVolumesDeleteBadRequest { + return &InternalV1OperationsVpmemVolumesDeleteBadRequest{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type InternalV1OperationsVpmemVolumesDeleteBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete bad request response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete bad request response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete bad request response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete bad request response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete bad request response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete bad request response +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) Code() int { + return 400 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteBadRequest %s", 400, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteBadRequest %s", 400, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteUnauthorized creates a InternalV1OperationsVpmemVolumesDeleteUnauthorized with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteUnauthorized() *InternalV1OperationsVpmemVolumesDeleteUnauthorized { + return &InternalV1OperationsVpmemVolumesDeleteUnauthorized{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type InternalV1OperationsVpmemVolumesDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete unauthorized response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete unauthorized response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete unauthorized response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete unauthorized response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete unauthorized response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete unauthorized response +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) Code() int { + return 401 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteUnauthorized %s", 401, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteUnauthorized %s", 401, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteForbidden creates a InternalV1OperationsVpmemVolumesDeleteForbidden with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteForbidden() *InternalV1OperationsVpmemVolumesDeleteForbidden { + return &InternalV1OperationsVpmemVolumesDeleteForbidden{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1OperationsVpmemVolumesDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete forbidden response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete forbidden response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete forbidden response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete forbidden response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete forbidden response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete forbidden response +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) Code() int { + return 403 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteForbidden %s", 403, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteForbidden %s", 403, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteNotFound creates a InternalV1OperationsVpmemVolumesDeleteNotFound with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteNotFound() *InternalV1OperationsVpmemVolumesDeleteNotFound { + return &InternalV1OperationsVpmemVolumesDeleteNotFound{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type InternalV1OperationsVpmemVolumesDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete not found response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete not found response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete not found response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete not found response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete not found response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete not found response +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) Code() int { + return 404 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteNotFound %s", 404, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteNotFound %s", 404, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteGone creates a InternalV1OperationsVpmemVolumesDeleteGone with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteGone() *InternalV1OperationsVpmemVolumesDeleteGone { + return &InternalV1OperationsVpmemVolumesDeleteGone{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteGone describes a response with status code 410, with default header values. + +Gone +*/ +type InternalV1OperationsVpmemVolumesDeleteGone struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete gone response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete gone response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete gone response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete gone response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete gone response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete gone response +func (o *InternalV1OperationsVpmemVolumesDeleteGone) Code() int { + return 410 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteGone) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteGone %s", 410, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteGone) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteGone %s", 410, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteGone) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteGone) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteTooManyRequests creates a InternalV1OperationsVpmemVolumesDeleteTooManyRequests with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteTooManyRequests() *InternalV1OperationsVpmemVolumesDeleteTooManyRequests { + return &InternalV1OperationsVpmemVolumesDeleteTooManyRequests{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type InternalV1OperationsVpmemVolumesDeleteTooManyRequests struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete too many requests response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete too many requests response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete too many requests response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete too many requests response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete too many requests response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete too many requests response +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) Code() int { + return 429 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteTooManyRequests %s", 429, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteTooManyRequests %s", 429, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesDeleteInternalServerError creates a InternalV1OperationsVpmemVolumesDeleteInternalServerError with default headers values +func NewInternalV1OperationsVpmemVolumesDeleteInternalServerError() *InternalV1OperationsVpmemVolumesDeleteInternalServerError { + return &InternalV1OperationsVpmemVolumesDeleteInternalServerError{} +} + +/* +InternalV1OperationsVpmemVolumesDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type InternalV1OperationsVpmemVolumesDeleteInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes delete internal server error response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes delete internal server error response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes delete internal server error response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 operations vpmem volumes delete internal server error response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 operations vpmem volumes delete internal server error response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 operations vpmem volumes delete internal server error response +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) Code() int { + return 500 +} + +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteInternalServerError %s", 500, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /internal/v1/operations/vpmem-volumes/{resource_crn}][%d] internalV1OperationsVpmemVolumesDeleteInternalServerError %s", 500, payload) +} + +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_parameters.go new file mode 100644 index 0000000000..41099e9118 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_parameters.go @@ -0,0 +1,219 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_operations_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewInternalV1OperationsVpmemVolumesPostParams creates a new InternalV1OperationsVpmemVolumesPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewInternalV1OperationsVpmemVolumesPostParams() *InternalV1OperationsVpmemVolumesPostParams { + return &InternalV1OperationsVpmemVolumesPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewInternalV1OperationsVpmemVolumesPostParamsWithTimeout creates a new InternalV1OperationsVpmemVolumesPostParams object +// with the ability to set a timeout on a request. +func NewInternalV1OperationsVpmemVolumesPostParamsWithTimeout(timeout time.Duration) *InternalV1OperationsVpmemVolumesPostParams { + return &InternalV1OperationsVpmemVolumesPostParams{ + timeout: timeout, + } +} + +// NewInternalV1OperationsVpmemVolumesPostParamsWithContext creates a new InternalV1OperationsVpmemVolumesPostParams object +// with the ability to set a context for a request. +func NewInternalV1OperationsVpmemVolumesPostParamsWithContext(ctx context.Context) *InternalV1OperationsVpmemVolumesPostParams { + return &InternalV1OperationsVpmemVolumesPostParams{ + Context: ctx, + } +} + +// NewInternalV1OperationsVpmemVolumesPostParamsWithHTTPClient creates a new InternalV1OperationsVpmemVolumesPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewInternalV1OperationsVpmemVolumesPostParamsWithHTTPClient(client *http.Client) *InternalV1OperationsVpmemVolumesPostParams { + return &InternalV1OperationsVpmemVolumesPostParams{ + HTTPClient: client, + } +} + +/* +InternalV1OperationsVpmemVolumesPostParams contains all the parameters to send to the API endpoint + + for the internal v1 operations vpmem volumes post operation. + + Typically these are written to a http.Request. +*/ +type InternalV1OperationsVpmemVolumesPostParams struct { + + /* Authorization. + + Authentication of the service token + */ + Authorization string + + /* CRN. + + the CRN of the workspace + */ + CRN string + + /* IBMUserAuthorization. + + Authentication of the operation account user + */ + IBMUserAuthorization string + + /* Body. + + Parameters for creating vPMEM volume CRN + */ + Body *models.InternalOperationsRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the internal v1 operations vpmem volumes post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1OperationsVpmemVolumesPostParams) WithDefaults() *InternalV1OperationsVpmemVolumesPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the internal v1 operations vpmem volumes post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *InternalV1OperationsVpmemVolumesPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithTimeout(timeout time.Duration) *InternalV1OperationsVpmemVolumesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithContext(ctx context.Context) *InternalV1OperationsVpmemVolumesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithHTTPClient(client *http.Client) *InternalV1OperationsVpmemVolumesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthorization adds the authorization to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithAuthorization(authorization string) *InternalV1OperationsVpmemVolumesPostParams { + o.SetAuthorization(authorization) + return o +} + +// SetAuthorization adds the authorization to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetAuthorization(authorization string) { + o.Authorization = authorization +} + +// WithCRN adds the cRN to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithCRN(cRN string) *InternalV1OperationsVpmemVolumesPostParams { + o.SetCRN(cRN) + return o +} + +// SetCRN adds the cRN to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetCRN(cRN string) { + o.CRN = cRN +} + +// WithIBMUserAuthorization adds the iBMUserAuthorization to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithIBMUserAuthorization(iBMUserAuthorization string) *InternalV1OperationsVpmemVolumesPostParams { + o.SetIBMUserAuthorization(iBMUserAuthorization) + return o +} + +// SetIBMUserAuthorization adds the iBMUserAuthorization to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetIBMUserAuthorization(iBMUserAuthorization string) { + o.IBMUserAuthorization = iBMUserAuthorization +} + +// WithBody adds the body to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) WithBody(body *models.InternalOperationsRequest) *InternalV1OperationsVpmemVolumesPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the internal v1 operations vpmem volumes post params +func (o *InternalV1OperationsVpmemVolumesPostParams) SetBody(body *models.InternalOperationsRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *InternalV1OperationsVpmemVolumesPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // header param Authorization + if err := r.SetHeaderParam("Authorization", o.Authorization); err != nil { + return err + } + + // header param CRN + if err := r.SetHeaderParam("CRN", o.CRN); err != nil { + return err + } + + // header param IBM-UserAuthorization + if err := r.SetHeaderParam("IBM-UserAuthorization", o.IBMUserAuthorization); err != nil { + return err + } + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_responses.go new file mode 100644 index 0000000000..f3ac683fd1 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes/internal_v1_operations_vpmem_volumes_post_responses.go @@ -0,0 +1,487 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package internal_operations_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// InternalV1OperationsVpmemVolumesPostReader is a Reader for the InternalV1OperationsVpmemVolumesPost structure. +type InternalV1OperationsVpmemVolumesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *InternalV1OperationsVpmemVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 201: + result := NewInternalV1OperationsVpmemVolumesPostCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewInternalV1OperationsVpmemVolumesPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewInternalV1OperationsVpmemVolumesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewInternalV1OperationsVpmemVolumesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewInternalV1OperationsVpmemVolumesPostTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewInternalV1OperationsVpmemVolumesPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /internal/v1/operations/vpmem-volumes] internal.v1.operations.vpmem-volumes.post", response, response.Code()) + } +} + +// NewInternalV1OperationsVpmemVolumesPostCreated creates a InternalV1OperationsVpmemVolumesPostCreated with default headers values +func NewInternalV1OperationsVpmemVolumesPostCreated() *InternalV1OperationsVpmemVolumesPostCreated { + return &InternalV1OperationsVpmemVolumesPostCreated{} +} + +/* +InternalV1OperationsVpmemVolumesPostCreated describes a response with status code 201, with default header values. + +Created +*/ +type InternalV1OperationsVpmemVolumesPostCreated struct { + Payload *models.InternalOperationsResponse +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post created response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post created response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post created response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post created response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes post created response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post created response +func (o *InternalV1OperationsVpmemVolumesPostCreated) Code() int { + return 201 +} + +func (o *InternalV1OperationsVpmemVolumesPostCreated) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostCreated %s", 201, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostCreated) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostCreated %s", 201, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostCreated) GetPayload() *models.InternalOperationsResponse { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InternalOperationsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesPostBadRequest creates a InternalV1OperationsVpmemVolumesPostBadRequest with default headers values +func NewInternalV1OperationsVpmemVolumesPostBadRequest() *InternalV1OperationsVpmemVolumesPostBadRequest { + return &InternalV1OperationsVpmemVolumesPostBadRequest{} +} + +/* +InternalV1OperationsVpmemVolumesPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type InternalV1OperationsVpmemVolumesPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post bad request response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post bad request response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post bad request response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post bad request response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes post bad request response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post bad request response +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) Code() int { + return 400 +} + +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostBadRequest %s", 400, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostBadRequest %s", 400, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesPostUnauthorized creates a InternalV1OperationsVpmemVolumesPostUnauthorized with default headers values +func NewInternalV1OperationsVpmemVolumesPostUnauthorized() *InternalV1OperationsVpmemVolumesPostUnauthorized { + return &InternalV1OperationsVpmemVolumesPostUnauthorized{} +} + +/* +InternalV1OperationsVpmemVolumesPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type InternalV1OperationsVpmemVolumesPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post unauthorized response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post unauthorized response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post unauthorized response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post unauthorized response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes post unauthorized response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post unauthorized response +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) Code() int { + return 401 +} + +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostUnauthorized %s", 401, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostUnauthorized %s", 401, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesPostForbidden creates a InternalV1OperationsVpmemVolumesPostForbidden with default headers values +func NewInternalV1OperationsVpmemVolumesPostForbidden() *InternalV1OperationsVpmemVolumesPostForbidden { + return &InternalV1OperationsVpmemVolumesPostForbidden{} +} + +/* +InternalV1OperationsVpmemVolumesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1OperationsVpmemVolumesPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post forbidden response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post forbidden response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post forbidden response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post forbidden response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes post forbidden response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post forbidden response +func (o *InternalV1OperationsVpmemVolumesPostForbidden) Code() int { + return 403 +} + +func (o *InternalV1OperationsVpmemVolumesPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostForbidden %s", 403, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostForbidden %s", 403, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesPostTooManyRequests creates a InternalV1OperationsVpmemVolumesPostTooManyRequests with default headers values +func NewInternalV1OperationsVpmemVolumesPostTooManyRequests() *InternalV1OperationsVpmemVolumesPostTooManyRequests { + return &InternalV1OperationsVpmemVolumesPostTooManyRequests{} +} + +/* +InternalV1OperationsVpmemVolumesPostTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type InternalV1OperationsVpmemVolumesPostTooManyRequests struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post too many requests response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post too many requests response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post too many requests response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post too many requests response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 operations vpmem volumes post too many requests response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post too many requests response +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) Code() int { + return 429 +} + +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostTooManyRequests %s", 429, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostTooManyRequests %s", 429, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewInternalV1OperationsVpmemVolumesPostInternalServerError creates a InternalV1OperationsVpmemVolumesPostInternalServerError with default headers values +func NewInternalV1OperationsVpmemVolumesPostInternalServerError() *InternalV1OperationsVpmemVolumesPostInternalServerError { + return &InternalV1OperationsVpmemVolumesPostInternalServerError{} +} + +/* +InternalV1OperationsVpmemVolumesPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type InternalV1OperationsVpmemVolumesPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 operations vpmem volumes post internal server error response has a 2xx status code +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 operations vpmem volumes post internal server error response has a 3xx status code +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 operations vpmem volumes post internal server error response has a 4xx status code +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 operations vpmem volumes post internal server error response has a 5xx status code +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 operations vpmem volumes post internal server error response a status code equal to that given +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 operations vpmem volumes post internal server error response +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) Code() int { + return 500 +} + +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostInternalServerError %s", 500, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /internal/v1/operations/vpmem-volumes][%d] internalV1OperationsVpmemVolumesPostInternalServerError %s", 500, payload) +} + +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1OperationsVpmemVolumesPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_operations_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_operations_volumes_client.go index b11bfeef4a..4b4c0a4d40 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_operations_volumes_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_operations_volumes_client.go @@ -67,7 +67,7 @@ type ClientService interface { InternalV1OperationsVolumesDelete deletes a volume c r n */ func (a *Client) InternalV1OperationsVolumesDelete(params *InternalV1OperationsVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVolumesDeleteNoContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsVolumesDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) InternalV1OperationsVolumesDelete(params *InternalV1OperationsV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsVolumesDeleteNoContent) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) InternalV1OperationsVolumesDelete(params *InternalV1OperationsV InternalV1OperationsVolumesPost creates a c r n for a volume */ func (a *Client) InternalV1OperationsVolumesPost(params *InternalV1OperationsVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1OperationsVolumesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1OperationsVolumesPostParams() } @@ -126,17 +131,22 @@ func (a *Client) InternalV1OperationsVolumesPost(params *InternalV1OperationsVol for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1OperationsVolumesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.operations.volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_delete_responses.go index 47da2908db..0ea9317e1d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_delete_responses.go @@ -7,6 +7,7 @@ package internal_operations_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsVolumesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 204: result := NewInternalV1OperationsVolumesDeleteNoContent() @@ -196,7 +197,7 @@ func (o *InternalV1OperationsVolumesDeleteBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *InternalV1OperationsVolumesDeleteUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *InternalV1OperationsVolumesDeleteForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *InternalV1OperationsVolumesDeleteNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *InternalV1OperationsVolumesDeleteGone) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -546,7 +547,7 @@ func (o *InternalV1OperationsVolumesDeleteTooManyRequests) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -616,7 +617,7 @@ func (o *InternalV1OperationsVolumesDeleteInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_post_responses.go index c21883d929..04d0ee49d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes/internal_v1_operations_volumes_post_responses.go @@ -7,6 +7,7 @@ package internal_operations_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1OperationsVolumesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1OperationsVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1OperationsVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewInternalV1OperationsVolumesPostCreated() @@ -128,7 +129,7 @@ func (o *InternalV1OperationsVolumesPostCreated) readResponse(response runtime.C o.Payload = new(models.InternalOperationsResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1OperationsVolumesPostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1OperationsVolumesPostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1OperationsVolumesPostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1OperationsVolumesPostTooManyRequests) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1OperationsVolumesPostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go index 4cf2e6900d..d4aaac5533 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go @@ -65,7 +65,7 @@ type ClientService interface { InternalV1PowervsInstancesGet gets list of power v s cloud instances */ func (a *Client) InternalV1PowervsInstancesGet(params *InternalV1PowervsInstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsInstancesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1PowervsInstancesGetParams() } @@ -85,17 +85,22 @@ func (a *Client) InternalV1PowervsInstancesGet(params *InternalV1PowervsInstance for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1PowervsInstancesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.powervs.instances.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go index a7d7ff7443..5730357c09 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go @@ -7,6 +7,7 @@ package internal_power_v_s_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1PowervsInstancesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1PowervsInstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1PowervsInstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1PowervsInstancesGetOK() @@ -110,7 +111,7 @@ func (o *InternalV1PowervsInstancesGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.PowerVSInstances) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -180,7 +181,7 @@ func (o *InternalV1PowervsInstancesGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -250,7 +251,7 @@ func (o *InternalV1PowervsInstancesGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go index a5b26b2bb2..f60aee0ad4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go @@ -71,7 +71,7 @@ type ClientService interface { InternalV1PowervsLocationsActivatePut activates a power v s on prem location */ func (a *Client) InternalV1PowervsLocationsActivatePut(params *InternalV1PowervsLocationsActivatePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsLocationsActivatePutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1PowervsLocationsActivatePutParams() } @@ -91,17 +91,22 @@ func (a *Client) InternalV1PowervsLocationsActivatePut(params *InternalV1Powervs for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1PowervsLocationsActivatePutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.powervs.locations.activate.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -110,7 +115,7 @@ func (a *Client) InternalV1PowervsLocationsActivatePut(params *InternalV1Powervs InternalV1PowervsLocationsTagDelete deletes a power satellite tag */ func (a *Client) InternalV1PowervsLocationsTagDelete(params *InternalV1PowervsLocationsTagDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsLocationsTagDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1PowervsLocationsTagDeleteParams() } @@ -130,17 +135,22 @@ func (a *Client) InternalV1PowervsLocationsTagDelete(params *InternalV1PowervsLo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1PowervsLocationsTagDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.powervs.locations.tag.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -149,7 +159,7 @@ func (a *Client) InternalV1PowervsLocationsTagDelete(params *InternalV1PowervsLo InternalV1PowervsLocationsTagPost adds a power satellite tag */ func (a *Client) InternalV1PowervsLocationsTagPost(params *InternalV1PowervsLocationsTagPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsLocationsTagPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1PowervsLocationsTagPostParams() } @@ -169,17 +179,22 @@ func (a *Client) InternalV1PowervsLocationsTagPost(params *InternalV1PowervsLoca for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1PowervsLocationsTagPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.powervs.locations.tag.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -188,7 +203,7 @@ func (a *Client) InternalV1PowervsLocationsTagPost(params *InternalV1PowervsLoca InternalV1PowervsLocationsTransitgatewayGet gets list of p e r enabled power v s locations */ func (a *Client) InternalV1PowervsLocationsTransitgatewayGet(params *InternalV1PowervsLocationsTransitgatewayGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsLocationsTransitgatewayGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1PowervsLocationsTransitgatewayGetParams() } @@ -208,17 +223,22 @@ func (a *Client) InternalV1PowervsLocationsTransitgatewayGet(params *InternalV1P for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1PowervsLocationsTransitgatewayGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.powervs.locations.transitgateway.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go index a96743275c..b067adf887 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_activate_put_responses.go @@ -7,6 +7,7 @@ package internal_power_v_s_locations import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1PowervsLocationsActivatePutReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1PowervsLocationsActivatePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1PowervsLocationsActivatePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1PowervsLocationsActivatePutOK() @@ -122,7 +123,7 @@ func (o *InternalV1PowervsLocationsActivatePutOK) readResponse(response runtime. o.Payload = new(models.SatelliteOrder) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *InternalV1PowervsLocationsActivatePutBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *InternalV1PowervsLocationsActivatePutUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *InternalV1PowervsLocationsActivatePutUnprocessableEntity) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *InternalV1PowervsLocationsActivatePutInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go index e9775fcfaf..96a2f7039f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_delete_responses.go @@ -7,6 +7,7 @@ package internal_power_v_s_locations import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1PowervsLocationsTagDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1PowervsLocationsTagDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1PowervsLocationsTagDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1PowervsLocationsTagDeleteOK() @@ -178,7 +179,7 @@ func (o *InternalV1PowervsLocationsTagDeleteBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -248,7 +249,7 @@ func (o *InternalV1PowervsLocationsTagDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -318,7 +319,7 @@ func (o *InternalV1PowervsLocationsTagDeleteUnprocessableEntity) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -388,7 +389,7 @@ func (o *InternalV1PowervsLocationsTagDeleteInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go index 7b1e8cb061..40e717a2cc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_tag_post_responses.go @@ -7,6 +7,7 @@ package internal_power_v_s_locations import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1PowervsLocationsTagPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1PowervsLocationsTagPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1PowervsLocationsTagPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1PowervsLocationsTagPostOK() @@ -178,7 +179,7 @@ func (o *InternalV1PowervsLocationsTagPostBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -248,7 +249,7 @@ func (o *InternalV1PowervsLocationsTagPostUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -318,7 +319,7 @@ func (o *InternalV1PowervsLocationsTagPostUnprocessableEntity) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -388,7 +389,7 @@ func (o *InternalV1PowervsLocationsTagPostInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go index dca379c280..e2a13cd7b0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go @@ -7,6 +7,7 @@ package internal_power_v_s_locations import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1PowervsLocationsTransitgatewayGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1PowervsLocationsTransitgatewayGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1PowervsLocationsTransitgatewayGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1PowervsLocationsTransitgatewayGetOK() @@ -110,7 +111,7 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetOK) readResponse(response ru o.Payload = new(models.TransitGatewayLocations) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -180,7 +181,7 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -250,7 +251,7 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go index 82b0960b0c..35234de3ee 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go @@ -73,7 +73,7 @@ type ClientService interface { InternalV1StorageRegionsStoragePoolsGet gets the settings for given pool name */ func (a *Client) InternalV1StorageRegionsStoragePoolsGet(params *InternalV1StorageRegionsStoragePoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1StorageRegionsStoragePoolsGetParams() } @@ -93,17 +93,22 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGet(params *InternalV1Stora for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1StorageRegionsStoragePoolsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.storage.regions.storage-pools.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGet(params *InternalV1Stora InternalV1StorageRegionsStoragePoolsGetall gets the current storage pools settings for a region zone */ func (a *Client) InternalV1StorageRegionsStoragePoolsGetall(params *InternalV1StorageRegionsStoragePoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1StorageRegionsStoragePoolsGetallParams() } @@ -132,17 +137,22 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGetall(params *InternalV1St for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1StorageRegionsStoragePoolsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.storage.regions.storage-pools.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGetall(params *InternalV1St InternalV1StorageRegionsStoragePoolsPut updates the settings for given pool name */ func (a *Client) InternalV1StorageRegionsStoragePoolsPut(params *InternalV1StorageRegionsStoragePoolsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1StorageRegionsStoragePoolsPutParams() } @@ -171,17 +181,22 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsPut(params *InternalV1Stora for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1StorageRegionsStoragePoolsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.storage.regions.storage-pools.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -190,7 +205,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsPut(params *InternalV1Stora InternalV1StorageRegionsThresholdsGet gets the current default threshold settings for a region zone */ func (a *Client) InternalV1StorageRegionsThresholdsGet(params *InternalV1StorageRegionsThresholdsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsThresholdsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1StorageRegionsThresholdsGetParams() } @@ -210,17 +225,22 @@ func (a *Client) InternalV1StorageRegionsThresholdsGet(params *InternalV1Storage for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1StorageRegionsThresholdsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.storage.regions.thresholds.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -229,7 +249,7 @@ func (a *Client) InternalV1StorageRegionsThresholdsGet(params *InternalV1Storage InternalV1StorageRegionsThresholdsPut updates a default threshold setting for a region zone */ func (a *Client) InternalV1StorageRegionsThresholdsPut(params *InternalV1StorageRegionsThresholdsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsThresholdsPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1StorageRegionsThresholdsPutParams() } @@ -249,17 +269,22 @@ func (a *Client) InternalV1StorageRegionsThresholdsPut(params *InternalV1Storage for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1StorageRegionsThresholdsPutAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.storage.regions.thresholds.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go index 97315bc5cf..14739ecfe8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go @@ -7,6 +7,7 @@ package internal_storage_regions import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1StorageRegionsStoragePoolsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1StorageRegionsStoragePoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1StorageRegionsStoragePoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1StorageRegionsStoragePoolsGetOK() @@ -120,7 +121,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetOK) GetPayload() models.StorageP func (o *InternalV1StorageRegionsStoragePoolsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go index ce6a4ac29f..94fe013620 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go @@ -7,6 +7,7 @@ package internal_storage_regions import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1StorageRegionsStoragePoolsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1StorageRegionsStoragePoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1StorageRegionsStoragePoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1StorageRegionsStoragePoolsGetallOK() @@ -120,7 +121,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallOK) GetPayload() models.Stora func (o *InternalV1StorageRegionsStoragePoolsGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) readResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go index f2957229b9..f15dd329cb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go @@ -7,6 +7,7 @@ package internal_storage_regions import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1StorageRegionsStoragePoolsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1StorageRegionsStoragePoolsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1StorageRegionsStoragePoolsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1StorageRegionsStoragePoolsPutOK() @@ -128,7 +129,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutOK) readResponse(response runtim o.Payload = new(models.StoragePool) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go index 84e6ef2f2d..cfd038ccf3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go @@ -7,6 +7,7 @@ package internal_storage_regions import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1StorageRegionsThresholdsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1StorageRegionsThresholdsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1StorageRegionsThresholdsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1StorageRegionsThresholdsGetOK() @@ -122,7 +123,7 @@ func (o *InternalV1StorageRegionsThresholdsGetOK) readResponse(response runtime. o.Payload = new(models.Thresholds) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *InternalV1StorageRegionsThresholdsGetForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *InternalV1StorageRegionsThresholdsGetNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go index bdb8682e33..bd76e891c2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go @@ -7,6 +7,7 @@ package internal_storage_regions import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1StorageRegionsThresholdsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1StorageRegionsThresholdsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1StorageRegionsThresholdsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewInternalV1StorageRegionsThresholdsPutAccepted() @@ -79,7 +80,7 @@ func NewInternalV1StorageRegionsThresholdsPutAccepted() *InternalV1StorageRegion /* InternalV1StorageRegionsThresholdsPutAccepted describes a response with status code 202, with default header values. -OK, region-zone default threshold settings update +Accepted, region-zone default threshold settings update */ type InternalV1StorageRegionsThresholdsPutAccepted struct { Payload *models.Thresholds @@ -134,7 +135,7 @@ func (o *InternalV1StorageRegionsThresholdsPutAccepted) readResponse(response ru o.Payload = new(models.Thresholds) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *InternalV1StorageRegionsThresholdsPutBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *InternalV1StorageRegionsThresholdsPutForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *InternalV1StorageRegionsThresholdsPutConflict) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go index 98f09bfb72..3115a39f84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go @@ -65,7 +65,7 @@ type ClientService interface { InternalV1TransitgatewayGet gets the cloud instance transit gateway information */ func (a *Client) InternalV1TransitgatewayGet(params *InternalV1TransitgatewayGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1TransitgatewayGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewInternalV1TransitgatewayGetParams() } @@ -85,17 +85,22 @@ func (a *Client) InternalV1TransitgatewayGet(params *InternalV1TransitgatewayGet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*InternalV1TransitgatewayGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for internal.v1.transitgateway.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go index bfb08462b7..94d1e0eafa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go @@ -7,6 +7,7 @@ package internal_transit_gateway import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type InternalV1TransitgatewayGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *InternalV1TransitgatewayGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *InternalV1TransitgatewayGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewInternalV1TransitgatewayGetOK() @@ -104,7 +105,7 @@ func (o *InternalV1TransitgatewayGetOK) readResponse(response runtime.ClientResp o.Payload = new(models.TransitGatewayInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -174,7 +175,7 @@ func (o *InternalV1TransitgatewayGetForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/network_address_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/network_address_groups_client.go index e2e3af984e..0d293a5815 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/network_address_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/network_address_groups_client.go @@ -77,7 +77,7 @@ type ClientService interface { V1NetworkAddressGroupsGet gets the list of network address groups for a workspace */ func (a *Client) V1NetworkAddressGroupsGet(params *V1NetworkAddressGroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsGetParams() } @@ -97,17 +97,22 @@ func (a *Client) V1NetworkAddressGroupsGet(params *V1NetworkAddressGroupsGetPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -116,7 +121,7 @@ func (a *Client) V1NetworkAddressGroupsGet(params *V1NetworkAddressGroupsGetPara V1NetworkAddressGroupsIDDelete deletes a network address group from a workspace */ func (a *Client) V1NetworkAddressGroupsIDDelete(params *V1NetworkAddressGroupsIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsIDDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsIDDeleteParams() } @@ -136,17 +141,22 @@ func (a *Client) V1NetworkAddressGroupsIDDelete(params *V1NetworkAddressGroupsID for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsIDDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.id.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -155,7 +165,7 @@ func (a *Client) V1NetworkAddressGroupsIDDelete(params *V1NetworkAddressGroupsID V1NetworkAddressGroupsIDGet gets the detail of a network address group */ func (a *Client) V1NetworkAddressGroupsIDGet(params *V1NetworkAddressGroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsIDGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsIDGetParams() } @@ -175,17 +185,22 @@ func (a *Client) V1NetworkAddressGroupsIDGet(params *V1NetworkAddressGroupsIDGet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsIDGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -194,7 +209,7 @@ func (a *Client) V1NetworkAddressGroupsIDGet(params *V1NetworkAddressGroupsIDGet V1NetworkAddressGroupsIDPut updates a network address group */ func (a *Client) V1NetworkAddressGroupsIDPut(params *V1NetworkAddressGroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsIDPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsIDPutParams() } @@ -214,17 +229,22 @@ func (a *Client) V1NetworkAddressGroupsIDPut(params *V1NetworkAddressGroupsIDPut for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsIDPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -233,7 +253,7 @@ func (a *Client) V1NetworkAddressGroupsIDPut(params *V1NetworkAddressGroupsIDPut V1NetworkAddressGroupsMembersDelete deletes the member from a network address group */ func (a *Client) V1NetworkAddressGroupsMembersDelete(params *V1NetworkAddressGroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsMembersDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsMembersDeleteParams() } @@ -253,17 +273,22 @@ func (a *Client) V1NetworkAddressGroupsMembersDelete(params *V1NetworkAddressGro for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsMembersDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.members.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -272,7 +297,7 @@ func (a *Client) V1NetworkAddressGroupsMembersDelete(params *V1NetworkAddressGro V1NetworkAddressGroupsMembersPost adds a member to a network address group */ func (a *Client) V1NetworkAddressGroupsMembersPost(params *V1NetworkAddressGroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsMembersPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsMembersPostParams() } @@ -292,17 +317,22 @@ func (a *Client) V1NetworkAddressGroupsMembersPost(params *V1NetworkAddressGroup for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkAddressGroupsMembersPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkAddressGroups.members.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -311,7 +341,7 @@ func (a *Client) V1NetworkAddressGroupsMembersPost(params *V1NetworkAddressGroup V1NetworkAddressGroupsPost creates a new network address group */ func (a *Client) V1NetworkAddressGroupsPost(params *V1NetworkAddressGroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkAddressGroupsPostOK, *V1NetworkAddressGroupsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkAddressGroupsPostParams() } @@ -331,18 +361,22 @@ func (a *Client) V1NetworkAddressGroupsPost(params *V1NetworkAddressGroupsPostPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *V1NetworkAddressGroupsPostOK: return value, nil, nil case *V1NetworkAddressGroupsPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for network_address_groups: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_get_responses.go index 5716e64c51..11b983210e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_get_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsGetOK() @@ -128,7 +129,7 @@ func (o *V1NetworkAddressGroupsGetOK) readResponse(response runtime.ClientRespon o.Payload = new(models.NetworkAddressGroups) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkAddressGroupsGetBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkAddressGroupsGetUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkAddressGroupsGetForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkAddressGroupsGetNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkAddressGroupsGetInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_delete_responses.go index 9276881351..e8c38c6cfa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_delete_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsIDDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsIDDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworkAddressGroupsIDDeleteOK) GetPayload() models.Object { func (o *V1NetworkAddressGroupsIDDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworkAddressGroupsIDDeleteBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworkAddressGroupsIDDeleteUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworkAddressGroupsIDDeleteForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworkAddressGroupsIDDeleteNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworkAddressGroupsIDDeleteConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworkAddressGroupsIDDeleteInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_get_responses.go index fb0df93bb0..20bfa0ebec 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_get_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsIDGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsIDGetOK() @@ -128,7 +129,7 @@ func (o *V1NetworkAddressGroupsIDGetOK) readResponse(response runtime.ClientResp o.Payload = new(models.NetworkAddressGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkAddressGroupsIDGetBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkAddressGroupsIDGetUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkAddressGroupsIDGetForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkAddressGroupsIDGetNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkAddressGroupsIDGetInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_put_responses.go index 0c86e3a0ff..0443b8bedb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_id_put_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsIDPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsIDPutOK() @@ -128,7 +129,7 @@ func (o *V1NetworkAddressGroupsIDPutOK) readResponse(response runtime.ClientResp o.Payload = new(models.NetworkAddressGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkAddressGroupsIDPutBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkAddressGroupsIDPutUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkAddressGroupsIDPutForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkAddressGroupsIDPutNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkAddressGroupsIDPutInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go index 6105c1f68e..e5a2df0dac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsMembersDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsMembersDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteOK) GetPayload() models.Object { func (o *V1NetworkAddressGroupsMembersDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteConflict) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworkAddressGroupsMembersDeleteInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go index ea8d2ce345..adfa15d2d7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsMembersPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsMembersPostOK() @@ -140,7 +141,7 @@ func (o *V1NetworkAddressGroupsMembersPostOK) readResponse(response runtime.Clie o.Payload = new(models.NetworkAddressGroupMember) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1NetworkAddressGroupsMembersPostBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1NetworkAddressGroupsMembersPostUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1NetworkAddressGroupsMembersPostForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1NetworkAddressGroupsMembersPostNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1NetworkAddressGroupsMembersPostConflict) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1NetworkAddressGroupsMembersPostUnprocessableEntity) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1NetworkAddressGroupsMembersPostInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_post_responses.go index 2a7b9597ad..5d041d879d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_address_groups/v1_network_address_groups_post_responses.go @@ -7,6 +7,7 @@ package network_address_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkAddressGroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkAddressGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkAddressGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkAddressGroupsPostOK() @@ -146,7 +147,7 @@ func (o *V1NetworkAddressGroupsPostOK) readResponse(response runtime.ClientRespo o.Payload = new(models.NetworkAddressGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *V1NetworkAddressGroupsPostCreated) readResponse(response runtime.Client o.Payload = new(models.NetworkAddressGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *V1NetworkAddressGroupsPostBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *V1NetworkAddressGroupsPostUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *V1NetworkAddressGroupsPostForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *V1NetworkAddressGroupsPostNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *V1NetworkAddressGroupsPostConflict) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *V1NetworkAddressGroupsPostUnprocessableEntity) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *V1NetworkAddressGroupsPostInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/network_peers_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/network_peers_client.go index 9ee1ad1f0e..35322e32b6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/network_peers_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/network_peers_client.go @@ -56,28 +56,264 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - V1NetworkPeersList(params *V1NetworkPeersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersListOK, error) + V1NetworkPeersGetall(params *V1NetworkPeersGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersGetallOK, error) + + V1NetworkPeersIDDelete(params *V1NetworkPeersIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDDeleteOK, error) + + V1NetworkPeersIDGet(params *V1NetworkPeersIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDGetOK, error) + + V1NetworkPeersIDPut(params *V1NetworkPeersIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDPutOK, error) + + V1NetworkPeersInterfacesGetall(params *V1NetworkPeersInterfacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersInterfacesGetallOK, error) + + V1NetworkPeersPost(params *V1NetworkPeersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersPostOK, error) + + V1NetworkPeersRouteFilterIDDelete(params *V1NetworkPeersRouteFilterIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFilterIDDeleteOK, error) + + V1NetworkPeersRouteFilterIDGet(params *V1NetworkPeersRouteFilterIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFilterIDGetOK, error) + + V1NetworkPeersRouteFiltersPost(params *V1NetworkPeersRouteFiltersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFiltersPostOK, error) SetTransport(transport runtime.ClientTransport) } /* -V1NetworkPeersList lists all network peers available in the workspace +V1NetworkPeersGetall gets the list of network peers +*/ +func (a *Client) V1NetworkPeersGetall(params *V1NetworkPeersGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersGetallOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersGetallParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.getall", + Method: "GET", + PathPattern: "/v1/network-peers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersGetallReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersGetallOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersIDDelete deletes a network peer +*/ +func (a *Client) V1NetworkPeersIDDelete(params *V1NetworkPeersIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDDeleteOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersIDDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.id.delete", + Method: "DELETE", + PathPattern: "/v1/network-peers/{network_peer_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersIDDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersIDDeleteOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.id.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersIDGet gets the details of a network peer +*/ +func (a *Client) V1NetworkPeersIDGet(params *V1NetworkPeersIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDGetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersIDGetParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.id.get", + Method: "GET", + PathPattern: "/v1/network-peers/{network_peer_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersIDGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersIDGetOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersIDPut updates a network peer +*/ +func (a *Client) V1NetworkPeersIDPut(params *V1NetworkPeersIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersIDPutOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersIDPutParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.id.put", + Method: "PUT", + PathPattern: "/v1/network-peers/{network_peer_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersIDPutReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersIDPutOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersInterfacesGetall gets the list of interfaces for network peer */ -func (a *Client) V1NetworkPeersList(params *V1NetworkPeersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersListOK, error) { - // TODO: Validate the params before sending +func (a *Client) V1NetworkPeersInterfacesGetall(params *V1NetworkPeersInterfacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersInterfacesGetallOK, error) { + // NOTE: parameters are not validated before sending if params == nil { - params = NewV1NetworkPeersListParams() + params = NewV1NetworkPeersInterfacesGetallParams() } op := &runtime.ClientOperation{ - ID: "v1.networkPeers.list", + ID: "v1.networkPeers.interfaces.getall", Method: "GET", + PathPattern: "/v1/network-peers/interfaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersInterfacesGetallReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersInterfacesGetallOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.interfaces.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersPost creates a new network peer +*/ +func (a *Client) V1NetworkPeersPost(params *V1NetworkPeersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersPostOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersPostParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.post", + Method: "POST", PathPattern: "/v1/network-peers", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &V1NetworkPeersListReader{formats: a.formats}, + Reader: &V1NetworkPeersPostReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -85,18 +321,155 @@ func (a *Client) V1NetworkPeersList(params *V1NetworkPeersListParams, authInfo r for _, opt := range opts { opt(op) } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersPostOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} +/* +V1NetworkPeersRouteFilterIDDelete deletes a route filter +*/ +func (a *Client) V1NetworkPeersRouteFilterIDDelete(params *V1NetworkPeersRouteFilterIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFilterIDDeleteOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersRouteFilterIDDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.routeFilter.id.delete", + Method: "DELETE", + PathPattern: "/v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersRouteFilterIDDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } result, err := a.transport.Submit(op) if err != nil { return nil, err } - success, ok := result.(*V1NetworkPeersListOK) + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersRouteFilterIDDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for v1.networkPeers.list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.routeFilter.id.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersRouteFilterIDGet gets the details of a route filter +*/ +func (a *Client) V1NetworkPeersRouteFilterIDGet(params *V1NetworkPeersRouteFilterIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFilterIDGetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersRouteFilterIDGetParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.routeFilter.id.get", + Method: "GET", + PathPattern: "/v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersRouteFilterIDGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersRouteFilterIDGetOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.routeFilter.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NetworkPeersRouteFiltersPost creates a new route filter +*/ +func (a *Client) V1NetworkPeersRouteFiltersPost(params *V1NetworkPeersRouteFiltersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkPeersRouteFiltersPostOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewV1NetworkPeersRouteFiltersPostParams() + } + op := &runtime.ClientOperation{ + ID: "v1.networkPeers.routeFilters.post", + Method: "POST", + PathPattern: "/v1/network-peers/{network_peer_id}/route-filters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1NetworkPeersRouteFiltersPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*V1NetworkPeersRouteFiltersPostOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.networkPeers.routeFilters.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_parameters.go new file mode 100644 index 0000000000..d8a589c636 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersGetallParams creates a new V1NetworkPeersGetallParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersGetallParams() *V1NetworkPeersGetallParams { + return &V1NetworkPeersGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersGetallParamsWithTimeout creates a new V1NetworkPeersGetallParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersGetallParamsWithTimeout(timeout time.Duration) *V1NetworkPeersGetallParams { + return &V1NetworkPeersGetallParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersGetallParamsWithContext creates a new V1NetworkPeersGetallParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersGetallParamsWithContext(ctx context.Context) *V1NetworkPeersGetallParams { + return &V1NetworkPeersGetallParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersGetallParamsWithHTTPClient creates a new V1NetworkPeersGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersGetallParamsWithHTTPClient(client *http.Client) *V1NetworkPeersGetallParams { + return &V1NetworkPeersGetallParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersGetallParams contains all the parameters to send to the API endpoint + + for the v1 network peers getall operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersGetallParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersGetallParams) WithDefaults() *V1NetworkPeersGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) WithTimeout(timeout time.Duration) *V1NetworkPeersGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) WithContext(ctx context.Context) *V1NetworkPeersGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) WithHTTPClient(client *http.Client) *V1NetworkPeersGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers getall params +func (o *V1NetworkPeersGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_responses.go new file mode 100644 index 0000000000..2ac3cef68a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_getall_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersGetallReader is a Reader for the V1NetworkPeersGetall structure. +type V1NetworkPeersGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersGetallConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/network-peers] v1.networkPeers.getall", response, response.Code()) + } +} + +// NewV1NetworkPeersGetallOK creates a V1NetworkPeersGetallOK with default headers values +func NewV1NetworkPeersGetallOK() *V1NetworkPeersGetallOK { + return &V1NetworkPeersGetallOK{} +} + +/* +V1NetworkPeersGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersGetallOK struct { + Payload *models.NetworkPeers +} + +// IsSuccess returns true when this v1 network peers getall o k response has a 2xx status code +func (o *V1NetworkPeersGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers getall o k response has a 3xx status code +func (o *V1NetworkPeersGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall o k response has a 4xx status code +func (o *V1NetworkPeersGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers getall o k response has a 5xx status code +func (o *V1NetworkPeersGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall o k response a status code equal to that given +func (o *V1NetworkPeersGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers getall o k response +func (o *V1NetworkPeersGetallOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersGetallOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallOK %s", 200, payload) +} + +func (o *V1NetworkPeersGetallOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallOK %s", 200, payload) +} + +func (o *V1NetworkPeersGetallOK) GetPayload() *models.NetworkPeers { + return o.Payload +} + +func (o *V1NetworkPeersGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.NetworkPeers) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallBadRequest creates a V1NetworkPeersGetallBadRequest with default headers values +func NewV1NetworkPeersGetallBadRequest() *V1NetworkPeersGetallBadRequest { + return &V1NetworkPeersGetallBadRequest{} +} + +/* +V1NetworkPeersGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall bad request response has a 2xx status code +func (o *V1NetworkPeersGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall bad request response has a 3xx status code +func (o *V1NetworkPeersGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall bad request response has a 4xx status code +func (o *V1NetworkPeersGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers getall bad request response has a 5xx status code +func (o *V1NetworkPeersGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall bad request response a status code equal to that given +func (o *V1NetworkPeersGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers getall bad request response +func (o *V1NetworkPeersGetallBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersGetallBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersGetallBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallUnauthorized creates a V1NetworkPeersGetallUnauthorized with default headers values +func NewV1NetworkPeersGetallUnauthorized() *V1NetworkPeersGetallUnauthorized { + return &V1NetworkPeersGetallUnauthorized{} +} + +/* +V1NetworkPeersGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall unauthorized response has a 2xx status code +func (o *V1NetworkPeersGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall unauthorized response has a 3xx status code +func (o *V1NetworkPeersGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall unauthorized response has a 4xx status code +func (o *V1NetworkPeersGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers getall unauthorized response has a 5xx status code +func (o *V1NetworkPeersGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall unauthorized response a status code equal to that given +func (o *V1NetworkPeersGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers getall unauthorized response +func (o *V1NetworkPeersGetallUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersGetallUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersGetallUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallForbidden creates a V1NetworkPeersGetallForbidden with default headers values +func NewV1NetworkPeersGetallForbidden() *V1NetworkPeersGetallForbidden { + return &V1NetworkPeersGetallForbidden{} +} + +/* +V1NetworkPeersGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall forbidden response has a 2xx status code +func (o *V1NetworkPeersGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall forbidden response has a 3xx status code +func (o *V1NetworkPeersGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall forbidden response has a 4xx status code +func (o *V1NetworkPeersGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers getall forbidden response has a 5xx status code +func (o *V1NetworkPeersGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall forbidden response a status code equal to that given +func (o *V1NetworkPeersGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers getall forbidden response +func (o *V1NetworkPeersGetallForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersGetallForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersGetallForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallNotFound creates a V1NetworkPeersGetallNotFound with default headers values +func NewV1NetworkPeersGetallNotFound() *V1NetworkPeersGetallNotFound { + return &V1NetworkPeersGetallNotFound{} +} + +/* +V1NetworkPeersGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall not found response has a 2xx status code +func (o *V1NetworkPeersGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall not found response has a 3xx status code +func (o *V1NetworkPeersGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall not found response has a 4xx status code +func (o *V1NetworkPeersGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers getall not found response has a 5xx status code +func (o *V1NetworkPeersGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall not found response a status code equal to that given +func (o *V1NetworkPeersGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers getall not found response +func (o *V1NetworkPeersGetallNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersGetallNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersGetallNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallConflict creates a V1NetworkPeersGetallConflict with default headers values +func NewV1NetworkPeersGetallConflict() *V1NetworkPeersGetallConflict { + return &V1NetworkPeersGetallConflict{} +} + +/* +V1NetworkPeersGetallConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersGetallConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall conflict response has a 2xx status code +func (o *V1NetworkPeersGetallConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall conflict response has a 3xx status code +func (o *V1NetworkPeersGetallConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall conflict response has a 4xx status code +func (o *V1NetworkPeersGetallConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers getall conflict response has a 5xx status code +func (o *V1NetworkPeersGetallConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers getall conflict response a status code equal to that given +func (o *V1NetworkPeersGetallConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers getall conflict response +func (o *V1NetworkPeersGetallConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersGetallConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallConflict %s", 409, payload) +} + +func (o *V1NetworkPeersGetallConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallConflict %s", 409, payload) +} + +func (o *V1NetworkPeersGetallConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersGetallInternalServerError creates a V1NetworkPeersGetallInternalServerError with default headers values +func NewV1NetworkPeersGetallInternalServerError() *V1NetworkPeersGetallInternalServerError { + return &V1NetworkPeersGetallInternalServerError{} +} + +/* +V1NetworkPeersGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers getall internal server error response has a 2xx status code +func (o *V1NetworkPeersGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers getall internal server error response has a 3xx status code +func (o *V1NetworkPeersGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers getall internal server error response has a 4xx status code +func (o *V1NetworkPeersGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers getall internal server error response has a 5xx status code +func (o *V1NetworkPeersGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers getall internal server error response a status code equal to that given +func (o *V1NetworkPeersGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers getall internal server error response +func (o *V1NetworkPeersGetallInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersGetallInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersGetallInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersGetallInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersGetallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_parameters.go new file mode 100644 index 0000000000..cc61fd59c4 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersIDDeleteParams creates a new V1NetworkPeersIDDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersIDDeleteParams() *V1NetworkPeersIDDeleteParams { + return &V1NetworkPeersIDDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersIDDeleteParamsWithTimeout creates a new V1NetworkPeersIDDeleteParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersIDDeleteParamsWithTimeout(timeout time.Duration) *V1NetworkPeersIDDeleteParams { + return &V1NetworkPeersIDDeleteParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersIDDeleteParamsWithContext creates a new V1NetworkPeersIDDeleteParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersIDDeleteParamsWithContext(ctx context.Context) *V1NetworkPeersIDDeleteParams { + return &V1NetworkPeersIDDeleteParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersIDDeleteParamsWithHTTPClient creates a new V1NetworkPeersIDDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersIDDeleteParamsWithHTTPClient(client *http.Client) *V1NetworkPeersIDDeleteParams { + return &V1NetworkPeersIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersIDDeleteParams contains all the parameters to send to the API endpoint + + for the v1 network peers id delete operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersIDDeleteParams struct { + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers id delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDDeleteParams) WithDefaults() *V1NetworkPeersIDDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers id delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) WithTimeout(timeout time.Duration) *V1NetworkPeersIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) WithContext(ctx context.Context) *V1NetworkPeersIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) WithHTTPClient(client *http.Client) *V1NetworkPeersIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersIDDeleteParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers id delete params +func (o *V1NetworkPeersIDDeleteParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_responses.go new file mode 100644 index 0000000000..5a0c5f23d9 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_delete_responses.go @@ -0,0 +1,561 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersIDDeleteReader is a Reader for the V1NetworkPeersIDDelete structure. +type V1NetworkPeersIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersIDDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersIDDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersIDDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersIDDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersIDDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersIDDeleteConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersIDDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /v1/network-peers/{network_peer_id}] v1.networkPeers.id.delete", response, response.Code()) + } +} + +// NewV1NetworkPeersIDDeleteOK creates a V1NetworkPeersIDDeleteOK with default headers values +func NewV1NetworkPeersIDDeleteOK() *V1NetworkPeersIDDeleteOK { + return &V1NetworkPeersIDDeleteOK{} +} + +/* +V1NetworkPeersIDDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersIDDeleteOK struct { + Payload models.Object +} + +// IsSuccess returns true when this v1 network peers Id delete o k response has a 2xx status code +func (o *V1NetworkPeersIDDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers Id delete o k response has a 3xx status code +func (o *V1NetworkPeersIDDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete o k response has a 4xx status code +func (o *V1NetworkPeersIDDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id delete o k response has a 5xx status code +func (o *V1NetworkPeersIDDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete o k response a status code equal to that given +func (o *V1NetworkPeersIDDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers Id delete o k response +func (o *V1NetworkPeersIDDeleteOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersIDDeleteOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDDeleteOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDDeleteOK) GetPayload() models.Object { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteBadRequest creates a V1NetworkPeersIDDeleteBadRequest with default headers values +func NewV1NetworkPeersIDDeleteBadRequest() *V1NetworkPeersIDDeleteBadRequest { + return &V1NetworkPeersIDDeleteBadRequest{} +} + +/* +V1NetworkPeersIDDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersIDDeleteBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete bad request response has a 2xx status code +func (o *V1NetworkPeersIDDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete bad request response has a 3xx status code +func (o *V1NetworkPeersIDDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete bad request response has a 4xx status code +func (o *V1NetworkPeersIDDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id delete bad request response has a 5xx status code +func (o *V1NetworkPeersIDDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete bad request response a status code equal to that given +func (o *V1NetworkPeersIDDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers Id delete bad request response +func (o *V1NetworkPeersIDDeleteBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersIDDeleteBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDDeleteBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDDeleteBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteUnauthorized creates a V1NetworkPeersIDDeleteUnauthorized with default headers values +func NewV1NetworkPeersIDDeleteUnauthorized() *V1NetworkPeersIDDeleteUnauthorized { + return &V1NetworkPeersIDDeleteUnauthorized{} +} + +/* +V1NetworkPeersIDDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersIDDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete unauthorized response has a 2xx status code +func (o *V1NetworkPeersIDDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete unauthorized response has a 3xx status code +func (o *V1NetworkPeersIDDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete unauthorized response has a 4xx status code +func (o *V1NetworkPeersIDDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id delete unauthorized response has a 5xx status code +func (o *V1NetworkPeersIDDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete unauthorized response a status code equal to that given +func (o *V1NetworkPeersIDDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers Id delete unauthorized response +func (o *V1NetworkPeersIDDeleteUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersIDDeleteUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDDeleteUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteForbidden creates a V1NetworkPeersIDDeleteForbidden with default headers values +func NewV1NetworkPeersIDDeleteForbidden() *V1NetworkPeersIDDeleteForbidden { + return &V1NetworkPeersIDDeleteForbidden{} +} + +/* +V1NetworkPeersIDDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersIDDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete forbidden response has a 2xx status code +func (o *V1NetworkPeersIDDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete forbidden response has a 3xx status code +func (o *V1NetworkPeersIDDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete forbidden response has a 4xx status code +func (o *V1NetworkPeersIDDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id delete forbidden response has a 5xx status code +func (o *V1NetworkPeersIDDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete forbidden response a status code equal to that given +func (o *V1NetworkPeersIDDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers Id delete forbidden response +func (o *V1NetworkPeersIDDeleteForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersIDDeleteForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDDeleteForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteNotFound creates a V1NetworkPeersIDDeleteNotFound with default headers values +func NewV1NetworkPeersIDDeleteNotFound() *V1NetworkPeersIDDeleteNotFound { + return &V1NetworkPeersIDDeleteNotFound{} +} + +/* +V1NetworkPeersIDDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersIDDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete not found response has a 2xx status code +func (o *V1NetworkPeersIDDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete not found response has a 3xx status code +func (o *V1NetworkPeersIDDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete not found response has a 4xx status code +func (o *V1NetworkPeersIDDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id delete not found response has a 5xx status code +func (o *V1NetworkPeersIDDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete not found response a status code equal to that given +func (o *V1NetworkPeersIDDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers Id delete not found response +func (o *V1NetworkPeersIDDeleteNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersIDDeleteNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDDeleteNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteConflict creates a V1NetworkPeersIDDeleteConflict with default headers values +func NewV1NetworkPeersIDDeleteConflict() *V1NetworkPeersIDDeleteConflict { + return &V1NetworkPeersIDDeleteConflict{} +} + +/* +V1NetworkPeersIDDeleteConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersIDDeleteConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete conflict response has a 2xx status code +func (o *V1NetworkPeersIDDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete conflict response has a 3xx status code +func (o *V1NetworkPeersIDDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete conflict response has a 4xx status code +func (o *V1NetworkPeersIDDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id delete conflict response has a 5xx status code +func (o *V1NetworkPeersIDDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id delete conflict response a status code equal to that given +func (o *V1NetworkPeersIDDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers Id delete conflict response +func (o *V1NetworkPeersIDDeleteConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersIDDeleteConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDDeleteConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDDeleteConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDDeleteInternalServerError creates a V1NetworkPeersIDDeleteInternalServerError with default headers values +func NewV1NetworkPeersIDDeleteInternalServerError() *V1NetworkPeersIDDeleteInternalServerError { + return &V1NetworkPeersIDDeleteInternalServerError{} +} + +/* +V1NetworkPeersIDDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersIDDeleteInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id delete internal server error response has a 2xx status code +func (o *V1NetworkPeersIDDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id delete internal server error response has a 3xx status code +func (o *V1NetworkPeersIDDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id delete internal server error response has a 4xx status code +func (o *V1NetworkPeersIDDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id delete internal server error response has a 5xx status code +func (o *V1NetworkPeersIDDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers Id delete internal server error response a status code equal to that given +func (o *V1NetworkPeersIDDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers Id delete internal server error response +func (o *V1NetworkPeersIDDeleteInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersIDDeleteInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDDeleteInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdDeleteInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDDeleteInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_parameters.go new file mode 100644 index 0000000000..c81b40cad9 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersIDGetParams creates a new V1NetworkPeersIDGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersIDGetParams() *V1NetworkPeersIDGetParams { + return &V1NetworkPeersIDGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersIDGetParamsWithTimeout creates a new V1NetworkPeersIDGetParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersIDGetParamsWithTimeout(timeout time.Duration) *V1NetworkPeersIDGetParams { + return &V1NetworkPeersIDGetParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersIDGetParamsWithContext creates a new V1NetworkPeersIDGetParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersIDGetParamsWithContext(ctx context.Context) *V1NetworkPeersIDGetParams { + return &V1NetworkPeersIDGetParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersIDGetParamsWithHTTPClient creates a new V1NetworkPeersIDGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersIDGetParamsWithHTTPClient(client *http.Client) *V1NetworkPeersIDGetParams { + return &V1NetworkPeersIDGetParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersIDGetParams contains all the parameters to send to the API endpoint + + for the v1 network peers id get operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersIDGetParams struct { + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDGetParams) WithDefaults() *V1NetworkPeersIDGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) WithTimeout(timeout time.Duration) *V1NetworkPeersIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) WithContext(ctx context.Context) *V1NetworkPeersIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) WithHTTPClient(client *http.Client) *V1NetworkPeersIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersIDGetParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers id get params +func (o *V1NetworkPeersIDGetParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_responses.go new file mode 100644 index 0000000000..22f3ee0e38 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_get_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersIDGetReader is a Reader for the V1NetworkPeersIDGet structure. +type V1NetworkPeersIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersIDGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersIDGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersIDGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersIDGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersIDGetConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersIDGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/network-peers/{network_peer_id}] v1.networkPeers.id.get", response, response.Code()) + } +} + +// NewV1NetworkPeersIDGetOK creates a V1NetworkPeersIDGetOK with default headers values +func NewV1NetworkPeersIDGetOK() *V1NetworkPeersIDGetOK { + return &V1NetworkPeersIDGetOK{} +} + +/* +V1NetworkPeersIDGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersIDGetOK struct { + Payload *models.NetworkPeer +} + +// IsSuccess returns true when this v1 network peers Id get o k response has a 2xx status code +func (o *V1NetworkPeersIDGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers Id get o k response has a 3xx status code +func (o *V1NetworkPeersIDGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get o k response has a 4xx status code +func (o *V1NetworkPeersIDGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id get o k response has a 5xx status code +func (o *V1NetworkPeersIDGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get o k response a status code equal to that given +func (o *V1NetworkPeersIDGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers Id get o k response +func (o *V1NetworkPeersIDGetOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersIDGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDGetOK) GetPayload() *models.NetworkPeer { + return o.Payload +} + +func (o *V1NetworkPeersIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.NetworkPeer) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetBadRequest creates a V1NetworkPeersIDGetBadRequest with default headers values +func NewV1NetworkPeersIDGetBadRequest() *V1NetworkPeersIDGetBadRequest { + return &V1NetworkPeersIDGetBadRequest{} +} + +/* +V1NetworkPeersIDGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersIDGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get bad request response has a 2xx status code +func (o *V1NetworkPeersIDGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get bad request response has a 3xx status code +func (o *V1NetworkPeersIDGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get bad request response has a 4xx status code +func (o *V1NetworkPeersIDGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id get bad request response has a 5xx status code +func (o *V1NetworkPeersIDGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get bad request response a status code equal to that given +func (o *V1NetworkPeersIDGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers Id get bad request response +func (o *V1NetworkPeersIDGetBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersIDGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetUnauthorized creates a V1NetworkPeersIDGetUnauthorized with default headers values +func NewV1NetworkPeersIDGetUnauthorized() *V1NetworkPeersIDGetUnauthorized { + return &V1NetworkPeersIDGetUnauthorized{} +} + +/* +V1NetworkPeersIDGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersIDGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get unauthorized response has a 2xx status code +func (o *V1NetworkPeersIDGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get unauthorized response has a 3xx status code +func (o *V1NetworkPeersIDGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get unauthorized response has a 4xx status code +func (o *V1NetworkPeersIDGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id get unauthorized response has a 5xx status code +func (o *V1NetworkPeersIDGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get unauthorized response a status code equal to that given +func (o *V1NetworkPeersIDGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers Id get unauthorized response +func (o *V1NetworkPeersIDGetUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersIDGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetForbidden creates a V1NetworkPeersIDGetForbidden with default headers values +func NewV1NetworkPeersIDGetForbidden() *V1NetworkPeersIDGetForbidden { + return &V1NetworkPeersIDGetForbidden{} +} + +/* +V1NetworkPeersIDGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersIDGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get forbidden response has a 2xx status code +func (o *V1NetworkPeersIDGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get forbidden response has a 3xx status code +func (o *V1NetworkPeersIDGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get forbidden response has a 4xx status code +func (o *V1NetworkPeersIDGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id get forbidden response has a 5xx status code +func (o *V1NetworkPeersIDGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get forbidden response a status code equal to that given +func (o *V1NetworkPeersIDGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers Id get forbidden response +func (o *V1NetworkPeersIDGetForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersIDGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetNotFound creates a V1NetworkPeersIDGetNotFound with default headers values +func NewV1NetworkPeersIDGetNotFound() *V1NetworkPeersIDGetNotFound { + return &V1NetworkPeersIDGetNotFound{} +} + +/* +V1NetworkPeersIDGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersIDGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get not found response has a 2xx status code +func (o *V1NetworkPeersIDGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get not found response has a 3xx status code +func (o *V1NetworkPeersIDGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get not found response has a 4xx status code +func (o *V1NetworkPeersIDGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id get not found response has a 5xx status code +func (o *V1NetworkPeersIDGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get not found response a status code equal to that given +func (o *V1NetworkPeersIDGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers Id get not found response +func (o *V1NetworkPeersIDGetNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersIDGetNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDGetNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetConflict creates a V1NetworkPeersIDGetConflict with default headers values +func NewV1NetworkPeersIDGetConflict() *V1NetworkPeersIDGetConflict { + return &V1NetworkPeersIDGetConflict{} +} + +/* +V1NetworkPeersIDGetConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersIDGetConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get conflict response has a 2xx status code +func (o *V1NetworkPeersIDGetConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get conflict response has a 3xx status code +func (o *V1NetworkPeersIDGetConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get conflict response has a 4xx status code +func (o *V1NetworkPeersIDGetConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id get conflict response has a 5xx status code +func (o *V1NetworkPeersIDGetConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id get conflict response a status code equal to that given +func (o *V1NetworkPeersIDGetConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers Id get conflict response +func (o *V1NetworkPeersIDGetConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersIDGetConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDGetConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDGetConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDGetInternalServerError creates a V1NetworkPeersIDGetInternalServerError with default headers values +func NewV1NetworkPeersIDGetInternalServerError() *V1NetworkPeersIDGetInternalServerError { + return &V1NetworkPeersIDGetInternalServerError{} +} + +/* +V1NetworkPeersIDGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersIDGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id get internal server error response has a 2xx status code +func (o *V1NetworkPeersIDGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id get internal server error response has a 3xx status code +func (o *V1NetworkPeersIDGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id get internal server error response has a 4xx status code +func (o *V1NetworkPeersIDGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id get internal server error response has a 5xx status code +func (o *V1NetworkPeersIDGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers Id get internal server error response a status code equal to that given +func (o *V1NetworkPeersIDGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers Id get internal server error response +func (o *V1NetworkPeersIDGetInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersIDGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdGetInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_parameters.go new file mode 100644 index 0000000000..34ee818d28 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1NetworkPeersIDPutParams creates a new V1NetworkPeersIDPutParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersIDPutParams() *V1NetworkPeersIDPutParams { + return &V1NetworkPeersIDPutParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersIDPutParamsWithTimeout creates a new V1NetworkPeersIDPutParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersIDPutParamsWithTimeout(timeout time.Duration) *V1NetworkPeersIDPutParams { + return &V1NetworkPeersIDPutParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersIDPutParamsWithContext creates a new V1NetworkPeersIDPutParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersIDPutParamsWithContext(ctx context.Context) *V1NetworkPeersIDPutParams { + return &V1NetworkPeersIDPutParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersIDPutParamsWithHTTPClient creates a new V1NetworkPeersIDPutParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersIDPutParamsWithHTTPClient(client *http.Client) *V1NetworkPeersIDPutParams { + return &V1NetworkPeersIDPutParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersIDPutParams contains all the parameters to send to the API endpoint + + for the v1 network peers id put operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersIDPutParams struct { + + /* Body. + + network peer update parameters + */ + Body *models.NetworkPeerUpdate + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers id put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDPutParams) WithDefaults() *V1NetworkPeersIDPutParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers id put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersIDPutParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) WithTimeout(timeout time.Duration) *V1NetworkPeersIDPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) WithContext(ctx context.Context) *V1NetworkPeersIDPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) WithHTTPClient(client *http.Client) *V1NetworkPeersIDPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) WithBody(body *models.NetworkPeerUpdate) *V1NetworkPeersIDPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) SetBody(body *models.NetworkPeerUpdate) { + o.Body = body +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersIDPutParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers id put params +func (o *V1NetworkPeersIDPutParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersIDPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_responses.go new file mode 100644 index 0000000000..f0066a9d5c --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_id_put_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersIDPutReader is a Reader for the V1NetworkPeersIDPut structure. +type V1NetworkPeersIDPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersIDPutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersIDPutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersIDPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersIDPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersIDPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersIDPutConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersIDPutInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PUT /v1/network-peers/{network_peer_id}] v1.networkPeers.id.put", response, response.Code()) + } +} + +// NewV1NetworkPeersIDPutOK creates a V1NetworkPeersIDPutOK with default headers values +func NewV1NetworkPeersIDPutOK() *V1NetworkPeersIDPutOK { + return &V1NetworkPeersIDPutOK{} +} + +/* +V1NetworkPeersIDPutOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersIDPutOK struct { + Payload *models.NetworkPeer +} + +// IsSuccess returns true when this v1 network peers Id put o k response has a 2xx status code +func (o *V1NetworkPeersIDPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers Id put o k response has a 3xx status code +func (o *V1NetworkPeersIDPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put o k response has a 4xx status code +func (o *V1NetworkPeersIDPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id put o k response has a 5xx status code +func (o *V1NetworkPeersIDPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put o k response a status code equal to that given +func (o *V1NetworkPeersIDPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers Id put o k response +func (o *V1NetworkPeersIDPutOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersIDPutOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDPutOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutOK %s", 200, payload) +} + +func (o *V1NetworkPeersIDPutOK) GetPayload() *models.NetworkPeer { + return o.Payload +} + +func (o *V1NetworkPeersIDPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.NetworkPeer) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutBadRequest creates a V1NetworkPeersIDPutBadRequest with default headers values +func NewV1NetworkPeersIDPutBadRequest() *V1NetworkPeersIDPutBadRequest { + return &V1NetworkPeersIDPutBadRequest{} +} + +/* +V1NetworkPeersIDPutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersIDPutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put bad request response has a 2xx status code +func (o *V1NetworkPeersIDPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put bad request response has a 3xx status code +func (o *V1NetworkPeersIDPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put bad request response has a 4xx status code +func (o *V1NetworkPeersIDPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id put bad request response has a 5xx status code +func (o *V1NetworkPeersIDPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put bad request response a status code equal to that given +func (o *V1NetworkPeersIDPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers Id put bad request response +func (o *V1NetworkPeersIDPutBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersIDPutBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDPutBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersIDPutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutUnauthorized creates a V1NetworkPeersIDPutUnauthorized with default headers values +func NewV1NetworkPeersIDPutUnauthorized() *V1NetworkPeersIDPutUnauthorized { + return &V1NetworkPeersIDPutUnauthorized{} +} + +/* +V1NetworkPeersIDPutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersIDPutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put unauthorized response has a 2xx status code +func (o *V1NetworkPeersIDPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put unauthorized response has a 3xx status code +func (o *V1NetworkPeersIDPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put unauthorized response has a 4xx status code +func (o *V1NetworkPeersIDPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id put unauthorized response has a 5xx status code +func (o *V1NetworkPeersIDPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put unauthorized response a status code equal to that given +func (o *V1NetworkPeersIDPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers Id put unauthorized response +func (o *V1NetworkPeersIDPutUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersIDPutUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDPutUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersIDPutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutForbidden creates a V1NetworkPeersIDPutForbidden with default headers values +func NewV1NetworkPeersIDPutForbidden() *V1NetworkPeersIDPutForbidden { + return &V1NetworkPeersIDPutForbidden{} +} + +/* +V1NetworkPeersIDPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersIDPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put forbidden response has a 2xx status code +func (o *V1NetworkPeersIDPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put forbidden response has a 3xx status code +func (o *V1NetworkPeersIDPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put forbidden response has a 4xx status code +func (o *V1NetworkPeersIDPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id put forbidden response has a 5xx status code +func (o *V1NetworkPeersIDPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put forbidden response a status code equal to that given +func (o *V1NetworkPeersIDPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers Id put forbidden response +func (o *V1NetworkPeersIDPutForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersIDPutForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDPutForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersIDPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutNotFound creates a V1NetworkPeersIDPutNotFound with default headers values +func NewV1NetworkPeersIDPutNotFound() *V1NetworkPeersIDPutNotFound { + return &V1NetworkPeersIDPutNotFound{} +} + +/* +V1NetworkPeersIDPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersIDPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put not found response has a 2xx status code +func (o *V1NetworkPeersIDPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put not found response has a 3xx status code +func (o *V1NetworkPeersIDPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put not found response has a 4xx status code +func (o *V1NetworkPeersIDPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id put not found response has a 5xx status code +func (o *V1NetworkPeersIDPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put not found response a status code equal to that given +func (o *V1NetworkPeersIDPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers Id put not found response +func (o *V1NetworkPeersIDPutNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersIDPutNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDPutNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersIDPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutConflict creates a V1NetworkPeersIDPutConflict with default headers values +func NewV1NetworkPeersIDPutConflict() *V1NetworkPeersIDPutConflict { + return &V1NetworkPeersIDPutConflict{} +} + +/* +V1NetworkPeersIDPutConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersIDPutConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put conflict response has a 2xx status code +func (o *V1NetworkPeersIDPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put conflict response has a 3xx status code +func (o *V1NetworkPeersIDPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put conflict response has a 4xx status code +func (o *V1NetworkPeersIDPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers Id put conflict response has a 5xx status code +func (o *V1NetworkPeersIDPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers Id put conflict response a status code equal to that given +func (o *V1NetworkPeersIDPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers Id put conflict response +func (o *V1NetworkPeersIDPutConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersIDPutConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDPutConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutConflict %s", 409, payload) +} + +func (o *V1NetworkPeersIDPutConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersIDPutInternalServerError creates a V1NetworkPeersIDPutInternalServerError with default headers values +func NewV1NetworkPeersIDPutInternalServerError() *V1NetworkPeersIDPutInternalServerError { + return &V1NetworkPeersIDPutInternalServerError{} +} + +/* +V1NetworkPeersIDPutInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersIDPutInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers Id put internal server error response has a 2xx status code +func (o *V1NetworkPeersIDPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers Id put internal server error response has a 3xx status code +func (o *V1NetworkPeersIDPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers Id put internal server error response has a 4xx status code +func (o *V1NetworkPeersIDPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers Id put internal server error response has a 5xx status code +func (o *V1NetworkPeersIDPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers Id put internal server error response a status code equal to that given +func (o *V1NetworkPeersIDPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers Id put internal server error response +func (o *V1NetworkPeersIDPutInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersIDPutInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDPutInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/network-peers/{network_peer_id}][%d] v1NetworkPeersIdPutInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersIDPutInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersIDPutInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_parameters.go new file mode 100644 index 0000000000..8b052c10aa --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersInterfacesGetallParams creates a new V1NetworkPeersInterfacesGetallParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersInterfacesGetallParams() *V1NetworkPeersInterfacesGetallParams { + return &V1NetworkPeersInterfacesGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersInterfacesGetallParamsWithTimeout creates a new V1NetworkPeersInterfacesGetallParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersInterfacesGetallParamsWithTimeout(timeout time.Duration) *V1NetworkPeersInterfacesGetallParams { + return &V1NetworkPeersInterfacesGetallParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersInterfacesGetallParamsWithContext creates a new V1NetworkPeersInterfacesGetallParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersInterfacesGetallParamsWithContext(ctx context.Context) *V1NetworkPeersInterfacesGetallParams { + return &V1NetworkPeersInterfacesGetallParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersInterfacesGetallParamsWithHTTPClient creates a new V1NetworkPeersInterfacesGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersInterfacesGetallParamsWithHTTPClient(client *http.Client) *V1NetworkPeersInterfacesGetallParams { + return &V1NetworkPeersInterfacesGetallParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersInterfacesGetallParams contains all the parameters to send to the API endpoint + + for the v1 network peers interfaces getall operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersInterfacesGetallParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers interfaces getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersInterfacesGetallParams) WithDefaults() *V1NetworkPeersInterfacesGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers interfaces getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersInterfacesGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) WithTimeout(timeout time.Duration) *V1NetworkPeersInterfacesGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) WithContext(ctx context.Context) *V1NetworkPeersInterfacesGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) WithHTTPClient(client *http.Client) *V1NetworkPeersInterfacesGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers interfaces getall params +func (o *V1NetworkPeersInterfacesGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersInterfacesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_responses.go new file mode 100644 index 0000000000..7b2a0f4b27 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_interfaces_getall_responses.go @@ -0,0 +1,561 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersInterfacesGetallReader is a Reader for the V1NetworkPeersInterfacesGetall structure. +type V1NetworkPeersInterfacesGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersInterfacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersInterfacesGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersInterfacesGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersInterfacesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersInterfacesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersInterfacesGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersInterfacesGetallConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersInterfacesGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/network-peers/interfaces] v1.networkPeers.interfaces.getall", response, response.Code()) + } +} + +// NewV1NetworkPeersInterfacesGetallOK creates a V1NetworkPeersInterfacesGetallOK with default headers values +func NewV1NetworkPeersInterfacesGetallOK() *V1NetworkPeersInterfacesGetallOK { + return &V1NetworkPeersInterfacesGetallOK{} +} + +/* +V1NetworkPeersInterfacesGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersInterfacesGetallOK struct { + Payload models.PeerInterfaces +} + +// IsSuccess returns true when this v1 network peers interfaces getall o k response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers interfaces getall o k response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall o k response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers interfaces getall o k response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall o k response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers interfaces getall o k response +func (o *V1NetworkPeersInterfacesGetallOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersInterfacesGetallOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallOK %s", 200, payload) +} + +func (o *V1NetworkPeersInterfacesGetallOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallOK %s", 200, payload) +} + +func (o *V1NetworkPeersInterfacesGetallOK) GetPayload() models.PeerInterfaces { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallBadRequest creates a V1NetworkPeersInterfacesGetallBadRequest with default headers values +func NewV1NetworkPeersInterfacesGetallBadRequest() *V1NetworkPeersInterfacesGetallBadRequest { + return &V1NetworkPeersInterfacesGetallBadRequest{} +} + +/* +V1NetworkPeersInterfacesGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersInterfacesGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall bad request response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall bad request response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall bad request response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers interfaces getall bad request response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall bad request response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers interfaces getall bad request response +func (o *V1NetworkPeersInterfacesGetallBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersInterfacesGetallBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersInterfacesGetallBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersInterfacesGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallUnauthorized creates a V1NetworkPeersInterfacesGetallUnauthorized with default headers values +func NewV1NetworkPeersInterfacesGetallUnauthorized() *V1NetworkPeersInterfacesGetallUnauthorized { + return &V1NetworkPeersInterfacesGetallUnauthorized{} +} + +/* +V1NetworkPeersInterfacesGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersInterfacesGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall unauthorized response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall unauthorized response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall unauthorized response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers interfaces getall unauthorized response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall unauthorized response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers interfaces getall unauthorized response +func (o *V1NetworkPeersInterfacesGetallUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersInterfacesGetallUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersInterfacesGetallUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersInterfacesGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallForbidden creates a V1NetworkPeersInterfacesGetallForbidden with default headers values +func NewV1NetworkPeersInterfacesGetallForbidden() *V1NetworkPeersInterfacesGetallForbidden { + return &V1NetworkPeersInterfacesGetallForbidden{} +} + +/* +V1NetworkPeersInterfacesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersInterfacesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall forbidden response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall forbidden response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall forbidden response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers interfaces getall forbidden response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall forbidden response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers interfaces getall forbidden response +func (o *V1NetworkPeersInterfacesGetallForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersInterfacesGetallForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersInterfacesGetallForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersInterfacesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallNotFound creates a V1NetworkPeersInterfacesGetallNotFound with default headers values +func NewV1NetworkPeersInterfacesGetallNotFound() *V1NetworkPeersInterfacesGetallNotFound { + return &V1NetworkPeersInterfacesGetallNotFound{} +} + +/* +V1NetworkPeersInterfacesGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersInterfacesGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall not found response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall not found response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall not found response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers interfaces getall not found response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall not found response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers interfaces getall not found response +func (o *V1NetworkPeersInterfacesGetallNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersInterfacesGetallNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersInterfacesGetallNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersInterfacesGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallConflict creates a V1NetworkPeersInterfacesGetallConflict with default headers values +func NewV1NetworkPeersInterfacesGetallConflict() *V1NetworkPeersInterfacesGetallConflict { + return &V1NetworkPeersInterfacesGetallConflict{} +} + +/* +V1NetworkPeersInterfacesGetallConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersInterfacesGetallConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall conflict response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall conflict response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall conflict response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers interfaces getall conflict response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers interfaces getall conflict response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers interfaces getall conflict response +func (o *V1NetworkPeersInterfacesGetallConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersInterfacesGetallConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallConflict %s", 409, payload) +} + +func (o *V1NetworkPeersInterfacesGetallConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallConflict %s", 409, payload) +} + +func (o *V1NetworkPeersInterfacesGetallConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersInterfacesGetallInternalServerError creates a V1NetworkPeersInterfacesGetallInternalServerError with default headers values +func NewV1NetworkPeersInterfacesGetallInternalServerError() *V1NetworkPeersInterfacesGetallInternalServerError { + return &V1NetworkPeersInterfacesGetallInternalServerError{} +} + +/* +V1NetworkPeersInterfacesGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersInterfacesGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers interfaces getall internal server error response has a 2xx status code +func (o *V1NetworkPeersInterfacesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers interfaces getall internal server error response has a 3xx status code +func (o *V1NetworkPeersInterfacesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers interfaces getall internal server error response has a 4xx status code +func (o *V1NetworkPeersInterfacesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers interfaces getall internal server error response has a 5xx status code +func (o *V1NetworkPeersInterfacesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers interfaces getall internal server error response a status code equal to that given +func (o *V1NetworkPeersInterfacesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers interfaces getall internal server error response +func (o *V1NetworkPeersInterfacesGetallInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersInterfacesGetallInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersInterfacesGetallInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/interfaces][%d] v1NetworkPeersInterfacesGetallInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersInterfacesGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersInterfacesGetallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_parameters.go deleted file mode 100644 index d1f16af621..0000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network_peers - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewV1NetworkPeersListParams creates a new V1NetworkPeersListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewV1NetworkPeersListParams() *V1NetworkPeersListParams { - return &V1NetworkPeersListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewV1NetworkPeersListParamsWithTimeout creates a new V1NetworkPeersListParams object -// with the ability to set a timeout on a request. -func NewV1NetworkPeersListParamsWithTimeout(timeout time.Duration) *V1NetworkPeersListParams { - return &V1NetworkPeersListParams{ - timeout: timeout, - } -} - -// NewV1NetworkPeersListParamsWithContext creates a new V1NetworkPeersListParams object -// with the ability to set a context for a request. -func NewV1NetworkPeersListParamsWithContext(ctx context.Context) *V1NetworkPeersListParams { - return &V1NetworkPeersListParams{ - Context: ctx, - } -} - -// NewV1NetworkPeersListParamsWithHTTPClient creates a new V1NetworkPeersListParams object -// with the ability to set a custom HTTPClient for a request. -func NewV1NetworkPeersListParamsWithHTTPClient(client *http.Client) *V1NetworkPeersListParams { - return &V1NetworkPeersListParams{ - HTTPClient: client, - } -} - -/* -V1NetworkPeersListParams contains all the parameters to send to the API endpoint - - for the v1 network peers list operation. - - Typically these are written to a http.Request. -*/ -type V1NetworkPeersListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the v1 network peers list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1NetworkPeersListParams) WithDefaults() *V1NetworkPeersListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the v1 network peers list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *V1NetworkPeersListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the v1 network peers list params -func (o *V1NetworkPeersListParams) WithTimeout(timeout time.Duration) *V1NetworkPeersListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the v1 network peers list params -func (o *V1NetworkPeersListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the v1 network peers list params -func (o *V1NetworkPeersListParams) WithContext(ctx context.Context) *V1NetworkPeersListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the v1 network peers list params -func (o *V1NetworkPeersListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the v1 network peers list params -func (o *V1NetworkPeersListParams) WithHTTPClient(client *http.Client) *V1NetworkPeersListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the v1 network peers list params -func (o *V1NetworkPeersListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *V1NetworkPeersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_responses.go deleted file mode 100644 index 63349c8776..0000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_list_responses.go +++ /dev/null @@ -1,486 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network_peers - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// V1NetworkPeersListReader is a Reader for the V1NetworkPeersList structure. -type V1NetworkPeersListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *V1NetworkPeersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewV1NetworkPeersListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewV1NetworkPeersListBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewV1NetworkPeersListUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewV1NetworkPeersListForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewV1NetworkPeersListNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewV1NetworkPeersListInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /v1/network-peers] v1.networkPeers.list", response, response.Code()) - } -} - -// NewV1NetworkPeersListOK creates a V1NetworkPeersListOK with default headers values -func NewV1NetworkPeersListOK() *V1NetworkPeersListOK { - return &V1NetworkPeersListOK{} -} - -/* -V1NetworkPeersListOK describes a response with status code 200, with default header values. - -OK -*/ -type V1NetworkPeersListOK struct { - Payload *models.NetworkPeers -} - -// IsSuccess returns true when this v1 network peers list o k response has a 2xx status code -func (o *V1NetworkPeersListOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this v1 network peers list o k response has a 3xx status code -func (o *V1NetworkPeersListOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list o k response has a 4xx status code -func (o *V1NetworkPeersListOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 network peers list o k response has a 5xx status code -func (o *V1NetworkPeersListOK) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 network peers list o k response a status code equal to that given -func (o *V1NetworkPeersListOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the v1 network peers list o k response -func (o *V1NetworkPeersListOK) Code() int { - return 200 -} - -func (o *V1NetworkPeersListOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListOK %s", 200, payload) -} - -func (o *V1NetworkPeersListOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListOK %s", 200, payload) -} - -func (o *V1NetworkPeersListOK) GetPayload() *models.NetworkPeers { - return o.Payload -} - -func (o *V1NetworkPeersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.NetworkPeers) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1NetworkPeersListBadRequest creates a V1NetworkPeersListBadRequest with default headers values -func NewV1NetworkPeersListBadRequest() *V1NetworkPeersListBadRequest { - return &V1NetworkPeersListBadRequest{} -} - -/* -V1NetworkPeersListBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type V1NetworkPeersListBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 network peers list bad request response has a 2xx status code -func (o *V1NetworkPeersListBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 network peers list bad request response has a 3xx status code -func (o *V1NetworkPeersListBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list bad request response has a 4xx status code -func (o *V1NetworkPeersListBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 network peers list bad request response has a 5xx status code -func (o *V1NetworkPeersListBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 network peers list bad request response a status code equal to that given -func (o *V1NetworkPeersListBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the v1 network peers list bad request response -func (o *V1NetworkPeersListBadRequest) Code() int { - return 400 -} - -func (o *V1NetworkPeersListBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListBadRequest %s", 400, payload) -} - -func (o *V1NetworkPeersListBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListBadRequest %s", 400, payload) -} - -func (o *V1NetworkPeersListBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1NetworkPeersListBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1NetworkPeersListUnauthorized creates a V1NetworkPeersListUnauthorized with default headers values -func NewV1NetworkPeersListUnauthorized() *V1NetworkPeersListUnauthorized { - return &V1NetworkPeersListUnauthorized{} -} - -/* -V1NetworkPeersListUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type V1NetworkPeersListUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 network peers list unauthorized response has a 2xx status code -func (o *V1NetworkPeersListUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 network peers list unauthorized response has a 3xx status code -func (o *V1NetworkPeersListUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list unauthorized response has a 4xx status code -func (o *V1NetworkPeersListUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 network peers list unauthorized response has a 5xx status code -func (o *V1NetworkPeersListUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 network peers list unauthorized response a status code equal to that given -func (o *V1NetworkPeersListUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the v1 network peers list unauthorized response -func (o *V1NetworkPeersListUnauthorized) Code() int { - return 401 -} - -func (o *V1NetworkPeersListUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListUnauthorized %s", 401, payload) -} - -func (o *V1NetworkPeersListUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListUnauthorized %s", 401, payload) -} - -func (o *V1NetworkPeersListUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1NetworkPeersListUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1NetworkPeersListForbidden creates a V1NetworkPeersListForbidden with default headers values -func NewV1NetworkPeersListForbidden() *V1NetworkPeersListForbidden { - return &V1NetworkPeersListForbidden{} -} - -/* -V1NetworkPeersListForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type V1NetworkPeersListForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 network peers list forbidden response has a 2xx status code -func (o *V1NetworkPeersListForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 network peers list forbidden response has a 3xx status code -func (o *V1NetworkPeersListForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list forbidden response has a 4xx status code -func (o *V1NetworkPeersListForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 network peers list forbidden response has a 5xx status code -func (o *V1NetworkPeersListForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 network peers list forbidden response a status code equal to that given -func (o *V1NetworkPeersListForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the v1 network peers list forbidden response -func (o *V1NetworkPeersListForbidden) Code() int { - return 403 -} - -func (o *V1NetworkPeersListForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListForbidden %s", 403, payload) -} - -func (o *V1NetworkPeersListForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListForbidden %s", 403, payload) -} - -func (o *V1NetworkPeersListForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1NetworkPeersListForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1NetworkPeersListNotFound creates a V1NetworkPeersListNotFound with default headers values -func NewV1NetworkPeersListNotFound() *V1NetworkPeersListNotFound { - return &V1NetworkPeersListNotFound{} -} - -/* -V1NetworkPeersListNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type V1NetworkPeersListNotFound struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 network peers list not found response has a 2xx status code -func (o *V1NetworkPeersListNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 network peers list not found response has a 3xx status code -func (o *V1NetworkPeersListNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list not found response has a 4xx status code -func (o *V1NetworkPeersListNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this v1 network peers list not found response has a 5xx status code -func (o *V1NetworkPeersListNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this v1 network peers list not found response a status code equal to that given -func (o *V1NetworkPeersListNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the v1 network peers list not found response -func (o *V1NetworkPeersListNotFound) Code() int { - return 404 -} - -func (o *V1NetworkPeersListNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListNotFound %s", 404, payload) -} - -func (o *V1NetworkPeersListNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListNotFound %s", 404, payload) -} - -func (o *V1NetworkPeersListNotFound) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1NetworkPeersListNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewV1NetworkPeersListInternalServerError creates a V1NetworkPeersListInternalServerError with default headers values -func NewV1NetworkPeersListInternalServerError() *V1NetworkPeersListInternalServerError { - return &V1NetworkPeersListInternalServerError{} -} - -/* -V1NetworkPeersListInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type V1NetworkPeersListInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this v1 network peers list internal server error response has a 2xx status code -func (o *V1NetworkPeersListInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this v1 network peers list internal server error response has a 3xx status code -func (o *V1NetworkPeersListInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this v1 network peers list internal server error response has a 4xx status code -func (o *V1NetworkPeersListInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this v1 network peers list internal server error response has a 5xx status code -func (o *V1NetworkPeersListInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this v1 network peers list internal server error response a status code equal to that given -func (o *V1NetworkPeersListInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the v1 network peers list internal server error response -func (o *V1NetworkPeersListInternalServerError) Code() int { - return 500 -} - -func (o *V1NetworkPeersListInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListInternalServerError %s", 500, payload) -} - -func (o *V1NetworkPeersListInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/network-peers][%d] v1NetworkPeersListInternalServerError %s", 500, payload) -} - -func (o *V1NetworkPeersListInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *V1NetworkPeersListInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_parameters.go new file mode 100644 index 0000000000..62591716ba --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1NetworkPeersPostParams creates a new V1NetworkPeersPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersPostParams() *V1NetworkPeersPostParams { + return &V1NetworkPeersPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersPostParamsWithTimeout creates a new V1NetworkPeersPostParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersPostParamsWithTimeout(timeout time.Duration) *V1NetworkPeersPostParams { + return &V1NetworkPeersPostParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersPostParamsWithContext creates a new V1NetworkPeersPostParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersPostParamsWithContext(ctx context.Context) *V1NetworkPeersPostParams { + return &V1NetworkPeersPostParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersPostParamsWithHTTPClient creates a new V1NetworkPeersPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersPostParamsWithHTTPClient(client *http.Client) *V1NetworkPeersPostParams { + return &V1NetworkPeersPostParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersPostParams contains all the parameters to send to the API endpoint + + for the v1 network peers post operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersPostParams struct { + + /* Body. + + network peer create parameters + */ + Body *models.NetworkPeerCreate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersPostParams) WithDefaults() *V1NetworkPeersPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers post params +func (o *V1NetworkPeersPostParams) WithTimeout(timeout time.Duration) *V1NetworkPeersPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers post params +func (o *V1NetworkPeersPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers post params +func (o *V1NetworkPeersPostParams) WithContext(ctx context.Context) *V1NetworkPeersPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers post params +func (o *V1NetworkPeersPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers post params +func (o *V1NetworkPeersPostParams) WithHTTPClient(client *http.Client) *V1NetworkPeersPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers post params +func (o *V1NetworkPeersPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 network peers post params +func (o *V1NetworkPeersPostParams) WithBody(body *models.NetworkPeerCreate) *V1NetworkPeersPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 network peers post params +func (o *V1NetworkPeersPostParams) SetBody(body *models.NetworkPeerCreate) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_responses.go new file mode 100644 index 0000000000..4e4d6a576a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_post_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersPostReader is a Reader for the V1NetworkPeersPost structure. +type V1NetworkPeersPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /v1/network-peers] v1.networkPeers.post", response, response.Code()) + } +} + +// NewV1NetworkPeersPostOK creates a V1NetworkPeersPostOK with default headers values +func NewV1NetworkPeersPostOK() *V1NetworkPeersPostOK { + return &V1NetworkPeersPostOK{} +} + +/* +V1NetworkPeersPostOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersPostOK struct { + Payload *models.NetworkPeer +} + +// IsSuccess returns true when this v1 network peers post o k response has a 2xx status code +func (o *V1NetworkPeersPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers post o k response has a 3xx status code +func (o *V1NetworkPeersPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post o k response has a 4xx status code +func (o *V1NetworkPeersPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers post o k response has a 5xx status code +func (o *V1NetworkPeersPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post o k response a status code equal to that given +func (o *V1NetworkPeersPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers post o k response +func (o *V1NetworkPeersPostOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersPostOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostOK %s", 200, payload) +} + +func (o *V1NetworkPeersPostOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostOK %s", 200, payload) +} + +func (o *V1NetworkPeersPostOK) GetPayload() *models.NetworkPeer { + return o.Payload +} + +func (o *V1NetworkPeersPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.NetworkPeer) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostBadRequest creates a V1NetworkPeersPostBadRequest with default headers values +func NewV1NetworkPeersPostBadRequest() *V1NetworkPeersPostBadRequest { + return &V1NetworkPeersPostBadRequest{} +} + +/* +V1NetworkPeersPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post bad request response has a 2xx status code +func (o *V1NetworkPeersPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post bad request response has a 3xx status code +func (o *V1NetworkPeersPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post bad request response has a 4xx status code +func (o *V1NetworkPeersPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers post bad request response has a 5xx status code +func (o *V1NetworkPeersPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post bad request response a status code equal to that given +func (o *V1NetworkPeersPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers post bad request response +func (o *V1NetworkPeersPostBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostUnauthorized creates a V1NetworkPeersPostUnauthorized with default headers values +func NewV1NetworkPeersPostUnauthorized() *V1NetworkPeersPostUnauthorized { + return &V1NetworkPeersPostUnauthorized{} +} + +/* +V1NetworkPeersPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post unauthorized response has a 2xx status code +func (o *V1NetworkPeersPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post unauthorized response has a 3xx status code +func (o *V1NetworkPeersPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post unauthorized response has a 4xx status code +func (o *V1NetworkPeersPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers post unauthorized response has a 5xx status code +func (o *V1NetworkPeersPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post unauthorized response a status code equal to that given +func (o *V1NetworkPeersPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers post unauthorized response +func (o *V1NetworkPeersPostUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostForbidden creates a V1NetworkPeersPostForbidden with default headers values +func NewV1NetworkPeersPostForbidden() *V1NetworkPeersPostForbidden { + return &V1NetworkPeersPostForbidden{} +} + +/* +V1NetworkPeersPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post forbidden response has a 2xx status code +func (o *V1NetworkPeersPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post forbidden response has a 3xx status code +func (o *V1NetworkPeersPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post forbidden response has a 4xx status code +func (o *V1NetworkPeersPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers post forbidden response has a 5xx status code +func (o *V1NetworkPeersPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post forbidden response a status code equal to that given +func (o *V1NetworkPeersPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers post forbidden response +func (o *V1NetworkPeersPostForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostNotFound creates a V1NetworkPeersPostNotFound with default headers values +func NewV1NetworkPeersPostNotFound() *V1NetworkPeersPostNotFound { + return &V1NetworkPeersPostNotFound{} +} + +/* +V1NetworkPeersPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post not found response has a 2xx status code +func (o *V1NetworkPeersPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post not found response has a 3xx status code +func (o *V1NetworkPeersPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post not found response has a 4xx status code +func (o *V1NetworkPeersPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers post not found response has a 5xx status code +func (o *V1NetworkPeersPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post not found response a status code equal to that given +func (o *V1NetworkPeersPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers post not found response +func (o *V1NetworkPeersPostNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersPostNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersPostNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostConflict creates a V1NetworkPeersPostConflict with default headers values +func NewV1NetworkPeersPostConflict() *V1NetworkPeersPostConflict { + return &V1NetworkPeersPostConflict{} +} + +/* +V1NetworkPeersPostConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersPostConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post conflict response has a 2xx status code +func (o *V1NetworkPeersPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post conflict response has a 3xx status code +func (o *V1NetworkPeersPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post conflict response has a 4xx status code +func (o *V1NetworkPeersPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers post conflict response has a 5xx status code +func (o *V1NetworkPeersPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers post conflict response a status code equal to that given +func (o *V1NetworkPeersPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers post conflict response +func (o *V1NetworkPeersPostConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersPostConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostConflict %s", 409, payload) +} + +func (o *V1NetworkPeersPostConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostConflict %s", 409, payload) +} + +func (o *V1NetworkPeersPostConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersPostInternalServerError creates a V1NetworkPeersPostInternalServerError with default headers values +func NewV1NetworkPeersPostInternalServerError() *V1NetworkPeersPostInternalServerError { + return &V1NetworkPeersPostInternalServerError{} +} + +/* +V1NetworkPeersPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers post internal server error response has a 2xx status code +func (o *V1NetworkPeersPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers post internal server error response has a 3xx status code +func (o *V1NetworkPeersPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers post internal server error response has a 4xx status code +func (o *V1NetworkPeersPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers post internal server error response has a 5xx status code +func (o *V1NetworkPeersPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers post internal server error response a status code equal to that given +func (o *V1NetworkPeersPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers post internal server error response +func (o *V1NetworkPeersPostInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers][%d] v1NetworkPeersPostInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_parameters.go new file mode 100644 index 0000000000..91b14d23c6 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersRouteFilterIDDeleteParams creates a new V1NetworkPeersRouteFilterIDDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersRouteFilterIDDeleteParams() *V1NetworkPeersRouteFilterIDDeleteParams { + return &V1NetworkPeersRouteFilterIDDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersRouteFilterIDDeleteParamsWithTimeout creates a new V1NetworkPeersRouteFilterIDDeleteParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersRouteFilterIDDeleteParamsWithTimeout(timeout time.Duration) *V1NetworkPeersRouteFilterIDDeleteParams { + return &V1NetworkPeersRouteFilterIDDeleteParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersRouteFilterIDDeleteParamsWithContext creates a new V1NetworkPeersRouteFilterIDDeleteParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersRouteFilterIDDeleteParamsWithContext(ctx context.Context) *V1NetworkPeersRouteFilterIDDeleteParams { + return &V1NetworkPeersRouteFilterIDDeleteParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersRouteFilterIDDeleteParamsWithHTTPClient creates a new V1NetworkPeersRouteFilterIDDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersRouteFilterIDDeleteParamsWithHTTPClient(client *http.Client) *V1NetworkPeersRouteFilterIDDeleteParams { + return &V1NetworkPeersRouteFilterIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersRouteFilterIDDeleteParams contains all the parameters to send to the API endpoint + + for the v1 network peers route filter id delete operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersRouteFilterIDDeleteParams struct { + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + /* RouteFilterID. + + route filter ID + */ + RouteFilterID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers route filter id delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithDefaults() *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers route filter id delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithTimeout(timeout time.Duration) *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithContext(ctx context.Context) *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithHTTPClient(client *http.Client) *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WithRouteFilterID adds the routeFilterID to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WithRouteFilterID(routeFilterID string) *V1NetworkPeersRouteFilterIDDeleteParams { + o.SetRouteFilterID(routeFilterID) + return o +} + +// SetRouteFilterID adds the routeFilterId to the v1 network peers route filter id delete params +func (o *V1NetworkPeersRouteFilterIDDeleteParams) SetRouteFilterID(routeFilterID string) { + o.RouteFilterID = routeFilterID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersRouteFilterIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + // path param route_filter_id + if err := r.SetPathParam("route_filter_id", o.RouteFilterID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_responses.go new file mode 100644 index 0000000000..b1798054fb --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_delete_responses.go @@ -0,0 +1,561 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersRouteFilterIDDeleteReader is a Reader for the V1NetworkPeersRouteFilterIDDelete structure. +type V1NetworkPeersRouteFilterIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersRouteFilterIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersRouteFilterIDDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersRouteFilterIDDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersRouteFilterIDDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersRouteFilterIDDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersRouteFilterIDDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersRouteFilterIDDeleteConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersRouteFilterIDDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}] v1.networkPeers.routeFilter.id.delete", response, response.Code()) + } +} + +// NewV1NetworkPeersRouteFilterIDDeleteOK creates a V1NetworkPeersRouteFilterIDDeleteOK with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteOK() *V1NetworkPeersRouteFilterIDDeleteOK { + return &V1NetworkPeersRouteFilterIDDeleteOK{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersRouteFilterIDDeleteOK struct { + Payload models.Object +} + +// IsSuccess returns true when this v1 network peers route filter Id delete o k response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers route filter Id delete o k response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete o k response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filter Id delete o k response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete o k response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers route filter Id delete o k response +func (o *V1NetworkPeersRouteFilterIDDeleteOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteOK) GetPayload() models.Object { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteBadRequest creates a V1NetworkPeersRouteFilterIDDeleteBadRequest with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteBadRequest() *V1NetworkPeersRouteFilterIDDeleteBadRequest { + return &V1NetworkPeersRouteFilterIDDeleteBadRequest{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersRouteFilterIDDeleteBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete bad request response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete bad request response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete bad request response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id delete bad request response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete bad request response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers route filter Id delete bad request response +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteUnauthorized creates a V1NetworkPeersRouteFilterIDDeleteUnauthorized with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteUnauthorized() *V1NetworkPeersRouteFilterIDDeleteUnauthorized { + return &V1NetworkPeersRouteFilterIDDeleteUnauthorized{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersRouteFilterIDDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete unauthorized response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete unauthorized response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete unauthorized response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id delete unauthorized response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete unauthorized response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers route filter Id delete unauthorized response +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteForbidden creates a V1NetworkPeersRouteFilterIDDeleteForbidden with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteForbidden() *V1NetworkPeersRouteFilterIDDeleteForbidden { + return &V1NetworkPeersRouteFilterIDDeleteForbidden{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersRouteFilterIDDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete forbidden response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete forbidden response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete forbidden response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id delete forbidden response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete forbidden response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers route filter Id delete forbidden response +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteNotFound creates a V1NetworkPeersRouteFilterIDDeleteNotFound with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteNotFound() *V1NetworkPeersRouteFilterIDDeleteNotFound { + return &V1NetworkPeersRouteFilterIDDeleteNotFound{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersRouteFilterIDDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete not found response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete not found response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete not found response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id delete not found response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete not found response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers route filter Id delete not found response +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteConflict creates a V1NetworkPeersRouteFilterIDDeleteConflict with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteConflict() *V1NetworkPeersRouteFilterIDDeleteConflict { + return &V1NetworkPeersRouteFilterIDDeleteConflict{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersRouteFilterIDDeleteConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete conflict response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete conflict response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete conflict response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id delete conflict response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id delete conflict response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers route filter Id delete conflict response +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDDeleteInternalServerError creates a V1NetworkPeersRouteFilterIDDeleteInternalServerError with default headers values +func NewV1NetworkPeersRouteFilterIDDeleteInternalServerError() *V1NetworkPeersRouteFilterIDDeleteInternalServerError { + return &V1NetworkPeersRouteFilterIDDeleteInternalServerError{} +} + +/* +V1NetworkPeersRouteFilterIDDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersRouteFilterIDDeleteInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id delete internal server error response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id delete internal server error response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id delete internal server error response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filter Id delete internal server error response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers route filter Id delete internal server error response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers route filter Id delete internal server error response +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdDeleteInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_parameters.go new file mode 100644 index 0000000000..3f65fff913 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NetworkPeersRouteFilterIDGetParams creates a new V1NetworkPeersRouteFilterIDGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersRouteFilterIDGetParams() *V1NetworkPeersRouteFilterIDGetParams { + return &V1NetworkPeersRouteFilterIDGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersRouteFilterIDGetParamsWithTimeout creates a new V1NetworkPeersRouteFilterIDGetParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersRouteFilterIDGetParamsWithTimeout(timeout time.Duration) *V1NetworkPeersRouteFilterIDGetParams { + return &V1NetworkPeersRouteFilterIDGetParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersRouteFilterIDGetParamsWithContext creates a new V1NetworkPeersRouteFilterIDGetParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersRouteFilterIDGetParamsWithContext(ctx context.Context) *V1NetworkPeersRouteFilterIDGetParams { + return &V1NetworkPeersRouteFilterIDGetParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersRouteFilterIDGetParamsWithHTTPClient creates a new V1NetworkPeersRouteFilterIDGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersRouteFilterIDGetParamsWithHTTPClient(client *http.Client) *V1NetworkPeersRouteFilterIDGetParams { + return &V1NetworkPeersRouteFilterIDGetParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersRouteFilterIDGetParams contains all the parameters to send to the API endpoint + + for the v1 network peers route filter id get operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersRouteFilterIDGetParams struct { + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + /* RouteFilterID. + + route filter ID + */ + RouteFilterID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers route filter id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFilterIDGetParams) WithDefaults() *V1NetworkPeersRouteFilterIDGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers route filter id get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFilterIDGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) WithTimeout(timeout time.Duration) *V1NetworkPeersRouteFilterIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) WithContext(ctx context.Context) *V1NetworkPeersRouteFilterIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) WithHTTPClient(client *http.Client) *V1NetworkPeersRouteFilterIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersRouteFilterIDGetParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WithRouteFilterID adds the routeFilterID to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) WithRouteFilterID(routeFilterID string) *V1NetworkPeersRouteFilterIDGetParams { + o.SetRouteFilterID(routeFilterID) + return o +} + +// SetRouteFilterID adds the routeFilterId to the v1 network peers route filter id get params +func (o *V1NetworkPeersRouteFilterIDGetParams) SetRouteFilterID(routeFilterID string) { + o.RouteFilterID = routeFilterID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersRouteFilterIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + // path param route_filter_id + if err := r.SetPathParam("route_filter_id", o.RouteFilterID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_responses.go new file mode 100644 index 0000000000..6bc8396536 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filter_id_get_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersRouteFilterIDGetReader is a Reader for the V1NetworkPeersRouteFilterIDGet structure. +type V1NetworkPeersRouteFilterIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersRouteFilterIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersRouteFilterIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersRouteFilterIDGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersRouteFilterIDGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersRouteFilterIDGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersRouteFilterIDGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersRouteFilterIDGetConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersRouteFilterIDGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}] v1.networkPeers.routeFilter.id.get", response, response.Code()) + } +} + +// NewV1NetworkPeersRouteFilterIDGetOK creates a V1NetworkPeersRouteFilterIDGetOK with default headers values +func NewV1NetworkPeersRouteFilterIDGetOK() *V1NetworkPeersRouteFilterIDGetOK { + return &V1NetworkPeersRouteFilterIDGetOK{} +} + +/* +V1NetworkPeersRouteFilterIDGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersRouteFilterIDGetOK struct { + Payload *models.RouteFilter +} + +// IsSuccess returns true when this v1 network peers route filter Id get o k response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers route filter Id get o k response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get o k response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filter Id get o k response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get o k response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers route filter Id get o k response +func (o *V1NetworkPeersRouteFilterIDGetOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersRouteFilterIDGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetOK) GetPayload() *models.RouteFilter { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RouteFilter) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetBadRequest creates a V1NetworkPeersRouteFilterIDGetBadRequest with default headers values +func NewV1NetworkPeersRouteFilterIDGetBadRequest() *V1NetworkPeersRouteFilterIDGetBadRequest { + return &V1NetworkPeersRouteFilterIDGetBadRequest{} +} + +/* +V1NetworkPeersRouteFilterIDGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersRouteFilterIDGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get bad request response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get bad request response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get bad request response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id get bad request response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get bad request response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers route filter Id get bad request response +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetUnauthorized creates a V1NetworkPeersRouteFilterIDGetUnauthorized with default headers values +func NewV1NetworkPeersRouteFilterIDGetUnauthorized() *V1NetworkPeersRouteFilterIDGetUnauthorized { + return &V1NetworkPeersRouteFilterIDGetUnauthorized{} +} + +/* +V1NetworkPeersRouteFilterIDGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersRouteFilterIDGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get unauthorized response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get unauthorized response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get unauthorized response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id get unauthorized response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get unauthorized response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers route filter Id get unauthorized response +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetForbidden creates a V1NetworkPeersRouteFilterIDGetForbidden with default headers values +func NewV1NetworkPeersRouteFilterIDGetForbidden() *V1NetworkPeersRouteFilterIDGetForbidden { + return &V1NetworkPeersRouteFilterIDGetForbidden{} +} + +/* +V1NetworkPeersRouteFilterIDGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersRouteFilterIDGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get forbidden response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get forbidden response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get forbidden response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id get forbidden response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get forbidden response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers route filter Id get forbidden response +func (o *V1NetworkPeersRouteFilterIDGetForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersRouteFilterIDGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetNotFound creates a V1NetworkPeersRouteFilterIDGetNotFound with default headers values +func NewV1NetworkPeersRouteFilterIDGetNotFound() *V1NetworkPeersRouteFilterIDGetNotFound { + return &V1NetworkPeersRouteFilterIDGetNotFound{} +} + +/* +V1NetworkPeersRouteFilterIDGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersRouteFilterIDGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get not found response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get not found response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get not found response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id get not found response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get not found response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers route filter Id get not found response +func (o *V1NetworkPeersRouteFilterIDGetNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersRouteFilterIDGetNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetConflict creates a V1NetworkPeersRouteFilterIDGetConflict with default headers values +func NewV1NetworkPeersRouteFilterIDGetConflict() *V1NetworkPeersRouteFilterIDGetConflict { + return &V1NetworkPeersRouteFilterIDGetConflict{} +} + +/* +V1NetworkPeersRouteFilterIDGetConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersRouteFilterIDGetConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get conflict response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get conflict response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get conflict response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filter Id get conflict response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filter Id get conflict response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers route filter Id get conflict response +func (o *V1NetworkPeersRouteFilterIDGetConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersRouteFilterIDGetConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFilterIDGetInternalServerError creates a V1NetworkPeersRouteFilterIDGetInternalServerError with default headers values +func NewV1NetworkPeersRouteFilterIDGetInternalServerError() *V1NetworkPeersRouteFilterIDGetInternalServerError { + return &V1NetworkPeersRouteFilterIDGetInternalServerError{} +} + +/* +V1NetworkPeersRouteFilterIDGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersRouteFilterIDGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filter Id get internal server error response has a 2xx status code +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filter Id get internal server error response has a 3xx status code +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filter Id get internal server error response has a 4xx status code +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filter Id get internal server error response has a 5xx status code +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers route filter Id get internal server error response a status code equal to that given +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers route filter Id get internal server error response +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/network-peers/{network_peer_id}/route-filters/{route_filter_id}][%d] v1NetworkPeersRouteFilterIdGetInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFilterIDGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_parameters.go new file mode 100644 index 0000000000..011440a267 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewV1NetworkPeersRouteFiltersPostParams creates a new V1NetworkPeersRouteFiltersPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1NetworkPeersRouteFiltersPostParams() *V1NetworkPeersRouteFiltersPostParams { + return &V1NetworkPeersRouteFiltersPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1NetworkPeersRouteFiltersPostParamsWithTimeout creates a new V1NetworkPeersRouteFiltersPostParams object +// with the ability to set a timeout on a request. +func NewV1NetworkPeersRouteFiltersPostParamsWithTimeout(timeout time.Duration) *V1NetworkPeersRouteFiltersPostParams { + return &V1NetworkPeersRouteFiltersPostParams{ + timeout: timeout, + } +} + +// NewV1NetworkPeersRouteFiltersPostParamsWithContext creates a new V1NetworkPeersRouteFiltersPostParams object +// with the ability to set a context for a request. +func NewV1NetworkPeersRouteFiltersPostParamsWithContext(ctx context.Context) *V1NetworkPeersRouteFiltersPostParams { + return &V1NetworkPeersRouteFiltersPostParams{ + Context: ctx, + } +} + +// NewV1NetworkPeersRouteFiltersPostParamsWithHTTPClient creates a new V1NetworkPeersRouteFiltersPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1NetworkPeersRouteFiltersPostParamsWithHTTPClient(client *http.Client) *V1NetworkPeersRouteFiltersPostParams { + return &V1NetworkPeersRouteFiltersPostParams{ + HTTPClient: client, + } +} + +/* +V1NetworkPeersRouteFiltersPostParams contains all the parameters to send to the API endpoint + + for the v1 network peers route filters post operation. + + Typically these are written to a http.Request. +*/ +type V1NetworkPeersRouteFiltersPostParams struct { + + /* Body. + + route filter create parameters. + */ + Body *models.RouteFilterCreate + + /* NetworkPeerID. + + network peer ID + */ + NetworkPeerID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 network peers route filters post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFiltersPostParams) WithDefaults() *V1NetworkPeersRouteFiltersPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 network peers route filters post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1NetworkPeersRouteFiltersPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) WithTimeout(timeout time.Duration) *V1NetworkPeersRouteFiltersPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) WithContext(ctx context.Context) *V1NetworkPeersRouteFiltersPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) WithHTTPClient(client *http.Client) *V1NetworkPeersRouteFiltersPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) WithBody(body *models.RouteFilterCreate) *V1NetworkPeersRouteFiltersPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) SetBody(body *models.RouteFilterCreate) { + o.Body = body +} + +// WithNetworkPeerID adds the networkPeerID to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) WithNetworkPeerID(networkPeerID string) *V1NetworkPeersRouteFiltersPostParams { + o.SetNetworkPeerID(networkPeerID) + return o +} + +// SetNetworkPeerID adds the networkPeerId to the v1 network peers route filters post params +func (o *V1NetworkPeersRouteFiltersPostParams) SetNetworkPeerID(networkPeerID string) { + o.NetworkPeerID = networkPeerID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NetworkPeersRouteFiltersPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param network_peer_id + if err := r.SetPathParam("network_peer_id", o.NetworkPeerID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_responses.go new file mode 100644 index 0000000000..db282303f9 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_peers/v1_network_peers_route_filters_post_responses.go @@ -0,0 +1,563 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package network_peers + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1NetworkPeersRouteFiltersPostReader is a Reader for the V1NetworkPeersRouteFiltersPost structure. +type V1NetworkPeersRouteFiltersPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NetworkPeersRouteFiltersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewV1NetworkPeersRouteFiltersPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1NetworkPeersRouteFiltersPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1NetworkPeersRouteFiltersPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1NetworkPeersRouteFiltersPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1NetworkPeersRouteFiltersPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewV1NetworkPeersRouteFiltersPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1NetworkPeersRouteFiltersPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /v1/network-peers/{network_peer_id}/route-filters] v1.networkPeers.routeFilters.post", response, response.Code()) + } +} + +// NewV1NetworkPeersRouteFiltersPostOK creates a V1NetworkPeersRouteFiltersPostOK with default headers values +func NewV1NetworkPeersRouteFiltersPostOK() *V1NetworkPeersRouteFiltersPostOK { + return &V1NetworkPeersRouteFiltersPostOK{} +} + +/* +V1NetworkPeersRouteFiltersPostOK describes a response with status code 200, with default header values. + +OK +*/ +type V1NetworkPeersRouteFiltersPostOK struct { + Payload *models.RouteFilter +} + +// IsSuccess returns true when this v1 network peers route filters post o k response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 network peers route filters post o k response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post o k response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filters post o k response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post o k response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 network peers route filters post o k response +func (o *V1NetworkPeersRouteFiltersPostOK) Code() int { + return 200 +} + +func (o *V1NetworkPeersRouteFiltersPostOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostOK %s", 200, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostOK) GetPayload() *models.RouteFilter { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RouteFilter) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostBadRequest creates a V1NetworkPeersRouteFiltersPostBadRequest with default headers values +func NewV1NetworkPeersRouteFiltersPostBadRequest() *V1NetworkPeersRouteFiltersPostBadRequest { + return &V1NetworkPeersRouteFiltersPostBadRequest{} +} + +/* +V1NetworkPeersRouteFiltersPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1NetworkPeersRouteFiltersPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post bad request response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post bad request response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post bad request response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filters post bad request response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post bad request response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 network peers route filters post bad request response +func (o *V1NetworkPeersRouteFiltersPostBadRequest) Code() int { + return 400 +} + +func (o *V1NetworkPeersRouteFiltersPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostBadRequest %s", 400, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostUnauthorized creates a V1NetworkPeersRouteFiltersPostUnauthorized with default headers values +func NewV1NetworkPeersRouteFiltersPostUnauthorized() *V1NetworkPeersRouteFiltersPostUnauthorized { + return &V1NetworkPeersRouteFiltersPostUnauthorized{} +} + +/* +V1NetworkPeersRouteFiltersPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1NetworkPeersRouteFiltersPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post unauthorized response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post unauthorized response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post unauthorized response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filters post unauthorized response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post unauthorized response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 network peers route filters post unauthorized response +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) Code() int { + return 401 +} + +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostUnauthorized %s", 401, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostForbidden creates a V1NetworkPeersRouteFiltersPostForbidden with default headers values +func NewV1NetworkPeersRouteFiltersPostForbidden() *V1NetworkPeersRouteFiltersPostForbidden { + return &V1NetworkPeersRouteFiltersPostForbidden{} +} + +/* +V1NetworkPeersRouteFiltersPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1NetworkPeersRouteFiltersPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post forbidden response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post forbidden response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post forbidden response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filters post forbidden response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post forbidden response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 network peers route filters post forbidden response +func (o *V1NetworkPeersRouteFiltersPostForbidden) Code() int { + return 403 +} + +func (o *V1NetworkPeersRouteFiltersPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostForbidden %s", 403, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostNotFound creates a V1NetworkPeersRouteFiltersPostNotFound with default headers values +func NewV1NetworkPeersRouteFiltersPostNotFound() *V1NetworkPeersRouteFiltersPostNotFound { + return &V1NetworkPeersRouteFiltersPostNotFound{} +} + +/* +V1NetworkPeersRouteFiltersPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1NetworkPeersRouteFiltersPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post not found response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post not found response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post not found response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filters post not found response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post not found response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 network peers route filters post not found response +func (o *V1NetworkPeersRouteFiltersPostNotFound) Code() int { + return 404 +} + +func (o *V1NetworkPeersRouteFiltersPostNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostNotFound %s", 404, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostConflict creates a V1NetworkPeersRouteFiltersPostConflict with default headers values +func NewV1NetworkPeersRouteFiltersPostConflict() *V1NetworkPeersRouteFiltersPostConflict { + return &V1NetworkPeersRouteFiltersPostConflict{} +} + +/* +V1NetworkPeersRouteFiltersPostConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type V1NetworkPeersRouteFiltersPostConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post conflict response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post conflict response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post conflict response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 network peers route filters post conflict response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 network peers route filters post conflict response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the v1 network peers route filters post conflict response +func (o *V1NetworkPeersRouteFiltersPostConflict) Code() int { + return 409 +} + +func (o *V1NetworkPeersRouteFiltersPostConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostConflict %s", 409, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewV1NetworkPeersRouteFiltersPostInternalServerError creates a V1NetworkPeersRouteFiltersPostInternalServerError with default headers values +func NewV1NetworkPeersRouteFiltersPostInternalServerError() *V1NetworkPeersRouteFiltersPostInternalServerError { + return &V1NetworkPeersRouteFiltersPostInternalServerError{} +} + +/* +V1NetworkPeersRouteFiltersPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1NetworkPeersRouteFiltersPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network peers route filters post internal server error response has a 2xx status code +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network peers route filters post internal server error response has a 3xx status code +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network peers route filters post internal server error response has a 4xx status code +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network peers route filters post internal server error response has a 5xx status code +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network peers route filters post internal server error response a status code equal to that given +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 network peers route filters post internal server error response +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) Code() int { + return 500 +} + +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-peers/{network_peer_id}/route-filters][%d] v1NetworkPeersRouteFiltersPostInternalServerError %s", 500, payload) +} + +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkPeersRouteFiltersPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/network_security_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/network_security_groups_client.go index 258d508536..865e10ffd5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/network_security_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/network_security_groups_client.go @@ -87,7 +87,7 @@ type ClientService interface { V1NetworkSecurityGroupsActionPost performs a network security groups action enable disable on a workspace on enablement a default network security group is created to allow all traffic for all active network iterfaces */ func (a *Client) V1NetworkSecurityGroupsActionPost(params *V1NetworkSecurityGroupsActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsActionPostOK, *V1NetworkSecurityGroupsActionPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsActionPostParams() } @@ -107,18 +107,22 @@ func (a *Client) V1NetworkSecurityGroupsActionPost(params *V1NetworkSecurityGrou for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *V1NetworkSecurityGroupsActionPostOK: return value, nil, nil case *V1NetworkSecurityGroupsActionPostAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for network_security_groups: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -127,7 +131,7 @@ func (a *Client) V1NetworkSecurityGroupsActionPost(params *V1NetworkSecurityGrou V1NetworkSecurityGroupsIDDelete deletes a network security group from a workspace */ func (a *Client) V1NetworkSecurityGroupsIDDelete(params *V1NetworkSecurityGroupsIDDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsIDDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsIDDeleteParams() } @@ -147,17 +151,22 @@ func (a *Client) V1NetworkSecurityGroupsIDDelete(params *V1NetworkSecurityGroups for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsIDDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.id.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -166,7 +175,7 @@ func (a *Client) V1NetworkSecurityGroupsIDDelete(params *V1NetworkSecurityGroups V1NetworkSecurityGroupsIDGet gets the detail of a network security group */ func (a *Client) V1NetworkSecurityGroupsIDGet(params *V1NetworkSecurityGroupsIDGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsIDGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsIDGetParams() } @@ -186,17 +195,22 @@ func (a *Client) V1NetworkSecurityGroupsIDGet(params *V1NetworkSecurityGroupsIDG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsIDGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.id.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -205,7 +219,7 @@ func (a *Client) V1NetworkSecurityGroupsIDGet(params *V1NetworkSecurityGroupsIDG V1NetworkSecurityGroupsIDPost clones a network security group */ func (a *Client) V1NetworkSecurityGroupsIDPost(params *V1NetworkSecurityGroupsIDPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsIDPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsIDPostParams() } @@ -225,17 +239,22 @@ func (a *Client) V1NetworkSecurityGroupsIDPost(params *V1NetworkSecurityGroupsID for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsIDPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.id.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -244,7 +263,7 @@ func (a *Client) V1NetworkSecurityGroupsIDPost(params *V1NetworkSecurityGroupsID V1NetworkSecurityGroupsIDPut updates a network security group */ func (a *Client) V1NetworkSecurityGroupsIDPut(params *V1NetworkSecurityGroupsIDPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsIDPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsIDPutParams() } @@ -264,17 +283,22 @@ func (a *Client) V1NetworkSecurityGroupsIDPut(params *V1NetworkSecurityGroupsIDP for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsIDPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.id.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -283,7 +307,7 @@ func (a *Client) V1NetworkSecurityGroupsIDPut(params *V1NetworkSecurityGroupsIDP V1NetworkSecurityGroupsList gets the list of network security groups for a workspace */ func (a *Client) V1NetworkSecurityGroupsList(params *V1NetworkSecurityGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsListOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsListParams() } @@ -303,17 +327,22 @@ func (a *Client) V1NetworkSecurityGroupsList(params *V1NetworkSecurityGroupsList for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsListOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -322,7 +351,7 @@ func (a *Client) V1NetworkSecurityGroupsList(params *V1NetworkSecurityGroupsList V1NetworkSecurityGroupsMembersDelete deletes the member from a network security group */ func (a *Client) V1NetworkSecurityGroupsMembersDelete(params *V1NetworkSecurityGroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsMembersDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsMembersDeleteParams() } @@ -342,17 +371,22 @@ func (a *Client) V1NetworkSecurityGroupsMembersDelete(params *V1NetworkSecurityG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsMembersDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.members.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -361,7 +395,7 @@ func (a *Client) V1NetworkSecurityGroupsMembersDelete(params *V1NetworkSecurityG V1NetworkSecurityGroupsMembersPost adds a member to a network security group */ func (a *Client) V1NetworkSecurityGroupsMembersPost(params *V1NetworkSecurityGroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsMembersPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsMembersPostParams() } @@ -381,17 +415,22 @@ func (a *Client) V1NetworkSecurityGroupsMembersPost(params *V1NetworkSecurityGro for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsMembersPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.members.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -400,7 +439,7 @@ func (a *Client) V1NetworkSecurityGroupsMembersPost(params *V1NetworkSecurityGro V1NetworkSecurityGroupsMoveMemberPost moves a network security group member to another network security group */ func (a *Client) V1NetworkSecurityGroupsMoveMemberPost(params *V1NetworkSecurityGroupsMoveMemberPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsMoveMemberPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsMoveMemberPostParams() } @@ -420,17 +459,22 @@ func (a *Client) V1NetworkSecurityGroupsMoveMemberPost(params *V1NetworkSecurity for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsMoveMemberPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.move_member.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -439,7 +483,7 @@ func (a *Client) V1NetworkSecurityGroupsMoveMemberPost(params *V1NetworkSecurity V1NetworkSecurityGroupsPost creates a new network security group */ func (a *Client) V1NetworkSecurityGroupsPost(params *V1NetworkSecurityGroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsPostOK, *V1NetworkSecurityGroupsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsPostParams() } @@ -459,18 +503,22 @@ func (a *Client) V1NetworkSecurityGroupsPost(params *V1NetworkSecurityGroupsPost for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *V1NetworkSecurityGroupsPostOK: return value, nil, nil case *V1NetworkSecurityGroupsPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for network_security_groups: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -479,7 +527,7 @@ func (a *Client) V1NetworkSecurityGroupsPost(params *V1NetworkSecurityGroupsPost V1NetworkSecurityGroupsRulesDelete deletes the rule from a network security group */ func (a *Client) V1NetworkSecurityGroupsRulesDelete(params *V1NetworkSecurityGroupsRulesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsRulesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsRulesDeleteParams() } @@ -499,17 +547,22 @@ func (a *Client) V1NetworkSecurityGroupsRulesDelete(params *V1NetworkSecurityGro for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsRulesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.rules.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -518,7 +571,7 @@ func (a *Client) V1NetworkSecurityGroupsRulesDelete(params *V1NetworkSecurityGro V1NetworkSecurityGroupsRulesPost adds a rule to a network security group */ func (a *Client) V1NetworkSecurityGroupsRulesPost(params *V1NetworkSecurityGroupsRulesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworkSecurityGroupsRulesPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworkSecurityGroupsRulesPostParams() } @@ -538,17 +591,22 @@ func (a *Client) V1NetworkSecurityGroupsRulesPost(params *V1NetworkSecurityGroup for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworkSecurityGroupsRulesPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networkSecurityGroups.rules.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go index b1536f9f52..01b6afa27a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsActionPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsActionPostOK() @@ -144,7 +145,7 @@ func (o *V1NetworkSecurityGroupsActionPostOK) GetPayload() models.Object { func (o *V1NetworkSecurityGroupsActionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -212,7 +213,7 @@ func (o *V1NetworkSecurityGroupsActionPostAccepted) GetPayload() models.Object { func (o *V1NetworkSecurityGroupsActionPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -282,7 +283,7 @@ func (o *V1NetworkSecurityGroupsActionPostBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -352,7 +353,7 @@ func (o *V1NetworkSecurityGroupsActionPostUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -422,7 +423,7 @@ func (o *V1NetworkSecurityGroupsActionPostForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -492,7 +493,7 @@ func (o *V1NetworkSecurityGroupsActionPostNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -562,7 +563,7 @@ func (o *V1NetworkSecurityGroupsActionPostConflict) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -632,7 +633,7 @@ func (o *V1NetworkSecurityGroupsActionPostInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -702,7 +703,7 @@ func (o *V1NetworkSecurityGroupsActionPostStatus550) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_delete_responses.go index dcffcfb4eb..e3d1e201e8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_delete_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsIDDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsIDDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteOK) GetPayload() models.Object { func (o *V1NetworkSecurityGroupsIDDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworkSecurityGroupsIDDeleteInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_get_responses.go index 9f2baad3bf..76e92f2fc0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_get_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsIDGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsIDGetOK() @@ -128,7 +129,7 @@ func (o *V1NetworkSecurityGroupsIDGetOK) readResponse(response runtime.ClientRes o.Payload = new(models.NetworkSecurityGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkSecurityGroupsIDGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkSecurityGroupsIDGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkSecurityGroupsIDGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkSecurityGroupsIDGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkSecurityGroupsIDGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_post_responses.go index d14611bc48..09c6011fbb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsIDPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsIDPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsIDPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1NetworkSecurityGroupsIDPostCreated() @@ -128,7 +129,7 @@ func (o *V1NetworkSecurityGroupsIDPostCreated) readResponse(response runtime.Cli o.Payload = new(models.NetworkSecurityGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkSecurityGroupsIDPostBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkSecurityGroupsIDPostUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkSecurityGroupsIDPostForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkSecurityGroupsIDPostNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkSecurityGroupsIDPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_put_responses.go index 2910a39577..6e7529db62 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_id_put_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsIDPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsIDPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsIDPutOK() @@ -128,7 +129,7 @@ func (o *V1NetworkSecurityGroupsIDPutOK) readResponse(response runtime.ClientRes o.Payload = new(models.NetworkSecurityGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkSecurityGroupsIDPutBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkSecurityGroupsIDPutUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkSecurityGroupsIDPutForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkSecurityGroupsIDPutNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkSecurityGroupsIDPutInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_list_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_list_responses.go index 4b71837df3..29cacf1f99 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_list_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_list_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsListReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsListOK() @@ -128,7 +129,7 @@ func (o *V1NetworkSecurityGroupsListOK) readResponse(response runtime.ClientResp o.Payload = new(models.NetworkSecurityGroups) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkSecurityGroupsListBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkSecurityGroupsListUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkSecurityGroupsListForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkSecurityGroupsListNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkSecurityGroupsListInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go index da71f1b2d9..a82c0c35be 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsMembersDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsMembersDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteOK) GetPayload() models.Object { func (o *V1NetworkSecurityGroupsMembersDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteBadRequest) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteForbidden) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteNotFound) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteConflict) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworkSecurityGroupsMembersDeleteInternalServerError) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go index c273addc1f..b1139afd36 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsMembersPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsMembersPostOK() @@ -140,7 +141,7 @@ func (o *V1NetworkSecurityGroupsMembersPostOK) readResponse(response runtime.Cli o.Payload = new(models.NetworkSecurityGroupMember) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1NetworkSecurityGroupsMembersPostBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1NetworkSecurityGroupsMembersPostUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1NetworkSecurityGroupsMembersPostForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1NetworkSecurityGroupsMembersPostNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1NetworkSecurityGroupsMembersPostConflict) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1NetworkSecurityGroupsMembersPostUnprocessableEntity) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1NetworkSecurityGroupsMembersPostInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_move_member_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_move_member_post_responses.go index 4efd573de7..c79cba3259 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_move_member_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_move_member_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsMoveMemberPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsMoveMemberPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsMoveMemberPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsMoveMemberPostOK() @@ -128,7 +129,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostOK) readResponse(response runtime. o.Payload = new(models.NetworkSecurityGroupMember) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworkSecurityGroupsMoveMemberPostInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_post_responses.go index a384c457b0..6154fca69b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsPostOK() @@ -146,7 +147,7 @@ func (o *V1NetworkSecurityGroupsPostOK) readResponse(response runtime.ClientResp o.Payload = new(models.NetworkSecurityGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *V1NetworkSecurityGroupsPostCreated) readResponse(response runtime.Clien o.Payload = new(models.NetworkSecurityGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *V1NetworkSecurityGroupsPostBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *V1NetworkSecurityGroupsPostUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *V1NetworkSecurityGroupsPostForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *V1NetworkSecurityGroupsPostNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *V1NetworkSecurityGroupsPostConflict) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *V1NetworkSecurityGroupsPostUnprocessableEntity) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *V1NetworkSecurityGroupsPostInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go index e318eb64bc..f48102a1fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsRulesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsRulesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsRulesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsRulesDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteOK) GetPayload() models.Object { func (o *V1NetworkSecurityGroupsRulesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteConflict) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworkSecurityGroupsRulesDeleteInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go index 5d519da4c9..1fbc17a8be 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go @@ -7,6 +7,7 @@ package network_security_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworkSecurityGroupsRulesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworkSecurityGroupsRulesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworkSecurityGroupsRulesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworkSecurityGroupsRulesPostOK() @@ -140,7 +141,7 @@ func (o *V1NetworkSecurityGroupsRulesPostOK) readResponse(response runtime.Clien o.Payload = new(models.NetworkSecurityGroupRule) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1NetworkSecurityGroupsRulesPostBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1NetworkSecurityGroupsRulesPostUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1NetworkSecurityGroupsRulesPostForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1NetworkSecurityGroupsRulesPostNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1NetworkSecurityGroupsRulesPostConflict) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1NetworkSecurityGroupsRulesPostUnprocessableEntity) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1NetworkSecurityGroupsRulesPostInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/networks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/networks_client.go index 3358bc960c..b1291ca1f8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/networks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/networks_client.go @@ -73,7 +73,7 @@ type ClientService interface { V1NetworksNetworkInterfacesDelete deletes a network interface */ func (a *Client) V1NetworksNetworkInterfacesDelete(params *V1NetworksNetworkInterfacesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworksNetworkInterfacesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworksNetworkInterfacesDeleteParams() } @@ -93,17 +93,22 @@ func (a *Client) V1NetworksNetworkInterfacesDelete(params *V1NetworksNetworkInte for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworksNetworkInterfacesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networks.network-interfaces.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) V1NetworksNetworkInterfacesDelete(params *V1NetworksNetworkInte V1NetworksNetworkInterfacesGet gets a network interface s information */ func (a *Client) V1NetworksNetworkInterfacesGet(params *V1NetworksNetworkInterfacesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworksNetworkInterfacesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworksNetworkInterfacesGetParams() } @@ -132,17 +137,22 @@ func (a *Client) V1NetworksNetworkInterfacesGet(params *V1NetworksNetworkInterfa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworksNetworkInterfacesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networks.network-interfaces.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) V1NetworksNetworkInterfacesGet(params *V1NetworksNetworkInterfa V1NetworksNetworkInterfacesGetall gets all network interfaces for this network */ func (a *Client) V1NetworksNetworkInterfacesGetall(params *V1NetworksNetworkInterfacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworksNetworkInterfacesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworksNetworkInterfacesGetallParams() } @@ -171,26 +181,31 @@ func (a *Client) V1NetworksNetworkInterfacesGetall(params *V1NetworksNetworkInte for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworksNetworkInterfacesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networks.network-interfaces.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* -V1NetworksNetworkInterfacesPost performs network interface addition deletion and listing +V1NetworksNetworkInterfacesPost creates a network interface */ func (a *Client) V1NetworksNetworkInterfacesPost(params *V1NetworksNetworkInterfacesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworksNetworkInterfacesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworksNetworkInterfacesPostParams() } @@ -210,17 +225,22 @@ func (a *Client) V1NetworksNetworkInterfacesPost(params *V1NetworksNetworkInterf for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworksNetworkInterfacesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networks.network-interfaces.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -229,7 +249,7 @@ func (a *Client) V1NetworksNetworkInterfacesPost(params *V1NetworksNetworkInterf V1NetworksNetworkInterfacesPut updates a network interface s information */ func (a *Client) V1NetworksNetworkInterfacesPut(params *V1NetworksNetworkInterfacesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1NetworksNetworkInterfacesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1NetworksNetworkInterfacesPutParams() } @@ -249,17 +269,22 @@ func (a *Client) V1NetworksNetworkInterfacesPut(params *V1NetworksNetworkInterfa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1NetworksNetworkInterfacesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.networks.network-interfaces.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_delete_responses.go index 8c525d4a35..0ab2e7fba4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_delete_responses.go @@ -7,6 +7,7 @@ package networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworksNetworkInterfacesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworksNetworkInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworksNetworkInterfacesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworksNetworkInterfacesDeleteOK() @@ -132,7 +133,7 @@ func (o *V1NetworksNetworkInterfacesDeleteOK) GetPayload() models.Object { func (o *V1NetworksNetworkInterfacesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1NetworksNetworkInterfacesDeleteBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1NetworksNetworkInterfacesDeleteUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1NetworksNetworkInterfacesDeleteForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1NetworksNetworkInterfacesDeleteNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1NetworksNetworkInterfacesDeleteGone) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1NetworksNetworkInterfacesDeleteInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_get_responses.go index 8efe1ce3e6..9c9a16c523 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_get_responses.go @@ -7,6 +7,7 @@ package networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworksNetworkInterfacesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworksNetworkInterfacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworksNetworkInterfacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworksNetworkInterfacesGetOK() @@ -128,7 +129,7 @@ func (o *V1NetworksNetworkInterfacesGetOK) readResponse(response runtime.ClientR o.Payload = new(models.NetworkInterface) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworksNetworkInterfacesGetBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworksNetworkInterfacesGetUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworksNetworkInterfacesGetForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworksNetworkInterfacesGetNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworksNetworkInterfacesGetInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_getall_responses.go index 753cc0a92f..0140c776b4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_getall_responses.go @@ -7,6 +7,7 @@ package networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworksNetworkInterfacesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworksNetworkInterfacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworksNetworkInterfacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworksNetworkInterfacesGetallOK() @@ -128,7 +129,7 @@ func (o *V1NetworksNetworkInterfacesGetallOK) readResponse(response runtime.Clie o.Payload = new(models.NetworkInterfaces) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1NetworksNetworkInterfacesGetallBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1NetworksNetworkInterfacesGetallUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1NetworksNetworkInterfacesGetallForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1NetworksNetworkInterfacesGetallNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1NetworksNetworkInterfacesGetallInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_post_responses.go index c071669ccc..79822a42c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_post_responses.go @@ -7,6 +7,7 @@ package networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworksNetworkInterfacesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworksNetworkInterfacesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworksNetworkInterfacesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1NetworksNetworkInterfacesPostCreated() @@ -140,7 +141,7 @@ func (o *V1NetworksNetworkInterfacesPostCreated) readResponse(response runtime.C o.Payload = new(models.NetworkInterface) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1NetworksNetworkInterfacesPostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1NetworksNetworkInterfacesPostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1NetworksNetworkInterfacesPostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1NetworksNetworkInterfacesPostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1NetworksNetworkInterfacesPostConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1NetworksNetworkInterfacesPostUnprocessableEntity) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1NetworksNetworkInterfacesPostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_put_responses.go index 818984788f..55d724fa55 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/networks/v1_networks_network_interfaces_put_responses.go @@ -7,6 +7,7 @@ package networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1NetworksNetworkInterfacesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1NetworksNetworkInterfacesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1NetworksNetworkInterfacesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1NetworksNetworkInterfacesPutOK() @@ -134,7 +135,7 @@ func (o *V1NetworksNetworkInterfacesPutOK) readResponse(response runtime.ClientR o.Payload = new(models.NetworkInterface) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1NetworksNetworkInterfacesPutBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1NetworksNetworkInterfacesPutUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1NetworksNetworkInterfacesPutForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1NetworksNetworkInterfacesPutNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1NetworksNetworkInterfacesPutUnprocessableEntity) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1NetworksNetworkInterfacesPutInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go index 2d2f3f66d0..96e612046f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go @@ -73,7 +73,7 @@ type ClientService interface { ServiceBrokerOpenstacksGet lists all open stack instances being managed */ func (a *Client) ServiceBrokerOpenstacksGet(params *ServiceBrokerOpenstacksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerOpenstacksGetParams() } @@ -93,17 +93,22 @@ func (a *Client) ServiceBrokerOpenstacksGet(params *ServiceBrokerOpenstacksGetPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerOpenstacksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.openstacks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) ServiceBrokerOpenstacksGet(params *ServiceBrokerOpenstacksGetPa ServiceBrokerOpenstacksHostsGet lists account information for all pvm instances on hostname */ func (a *Client) ServiceBrokerOpenstacksHostsGet(params *ServiceBrokerOpenstacksHostsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksHostsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerOpenstacksHostsGetParams() } @@ -132,17 +137,22 @@ func (a *Client) ServiceBrokerOpenstacksHostsGet(params *ServiceBrokerOpenstacks for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerOpenstacksHostsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.openstacks.hosts.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) ServiceBrokerOpenstacksHostsGet(params *ServiceBrokerOpenstacks ServiceBrokerOpenstacksOpenstackGet lists account information for all pvm instances on hostname */ func (a *Client) ServiceBrokerOpenstacksOpenstackGet(params *ServiceBrokerOpenstacksOpenstackGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksOpenstackGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerOpenstacksOpenstackGetParams() } @@ -171,17 +181,22 @@ func (a *Client) ServiceBrokerOpenstacksOpenstackGet(params *ServiceBrokerOpenst for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerOpenstacksOpenstackGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.openstacks.openstack.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -190,7 +205,7 @@ func (a *Client) ServiceBrokerOpenstacksOpenstackGet(params *ServiceBrokerOpenst ServiceBrokerOpenstacksPost creates a new open stack instance to be managed */ func (a *Client) ServiceBrokerOpenstacksPost(params *ServiceBrokerOpenstacksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksPostOK, *ServiceBrokerOpenstacksPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerOpenstacksPostParams() } @@ -210,18 +225,22 @@ func (a *Client) ServiceBrokerOpenstacksPost(params *ServiceBrokerOpenstacksPost for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceBrokerOpenstacksPostOK: return value, nil, nil case *ServiceBrokerOpenstacksPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for open_stacks: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -230,7 +249,7 @@ func (a *Client) ServiceBrokerOpenstacksPost(params *ServiceBrokerOpenstacksPost ServiceBrokerOpenstacksServersGet lists account information for a pvm instance */ func (a *Client) ServiceBrokerOpenstacksServersGet(params *ServiceBrokerOpenstacksServersGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksServersGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerOpenstacksServersGetParams() } @@ -250,17 +269,22 @@ func (a *Client) ServiceBrokerOpenstacksServersGet(params *ServiceBrokerOpenstac for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerOpenstacksServersGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.openstacks.servers.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go index f60ec26e36..2752eddee9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go @@ -7,6 +7,7 @@ package open_stacks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerOpenstacksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerOpenstacksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerOpenstacksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerOpenstacksGetOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerOpenstacksGetOK) readResponse(response runtime.ClientRespo o.Payload = new(models.OpenStacks) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerOpenstacksGetBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerOpenstacksGetUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerOpenstacksGetForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerOpenstacksGetNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerOpenstacksGetInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go index fa1ef4d3ed..468da71dc1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go @@ -7,6 +7,7 @@ package open_stacks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerOpenstacksHostsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerOpenstacksHostsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerOpenstacksHostsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerOpenstacksHostsGetOK() @@ -116,7 +117,7 @@ func (o *ServiceBrokerOpenstacksHostsGetOK) readResponse(response runtime.Client o.Payload = new(models.HostInfo) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -186,7 +187,7 @@ func (o *ServiceBrokerOpenstacksHostsGetBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -256,7 +257,7 @@ func (o *ServiceBrokerOpenstacksHostsGetNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -326,7 +327,7 @@ func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go index 1586beb542..0aa97f3c05 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go @@ -7,6 +7,7 @@ package open_stacks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerOpenstacksOpenstackGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerOpenstacksOpenstackGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerOpenstacksOpenstackGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerOpenstacksOpenstackGetOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetOK) readResponse(response runtime.Cl o.Payload = new(models.OpenStackInfo) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go index 5ad6d9ead1..f7d8c51fdc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go @@ -7,6 +7,7 @@ package open_stacks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerOpenstacksPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerOpenstacksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerOpenstacksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerOpenstacksPostOK() @@ -146,7 +147,7 @@ func (o *ServiceBrokerOpenstacksPostOK) readResponse(response runtime.ClientResp o.Payload = new(models.OpenStack) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *ServiceBrokerOpenstacksPostCreated) readResponse(response runtime.Clien o.Payload = new(models.OpenStack) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *ServiceBrokerOpenstacksPostBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *ServiceBrokerOpenstacksPostUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *ServiceBrokerOpenstacksPostForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *ServiceBrokerOpenstacksPostNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *ServiceBrokerOpenstacksPostConflict) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *ServiceBrokerOpenstacksPostInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go index 46465a5de5..ea38fd0490 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go @@ -7,6 +7,7 @@ package open_stacks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerOpenstacksServersGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerOpenstacksServersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerOpenstacksServersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerOpenstacksServersGetOK() @@ -128,7 +129,7 @@ func (o *ServiceBrokerOpenstacksServersGetOK) readResponse(response runtime.Clie o.Payload = new(models.HostPVMInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBrokerOpenstacksServersGetBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBrokerOpenstacksServersGetUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBrokerOpenstacksServersGetForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBrokerOpenstacksServersGetNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBrokerOpenstacksServersGetInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go index d89d215e1e..278dc5f766 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go @@ -79,7 +79,7 @@ type ClientService interface { PcloudCloudconnectionsDelete deletes a cloud connection */ func (a *Client) PcloudCloudconnectionsDelete(params *PcloudCloudconnectionsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsDeleteOK, *PcloudCloudconnectionsDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsDeleteParams() } @@ -99,18 +99,22 @@ func (a *Client) PcloudCloudconnectionsDelete(params *PcloudCloudconnectionsDele for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudconnectionsDeleteOK: return value, nil, nil case *PcloudCloudconnectionsDeleteAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_cloud_connections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -119,7 +123,7 @@ func (a *Client) PcloudCloudconnectionsDelete(params *PcloudCloudconnectionsDele PcloudCloudconnectionsGet gets a cloud connection s state information */ func (a *Client) PcloudCloudconnectionsGet(params *PcloudCloudconnectionsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsGetParams() } @@ -139,17 +143,22 @@ func (a *Client) PcloudCloudconnectionsGet(params *PcloudCloudconnectionsGetPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudconnectionsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudconnections.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -158,7 +167,7 @@ func (a *Client) PcloudCloudconnectionsGet(params *PcloudCloudconnectionsGetPara PcloudCloudconnectionsGetall gets all cloud connections in this cloud instance */ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsGetallParams() } @@ -178,17 +187,22 @@ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGeta for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudconnectionsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudconnections.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -197,7 +211,7 @@ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGeta PcloudCloudconnectionsNetworksDelete detaches a network from a cloud connection */ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsNetworksDeleteOK, *PcloudCloudconnectionsNetworksDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsNetworksDeleteParams() } @@ -217,18 +231,22 @@ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnect for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudconnectionsNetworksDeleteOK: return value, nil, nil case *PcloudCloudconnectionsNetworksDeleteAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_cloud_connections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -237,7 +255,7 @@ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnect PcloudCloudconnectionsNetworksPut attaches a network to the cloud connection */ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsNetworksPutOK, *PcloudCloudconnectionsNetworksPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsNetworksPutParams() } @@ -257,18 +275,22 @@ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnection for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudconnectionsNetworksPutOK: return value, nil, nil case *PcloudCloudconnectionsNetworksPutAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_cloud_connections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -277,7 +299,7 @@ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnection PcloudCloudconnectionsPost creates a new cloud connection */ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsPostOK, *PcloudCloudconnectionsPostCreated, *PcloudCloudconnectionsPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsPostParams() } @@ -297,11 +319,12 @@ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudconnectionsPostOK: return value, nil, nil, nil @@ -310,7 +333,10 @@ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostPa case *PcloudCloudconnectionsPostAccepted: return nil, nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_cloud_connections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -319,7 +345,7 @@ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostPa PcloudCloudconnectionsPut updates a cloud connection */ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsPutOK, *PcloudCloudconnectionsPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsPutParams() } @@ -339,18 +365,22 @@ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudconnectionsPutOK: return value, nil, nil case *PcloudCloudconnectionsPutAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_cloud_connections: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -359,7 +389,7 @@ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutPara PcloudCloudconnectionsVirtualprivatecloudsGetall gets all virtual private cloud connections in this cloud instance */ func (a *Client) PcloudCloudconnectionsVirtualprivatecloudsGetall(params *PcloudCloudconnectionsVirtualprivatecloudsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsVirtualprivatecloudsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudconnectionsVirtualprivatecloudsGetallParams() } @@ -379,17 +409,22 @@ func (a *Client) PcloudCloudconnectionsVirtualprivatecloudsGetall(params *Pcloud for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudconnectionsVirtualprivatecloudsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudconnections.virtualprivateclouds.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index bd96133803..399f34eb17 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsDeleteOK() @@ -144,7 +145,7 @@ func (o *PcloudCloudconnectionsDeleteOK) GetPayload() models.Object { func (o *PcloudCloudconnectionsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -214,7 +215,7 @@ func (o *PcloudCloudconnectionsDeleteAccepted) readResponse(response runtime.Cli o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -284,7 +285,7 @@ func (o *PcloudCloudconnectionsDeleteBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -354,7 +355,7 @@ func (o *PcloudCloudconnectionsDeleteUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -424,7 +425,7 @@ func (o *PcloudCloudconnectionsDeleteForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -494,7 +495,7 @@ func (o *PcloudCloudconnectionsDeleteNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -564,7 +565,7 @@ func (o *PcloudCloudconnectionsDeleteRequestTimeout) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -634,7 +635,7 @@ func (o *PcloudCloudconnectionsDeleteGone) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -704,7 +705,7 @@ func (o *PcloudCloudconnectionsDeleteInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index cd751b72b7..0fd3cdb67f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsGetOK() @@ -134,7 +135,7 @@ func (o *PcloudCloudconnectionsGetOK) readResponse(response runtime.ClientRespon o.Payload = new(models.CloudConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudCloudconnectionsGetBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudCloudconnectionsGetUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudCloudconnectionsGetForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudCloudconnectionsGetNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudCloudconnectionsGetRequestTimeout) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudCloudconnectionsGetInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index e28902dd5b..6cfa8aac50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsGetallOK() @@ -134,7 +135,7 @@ func (o *PcloudCloudconnectionsGetallOK) readResponse(response runtime.ClientRes o.Payload = new(models.CloudConnections) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudCloudconnectionsGetallBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudCloudconnectionsGetallUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudCloudconnectionsGetallForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudCloudconnectionsGetallNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudCloudconnectionsGetallRequestTimeout) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudCloudconnectionsGetallInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index 1a632f6b3e..936b0ec6fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsNetworksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsNetworksDeleteOK() @@ -144,7 +145,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteOK) GetPayload() models.Object { func (o *PcloudCloudconnectionsNetworksDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -214,7 +215,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteAccepted) readResponse(response run o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -284,7 +285,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -354,7 +355,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -424,7 +425,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteForbidden) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -494,7 +495,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteNotFound) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -564,7 +565,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -634,7 +635,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteGone) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -704,7 +705,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index 7e35af74e1..c29f7751d2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsNetworksPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsNetworksPutOK() @@ -144,7 +145,7 @@ func (o *PcloudCloudconnectionsNetworksPutOK) GetPayload() models.Object { func (o *PcloudCloudconnectionsNetworksPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -214,7 +215,7 @@ func (o *PcloudCloudconnectionsNetworksPutAccepted) readResponse(response runtim o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -284,7 +285,7 @@ func (o *PcloudCloudconnectionsNetworksPutBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -354,7 +355,7 @@ func (o *PcloudCloudconnectionsNetworksPutUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -424,7 +425,7 @@ func (o *PcloudCloudconnectionsNetworksPutForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -494,7 +495,7 @@ func (o *PcloudCloudconnectionsNetworksPutNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -564,7 +565,7 @@ func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -634,7 +635,7 @@ func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -704,7 +705,7 @@ func (o *PcloudCloudconnectionsNetworksPutInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index edd642b6bb..19bb749037 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsPostOK() @@ -176,7 +177,7 @@ func (o *PcloudCloudconnectionsPostOK) readResponse(response runtime.ClientRespo o.Payload = new(models.CloudConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -246,7 +247,7 @@ func (o *PcloudCloudconnectionsPostCreated) readResponse(response runtime.Client o.Payload = new(models.CloudConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -316,7 +317,7 @@ func (o *PcloudCloudconnectionsPostAccepted) readResponse(response runtime.Clien o.Payload = new(models.CloudConnectionCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -386,7 +387,7 @@ func (o *PcloudCloudconnectionsPostBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -456,7 +457,7 @@ func (o *PcloudCloudconnectionsPostUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -526,7 +527,7 @@ func (o *PcloudCloudconnectionsPostForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -596,7 +597,7 @@ func (o *PcloudCloudconnectionsPostNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -666,7 +667,7 @@ func (o *PcloudCloudconnectionsPostMethodNotAllowed) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -736,7 +737,7 @@ func (o *PcloudCloudconnectionsPostRequestTimeout) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -806,7 +807,7 @@ func (o *PcloudCloudconnectionsPostConflict) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -876,7 +877,7 @@ func (o *PcloudCloudconnectionsPostUnprocessableEntity) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -946,7 +947,7 @@ func (o *PcloudCloudconnectionsPostInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -1016,7 +1017,7 @@ func (o *PcloudCloudconnectionsPostServiceUnavailable) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -1086,7 +1087,7 @@ func (o *PcloudCloudconnectionsPostGatewayTimeout) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index e2ba3d9128..410933c6c2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsPutOK() @@ -164,7 +165,7 @@ func (o *PcloudCloudconnectionsPutOK) readResponse(response runtime.ClientRespon o.Payload = new(models.CloudConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -234,7 +235,7 @@ func (o *PcloudCloudconnectionsPutAccepted) readResponse(response runtime.Client o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -304,7 +305,7 @@ func (o *PcloudCloudconnectionsPutBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -374,7 +375,7 @@ func (o *PcloudCloudconnectionsPutUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -444,7 +445,7 @@ func (o *PcloudCloudconnectionsPutForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -514,7 +515,7 @@ func (o *PcloudCloudconnectionsPutNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -584,7 +585,7 @@ func (o *PcloudCloudconnectionsPutMethodNotAllowed) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -654,7 +655,7 @@ func (o *PcloudCloudconnectionsPutRequestTimeout) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -724,7 +725,7 @@ func (o *PcloudCloudconnectionsPutConflict) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -794,7 +795,7 @@ func (o *PcloudCloudconnectionsPutUnprocessableEntity) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -864,7 +865,7 @@ func (o *PcloudCloudconnectionsPutInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -934,7 +935,7 @@ func (o *PcloudCloudconnectionsPutServiceUnavailable) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index f106b3e80c..b85e713d53 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_cloud_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallOK() @@ -146,7 +147,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) readResponse(respon o.Payload = new(models.CloudConnectionVirtualPrivateClouds) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) readRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) readRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) rea o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go index c3a5136859..f3e9a0fe02 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go @@ -67,7 +67,7 @@ type ClientService interface { PcloudLocationsDisasterrecoveryGet gets the disaster recovery site details for the current location */ func (a *Client) PcloudLocationsDisasterrecoveryGet(params *PcloudLocationsDisasterrecoveryGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudLocationsDisasterrecoveryGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudLocationsDisasterrecoveryGetParams() } @@ -87,17 +87,22 @@ func (a *Client) PcloudLocationsDisasterrecoveryGet(params *PcloudLocationsDisas for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudLocationsDisasterrecoveryGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.locations.disasterrecovery.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) PcloudLocationsDisasterrecoveryGet(params *PcloudLocationsDisas PcloudLocationsDisasterrecoveryGetall gets all disaster recovery locations supported by power virtual server */ func (a *Client) PcloudLocationsDisasterrecoveryGetall(params *PcloudLocationsDisasterrecoveryGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudLocationsDisasterrecoveryGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudLocationsDisasterrecoveryGetallParams() } @@ -126,17 +131,22 @@ func (a *Client) PcloudLocationsDisasterrecoveryGetall(params *PcloudLocationsDi for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudLocationsDisasterrecoveryGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.locations.disasterrecovery.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go index b66efb7ad8..6b0733507d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_disaster_recovery import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudLocationsDisasterrecoveryGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudLocationsDisasterrecoveryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudLocationsDisasterrecoveryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudLocationsDisasterrecoveryGetOK() @@ -128,7 +129,7 @@ func (o *PcloudLocationsDisasterrecoveryGetOK) readResponse(response runtime.Cli o.Payload = new(models.DisasterRecoveryLocation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudLocationsDisasterrecoveryGetBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudLocationsDisasterrecoveryGetForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudLocationsDisasterrecoveryGetNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go index 92ef95892c..44459f78aa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_disaster_recovery import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudLocationsDisasterrecoveryGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudLocationsDisasterrecoveryGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallOK) readResponse(response runtime. o.Payload = new(models.DisasterRecoveryLocations) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go index 6228966123..41fe971fd8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go @@ -67,7 +67,7 @@ type ClientService interface { PcloudEventsGet gets a single event */ func (a *Client) PcloudEventsGet(params *PcloudEventsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudEventsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudEventsGetParams() } @@ -87,17 +87,22 @@ func (a *Client) PcloudEventsGet(params *PcloudEventsGetParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudEventsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.events.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) PcloudEventsGet(params *PcloudEventsGetParams, authInfo runtime PcloudEventsGetquery gets events from this cloud instance since a specific timestamp */ func (a *Client) PcloudEventsGetquery(params *PcloudEventsGetqueryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudEventsGetqueryOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudEventsGetqueryParams() } @@ -126,17 +131,22 @@ func (a *Client) PcloudEventsGetquery(params *PcloudEventsGetqueryParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudEventsGetqueryOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.events.getquery: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go index 5e7e597194..dff73e8d6f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_events import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudEventsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudEventsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudEventsGetOK) readResponse(response runtime.ClientResponse, consum o.Payload = new(models.Event) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudEventsGetBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudEventsGetUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudEventsGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudEventsGetNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudEventsGetInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go index 8140ed866a..8deeed27b9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -7,6 +7,7 @@ package p_cloud_events import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudEventsGetqueryReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudEventsGetqueryOK() @@ -128,7 +129,7 @@ func (o *PcloudEventsGetqueryOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Events) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudEventsGetqueryBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudEventsGetqueryUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudEventsGetqueryForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudEventsGetqueryNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudEventsGetqueryInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go index 4fbd54d5a8..61ee5e5c01 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go @@ -89,7 +89,7 @@ type ClientService interface { PcloudCloudinstancesImagesDelete deletes an image from a cloud instance */ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesImagesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesImagesDeleteParams() } @@ -109,17 +109,22 @@ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesIm for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesImagesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.images.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -132,7 +137,7 @@ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesIm >*Note*: Support for this API is available till Oct 2022. */ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstancesImagesExportPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesExportPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesImagesExportPostParams() } @@ -152,17 +157,22 @@ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstanc for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesImagesExportPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.images.export.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -171,7 +181,7 @@ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstanc PcloudCloudinstancesImagesGet detaileds info of an image */ func (a *Client) PcloudCloudinstancesImagesGet(params *PcloudCloudinstancesImagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesImagesGetParams() } @@ -191,17 +201,22 @@ func (a *Client) PcloudCloudinstancesImagesGet(params *PcloudCloudinstancesImage for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesImagesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.images.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -210,7 +225,7 @@ func (a *Client) PcloudCloudinstancesImagesGet(params *PcloudCloudinstancesImage PcloudCloudinstancesImagesGetall lists all images for this cloud instance */ func (a *Client) PcloudCloudinstancesImagesGetall(params *PcloudCloudinstancesImagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesImagesGetallParams() } @@ -230,17 +245,22 @@ func (a *Client) PcloudCloudinstancesImagesGetall(params *PcloudCloudinstancesIm for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesImagesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.images.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -249,7 +269,7 @@ func (a *Client) PcloudCloudinstancesImagesGetall(params *PcloudCloudinstancesIm PcloudCloudinstancesImagesPost creates a new image from available images */ func (a *Client) PcloudCloudinstancesImagesPost(params *PcloudCloudinstancesImagesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesPostOK, *PcloudCloudinstancesImagesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesImagesPostParams() } @@ -269,18 +289,22 @@ func (a *Client) PcloudCloudinstancesImagesPost(params *PcloudCloudinstancesImag for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudCloudinstancesImagesPostOK: return value, nil, nil case *PcloudCloudinstancesImagesPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_images: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -289,7 +313,7 @@ func (a *Client) PcloudCloudinstancesImagesPost(params *PcloudCloudinstancesImag PcloudCloudinstancesStockimagesGet detaileds info of an available stock image */ func (a *Client) PcloudCloudinstancesStockimagesGet(params *PcloudCloudinstancesStockimagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStockimagesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesStockimagesGetParams() } @@ -309,17 +333,22 @@ func (a *Client) PcloudCloudinstancesStockimagesGet(params *PcloudCloudinstances for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesStockimagesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.stockimages.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -328,7 +357,7 @@ func (a *Client) PcloudCloudinstancesStockimagesGet(params *PcloudCloudinstances PcloudCloudinstancesStockimagesGetall lists all available stock images */ func (a *Client) PcloudCloudinstancesStockimagesGetall(params *PcloudCloudinstancesStockimagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStockimagesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesStockimagesGetallParams() } @@ -348,17 +377,22 @@ func (a *Client) PcloudCloudinstancesStockimagesGetall(params *PcloudCloudinstan for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesStockimagesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.stockimages.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -371,7 +405,7 @@ func (a *Client) PcloudCloudinstancesStockimagesGetall(params *PcloudCloudinstan >*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudImagesGetParams() } @@ -391,17 +425,22 @@ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudImagesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.images.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -414,7 +453,7 @@ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime >*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudImagesGetallParams() } @@ -434,17 +473,22 @@ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo r for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudImagesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.images.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -453,7 +497,7 @@ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo r PcloudV1CloudinstancesCosimagesGet gets detail of last cos image import job */ func (a *Client) PcloudV1CloudinstancesCosimagesGet(params *PcloudV1CloudinstancesCosimagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV1CloudinstancesCosimagesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV1CloudinstancesCosimagesGetParams() } @@ -473,17 +517,22 @@ func (a *Client) PcloudV1CloudinstancesCosimagesGet(params *PcloudV1Cloudinstanc for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV1CloudinstancesCosimagesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v1.cloudinstances.cosimages.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -492,7 +541,7 @@ func (a *Client) PcloudV1CloudinstancesCosimagesGet(params *PcloudV1Cloudinstanc PcloudV1CloudinstancesCosimagesPost creates an cos image import job */ func (a *Client) PcloudV1CloudinstancesCosimagesPost(params *PcloudV1CloudinstancesCosimagesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV1CloudinstancesCosimagesPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV1CloudinstancesCosimagesPostParams() } @@ -512,17 +561,22 @@ func (a *Client) PcloudV1CloudinstancesCosimagesPost(params *PcloudV1Cloudinstan for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV1CloudinstancesCosimagesPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v1.cloudinstances.cosimages.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -531,7 +585,7 @@ func (a *Client) PcloudV1CloudinstancesCosimagesPost(params *PcloudV1Cloudinstan PcloudV2ImagesExportGet gets detail of last image export job */ func (a *Client) PcloudV2ImagesExportGet(params *PcloudV2ImagesExportGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2ImagesExportGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2ImagesExportGetParams() } @@ -551,17 +605,22 @@ func (a *Client) PcloudV2ImagesExportGet(params *PcloudV2ImagesExportGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2ImagesExportGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.images.export.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -570,7 +629,7 @@ func (a *Client) PcloudV2ImagesExportGet(params *PcloudV2ImagesExportGetParams, PcloudV2ImagesExportPost adds image export job to the jobs queue */ func (a *Client) PcloudV2ImagesExportPost(params *PcloudV2ImagesExportPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2ImagesExportPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2ImagesExportPostParams() } @@ -590,17 +649,22 @@ func (a *Client) PcloudV2ImagesExportPost(params *PcloudV2ImagesExportPostParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2ImagesExportPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.images.export.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go index d7ad65acc2..c5223e3ce0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesImagesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesImagesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesImagesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesImagesDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesImagesDeleteOK) GetPayload() models.Object { func (o *PcloudCloudinstancesImagesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesImagesDeleteBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesImagesDeleteUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesImagesDeleteForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesImagesDeleteNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesImagesDeleteGone) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesImagesDeleteInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go index 713448c3a4..520e56c905 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesImagesExportPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesImagesExportPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesImagesExportPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudCloudinstancesImagesExportPostAccepted() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesImagesExportPostAccepted) GetPayload() models.Objec func (o *PcloudCloudinstancesImagesExportPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesImagesExportPostBadRequest) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesImagesExportPostUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesImagesExportPostForbidden) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesImagesExportPostNotFound) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesImagesExportPostInternalServerError) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go index 386dd1db6f..64917b3a5f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesImagesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesImagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesImagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesImagesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesImagesGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.Image) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesImagesGetBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesImagesGetUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesImagesGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesImagesGetNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesImagesGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go index 2d7b4d1728..c41bbde815 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesImagesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesImagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesImagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesImagesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesImagesGetallOK) readResponse(response runtime.Clien o.Payload = new(models.Images) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesImagesGetallBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesImagesGetallUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesImagesGetallForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesImagesGetallNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesImagesGetallInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 86cc15e7ac..066989c0c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesImagesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesImagesPostOK() @@ -146,7 +147,7 @@ func (o *PcloudCloudinstancesImagesPostOK) readResponse(response runtime.ClientR o.Payload = new(models.Image) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *PcloudCloudinstancesImagesPostCreated) readResponse(response runtime.Cl o.Payload = new(models.Image) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudCloudinstancesImagesPostBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudCloudinstancesImagesPostUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudCloudinstancesImagesPostForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudCloudinstancesImagesPostNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudCloudinstancesImagesPostConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudCloudinstancesImagesPostInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 23c3616ffb..3a2630c8f3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesStockimagesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesStockimagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesStockimagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesStockimagesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesStockimagesGetOK) readResponse(response runtime.Cli o.Payload = new(models.Image) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesStockimagesGetBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesStockimagesGetUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesStockimagesGetForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesStockimagesGetNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesStockimagesGetInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index 793017a33e..994dd10696 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesStockimagesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesStockimagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesStockimagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesStockimagesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesStockimagesGetallOK) readResponse(response runtime. o.Payload = new(models.Images) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesStockimagesGetallBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesStockimagesGetallForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesStockimagesGetallNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go index a502fc2ff9..6a965e574c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudImagesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudImagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudImagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudImagesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudImagesGetOK) readResponse(response runtime.ClientResponse, consum o.Payload = new(models.Image) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudImagesGetBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudImagesGetUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudImagesGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudImagesGetNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudImagesGetInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go index 2b50824cbe..04c5055452 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudImagesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudImagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudImagesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudImagesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudImagesGetallOK) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Images) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudImagesGetallBadRequest) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudImagesGetallUnauthorized) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudImagesGetallForbidden) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudImagesGetallNotFound) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudImagesGetallInternalServerError) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go index b8da793bd9..690b4505ac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV1CloudinstancesCosimagesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV1CloudinstancesCosimagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV1CloudinstancesCosimagesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV1CloudinstancesCosimagesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetOK) readResponse(response runtime.Cli o.Payload = new(models.Job) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go index 036bbb6608..bf70f84f42 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV1CloudinstancesCosimagesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV1CloudinstancesCosimagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV1CloudinstancesCosimagesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV1CloudinstancesCosimagesPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostAccepted) readResponse(response runt o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostConflict) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go index 27e8d1e4f5..d473e86b90 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2ImagesExportGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2ImagesExportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2ImagesExportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2ImagesExportGetOK() @@ -128,7 +129,7 @@ func (o *PcloudV2ImagesExportGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.Job) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2ImagesExportGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2ImagesExportGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2ImagesExportGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2ImagesExportGetNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2ImagesExportGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go index 6abf005840..2762711bc6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_images import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2ImagesExportPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2ImagesExportPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2ImagesExportPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2ImagesExportPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudV2ImagesExportPostAccepted) readResponse(response runtime.ClientR o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudV2ImagesExportPostBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudV2ImagesExportPostUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudV2ImagesExportPostForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudV2ImagesExportPostNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudV2ImagesExportPostConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudV2ImagesExportPostUnprocessableEntity) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudV2ImagesExportPostInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go index 8f7720ee73..3ba8e7d837 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go @@ -62,6 +62,8 @@ type ClientService interface { PcloudCloudinstancesPut(params *PcloudCloudinstancesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesPutOK, error) + PcloudCloudinstancesSharedImagesPut(params *PcloudCloudinstancesSharedImagesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSharedImagesPutOK, error) + SetTransport(transport runtime.ClientTransport) } @@ -69,7 +71,7 @@ type ClientService interface { PcloudCloudinstancesDelete deletes a power cloud instance */ func (a *Client) PcloudCloudinstancesDelete(params *PcloudCloudinstancesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesDeleteParams() } @@ -89,17 +91,22 @@ func (a *Client) PcloudCloudinstancesDelete(params *PcloudCloudinstancesDeletePa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -108,7 +115,7 @@ func (a *Client) PcloudCloudinstancesDelete(params *PcloudCloudinstancesDeletePa PcloudCloudinstancesGet gets a cloud instance s current state information */ func (a *Client) PcloudCloudinstancesGet(params *PcloudCloudinstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesGetParams() } @@ -128,17 +135,22 @@ func (a *Client) PcloudCloudinstancesGet(params *PcloudCloudinstancesGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +159,7 @@ func (a *Client) PcloudCloudinstancesGet(params *PcloudCloudinstancesGetParams, PcloudCloudinstancesPut updates upgrade a cloud instance */ func (a *Client) PcloudCloudinstancesPut(params *PcloudCloudinstancesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesPutParams() } @@ -167,21 +179,70 @@ func (a *Client) PcloudCloudinstancesPut(params *PcloudCloudinstancesPutParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } +/* +PcloudCloudinstancesSharedImagesPut updates shared image settings for a cloud instance +*/ +func (a *Client) PcloudCloudinstancesSharedImagesPut(params *PcloudCloudinstancesSharedImagesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSharedImagesPutOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewPcloudCloudinstancesSharedImagesPutParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.cloudinstances.shared-images.put", + Method: "PUT", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudCloudinstancesSharedImagesPutReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*PcloudCloudinstancesSharedImagesPutOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.shared-images.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + // SetTransport changes the transport on the client func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 380e0d1811..59971e251b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesDeleteOK) GetPayload() models.Object { func (o *PcloudCloudinstancesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesDeleteBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesDeleteUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesDeleteForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesDeleteNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesDeleteGone) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesDeleteInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index 0c968e3767..3074b0f621 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.CloudInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesGetNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index 98f6761134..dadc4760a6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesPutOK() @@ -134,7 +135,7 @@ func (o *PcloudCloudinstancesPutOK) readResponse(response runtime.ClientResponse o.Payload = new(models.CloudInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudCloudinstancesPutBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudCloudinstancesPutUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudCloudinstancesPutForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudCloudinstancesPutNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudCloudinstancesPutUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudCloudinstancesPutInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_parameters.go new file mode 100644 index 0000000000..0a8c6b3502 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_instances + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudCloudinstancesSharedImagesPutParams creates a new PcloudCloudinstancesSharedImagesPutParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPcloudCloudinstancesSharedImagesPutParams() *PcloudCloudinstancesSharedImagesPutParams { + return &PcloudCloudinstancesSharedImagesPutParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudCloudinstancesSharedImagesPutParamsWithTimeout creates a new PcloudCloudinstancesSharedImagesPutParams object +// with the ability to set a timeout on a request. +func NewPcloudCloudinstancesSharedImagesPutParamsWithTimeout(timeout time.Duration) *PcloudCloudinstancesSharedImagesPutParams { + return &PcloudCloudinstancesSharedImagesPutParams{ + timeout: timeout, + } +} + +// NewPcloudCloudinstancesSharedImagesPutParamsWithContext creates a new PcloudCloudinstancesSharedImagesPutParams object +// with the ability to set a context for a request. +func NewPcloudCloudinstancesSharedImagesPutParamsWithContext(ctx context.Context) *PcloudCloudinstancesSharedImagesPutParams { + return &PcloudCloudinstancesSharedImagesPutParams{ + Context: ctx, + } +} + +// NewPcloudCloudinstancesSharedImagesPutParamsWithHTTPClient creates a new PcloudCloudinstancesSharedImagesPutParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudCloudinstancesSharedImagesPutParamsWithHTTPClient(client *http.Client) *PcloudCloudinstancesSharedImagesPutParams { + return &PcloudCloudinstancesSharedImagesPutParams{ + HTTPClient: client, + } +} + +/* +PcloudCloudinstancesSharedImagesPutParams contains all the parameters to send to the API endpoint + + for the pcloud cloudinstances shared images put operation. + + Typically these are written to a http.Request. +*/ +type PcloudCloudinstancesSharedImagesPutParams struct { + + /* Body. + + Shared images settings for a Cloud Instance + */ + Body *models.CloudInstanceSharedImages + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud cloudinstances shared images put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudCloudinstancesSharedImagesPutParams) WithDefaults() *PcloudCloudinstancesSharedImagesPutParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud cloudinstances shared images put params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudCloudinstancesSharedImagesPutParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) WithTimeout(timeout time.Duration) *PcloudCloudinstancesSharedImagesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) WithContext(ctx context.Context) *PcloudCloudinstancesSharedImagesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) WithHTTPClient(client *http.Client) *PcloudCloudinstancesSharedImagesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) WithBody(body *models.CloudInstanceSharedImages) *PcloudCloudinstancesSharedImagesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) SetBody(body *models.CloudInstanceSharedImages) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) WithCloudInstanceID(cloudInstanceID string) *PcloudCloudinstancesSharedImagesPutParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud cloudinstances shared images put params +func (o *PcloudCloudinstancesSharedImagesPutParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudCloudinstancesSharedImagesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_responses.go new file mode 100644 index 0000000000..f571df2284 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_shared_images_put_responses.go @@ -0,0 +1,639 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_instances + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudCloudinstancesSharedImagesPutReader is a Reader for the PcloudCloudinstancesSharedImagesPut structure. +type PcloudCloudinstancesSharedImagesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudCloudinstancesSharedImagesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewPcloudCloudinstancesSharedImagesPutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudCloudinstancesSharedImagesPutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudCloudinstancesSharedImagesPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudCloudinstancesSharedImagesPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesSharedImagesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewPcloudCloudinstancesSharedImagesPutConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPcloudCloudinstancesSharedImagesPutUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPcloudCloudinstancesSharedImagesPutInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images] pcloud.cloudinstances.shared-images.put", response, response.Code()) + } +} + +// NewPcloudCloudinstancesSharedImagesPutOK creates a PcloudCloudinstancesSharedImagesPutOK with default headers values +func NewPcloudCloudinstancesSharedImagesPutOK() *PcloudCloudinstancesSharedImagesPutOK { + return &PcloudCloudinstancesSharedImagesPutOK{} +} + +/* +PcloudCloudinstancesSharedImagesPutOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudCloudinstancesSharedImagesPutOK struct { + Payload *models.CloudInstanceSharedImages +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put o k response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put o k response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put o k response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances shared images put o k response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put o k response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances shared images put o k response +func (o *PcloudCloudinstancesSharedImagesPutOK) Code() int { + return 200 +} + +func (o *PcloudCloudinstancesSharedImagesPutOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutOK %s", 200, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutOK %s", 200, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutOK) GetPayload() *models.CloudInstanceSharedImages { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.CloudInstanceSharedImages) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutBadRequest creates a PcloudCloudinstancesSharedImagesPutBadRequest with default headers values +func NewPcloudCloudinstancesSharedImagesPutBadRequest() *PcloudCloudinstancesSharedImagesPutBadRequest { + return &PcloudCloudinstancesSharedImagesPutBadRequest{} +} + +/* +PcloudCloudinstancesSharedImagesPutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudCloudinstancesSharedImagesPutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put bad request response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put bad request response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put bad request response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put bad request response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put bad request response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances shared images put bad request response +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) Code() int { + return 400 +} + +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutBadRequest %s", 400, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutBadRequest %s", 400, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutUnauthorized creates a PcloudCloudinstancesSharedImagesPutUnauthorized with default headers values +func NewPcloudCloudinstancesSharedImagesPutUnauthorized() *PcloudCloudinstancesSharedImagesPutUnauthorized { + return &PcloudCloudinstancesSharedImagesPutUnauthorized{} +} + +/* +PcloudCloudinstancesSharedImagesPutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesSharedImagesPutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances shared images put unauthorized response +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) Code() int { + return 401 +} + +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutUnauthorized %s", 401, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutUnauthorized %s", 401, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutForbidden creates a PcloudCloudinstancesSharedImagesPutForbidden with default headers values +func NewPcloudCloudinstancesSharedImagesPutForbidden() *PcloudCloudinstancesSharedImagesPutForbidden { + return &PcloudCloudinstancesSharedImagesPutForbidden{} +} + +/* +PcloudCloudinstancesSharedImagesPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesSharedImagesPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put forbidden response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put forbidden response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put forbidden response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put forbidden response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put forbidden response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances shared images put forbidden response +func (o *PcloudCloudinstancesSharedImagesPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesSharedImagesPutForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutForbidden %s", 403, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutForbidden %s", 403, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutNotFound creates a PcloudCloudinstancesSharedImagesPutNotFound with default headers values +func NewPcloudCloudinstancesSharedImagesPutNotFound() *PcloudCloudinstancesSharedImagesPutNotFound { + return &PcloudCloudinstancesSharedImagesPutNotFound{} +} + +/* +PcloudCloudinstancesSharedImagesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesSharedImagesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put not found response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put not found response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put not found response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put not found response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put not found response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances shared images put not found response +func (o *PcloudCloudinstancesSharedImagesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesSharedImagesPutNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutNotFound %s", 404, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutNotFound %s", 404, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutConflict creates a PcloudCloudinstancesSharedImagesPutConflict with default headers values +func NewPcloudCloudinstancesSharedImagesPutConflict() *PcloudCloudinstancesSharedImagesPutConflict { + return &PcloudCloudinstancesSharedImagesPutConflict{} +} + +/* +PcloudCloudinstancesSharedImagesPutConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PcloudCloudinstancesSharedImagesPutConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put conflict response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put conflict response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put conflict response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put conflict response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put conflict response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances shared images put conflict response +func (o *PcloudCloudinstancesSharedImagesPutConflict) Code() int { + return 409 +} + +func (o *PcloudCloudinstancesSharedImagesPutConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutConflict %s", 409, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutConflict %s", 409, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutUnprocessableEntity creates a PcloudCloudinstancesSharedImagesPutUnprocessableEntity with default headers values +func NewPcloudCloudinstancesSharedImagesPutUnprocessableEntity() *PcloudCloudinstancesSharedImagesPutUnprocessableEntity { + return &PcloudCloudinstancesSharedImagesPutUnprocessableEntity{} +} + +/* +PcloudCloudinstancesSharedImagesPutUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity +*/ +type PcloudCloudinstancesSharedImagesPutUnprocessableEntity struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances shared images put unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances shared images put unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances shared images put unprocessable entity response +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) Code() int { + return 422 +} + +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutUnprocessableEntity %s", 422, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutUnprocessableEntity %s", 422, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudCloudinstancesSharedImagesPutInternalServerError creates a PcloudCloudinstancesSharedImagesPutInternalServerError with default headers values +func NewPcloudCloudinstancesSharedImagesPutInternalServerError() *PcloudCloudinstancesSharedImagesPutInternalServerError { + return &PcloudCloudinstancesSharedImagesPutInternalServerError{} +} + +/* +PcloudCloudinstancesSharedImagesPutInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudCloudinstancesSharedImagesPutInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances shared images put internal server error response has a 2xx status code +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances shared images put internal server error response has a 3xx status code +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances shared images put internal server error response has a 4xx status code +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances shared images put internal server error response has a 5xx status code +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances shared images put internal server error response a status code equal to that given +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances shared images put internal server error response +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) Code() int { + return 500 +} + +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutInternalServerError %s", 500, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-images][%d] pcloudCloudinstancesSharedImagesPutInternalServerError %s", 500, payload) +} + +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSharedImagesPutInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go index d023198832..d2c320b178 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go @@ -69,7 +69,7 @@ type ClientService interface { PcloudCloudinstancesJobsDelete deletes a cloud instance job */ func (a *Client) PcloudCloudinstancesJobsDelete(params *PcloudCloudinstancesJobsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesJobsDeleteParams() } @@ -89,17 +89,22 @@ func (a *Client) PcloudCloudinstancesJobsDelete(params *PcloudCloudinstancesJobs for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesJobsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.jobs.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -108,7 +113,7 @@ func (a *Client) PcloudCloudinstancesJobsDelete(params *PcloudCloudinstancesJobs PcloudCloudinstancesJobsGet lists the detail of a job */ func (a *Client) PcloudCloudinstancesJobsGet(params *PcloudCloudinstancesJobsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesJobsGetParams() } @@ -128,17 +133,22 @@ func (a *Client) PcloudCloudinstancesJobsGet(params *PcloudCloudinstancesJobsGet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesJobsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.jobs.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +157,7 @@ func (a *Client) PcloudCloudinstancesJobsGet(params *PcloudCloudinstancesJobsGet PcloudCloudinstancesJobsGetall lists up to the last 5 jobs initiated by the cloud instance */ func (a *Client) PcloudCloudinstancesJobsGetall(params *PcloudCloudinstancesJobsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesJobsGetallParams() } @@ -167,17 +177,22 @@ func (a *Client) PcloudCloudinstancesJobsGetall(params *PcloudCloudinstancesJobs for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesJobsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.jobs.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go index 615f8e8636..c8f8b3995c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_jobs import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesJobsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesJobsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesJobsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesJobsDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesJobsDeleteOK) GetPayload() models.Object { func (o *PcloudCloudinstancesJobsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesJobsDeleteBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesJobsDeleteUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesJobsDeleteForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesJobsDeleteNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesJobsDeleteConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesJobsDeleteInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go index 21e1563b35..c48ae107e7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_jobs import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesJobsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesJobsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesJobsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesJobsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesJobsGetOK) readResponse(response runtime.ClientResp o.Payload = new(models.Job) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesJobsGetBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesJobsGetUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesJobsGetForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesJobsGetNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesJobsGetInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go index c5dfea0450..dd08eb0b07 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_jobs import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesJobsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesJobsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesJobsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesJobsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesJobsGetallOK) readResponse(response runtime.ClientR o.Payload = new(models.Jobs) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesJobsGetallBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesJobsGetallUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesJobsGetallForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesJobsGetallNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesJobsGetallInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go index 5f97d7f292..813a3da98b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go @@ -83,7 +83,7 @@ type ClientService interface { PcloudNetworksDelete deletes a network */ func (a *Client) PcloudNetworksDelete(params *PcloudNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksDeleteParams() } @@ -103,17 +103,22 @@ func (a *Client) PcloudNetworksDelete(params *PcloudNetworksDeleteParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -122,7 +127,7 @@ func (a *Client) PcloudNetworksDelete(params *PcloudNetworksDeleteParams, authIn PcloudNetworksGet gets a network s current state information */ func (a *Client) PcloudNetworksGet(params *PcloudNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksGetParams() } @@ -142,17 +147,22 @@ func (a *Client) PcloudNetworksGet(params *PcloudNetworksGetParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -161,7 +171,7 @@ func (a *Client) PcloudNetworksGet(params *PcloudNetworksGetParams, authInfo run PcloudNetworksGetall gets all networks in this cloud instance */ func (a *Client) PcloudNetworksGetall(params *PcloudNetworksGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksGetallParams() } @@ -181,17 +191,22 @@ func (a *Client) PcloudNetworksGetall(params *PcloudNetworksGetallParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -202,7 +217,7 @@ PcloudNetworksPortsDelete deletes a network port This API is deprecated for /v1/networks/{network_id}/network-interfaces/{network_interface_id}. */ func (a *Client) PcloudNetworksPortsDelete(params *PcloudNetworksPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPortsDeleteParams() } @@ -222,17 +237,22 @@ func (a *Client) PcloudNetworksPortsDelete(params *PcloudNetworksPortsDeletePara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPortsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.ports.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -243,7 +263,7 @@ PcloudNetworksPortsGet gets a port s information This API is deprecated for /v1/networks/{network_id}/network-interfaces/{network_interface_id}. */ func (a *Client) PcloudNetworksPortsGet(params *PcloudNetworksPortsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPortsGetParams() } @@ -263,17 +283,22 @@ func (a *Client) PcloudNetworksPortsGet(params *PcloudNetworksPortsGetParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPortsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.ports.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -284,7 +309,7 @@ PcloudNetworksPortsGetall gets all ports for this network This API is deprecated for /v1/networks/{network_id}/network-interfaces. */ func (a *Client) PcloudNetworksPortsGetall(params *PcloudNetworksPortsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPortsGetallParams() } @@ -304,17 +329,22 @@ func (a *Client) PcloudNetworksPortsGetall(params *PcloudNetworksPortsGetallPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPortsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.ports.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -325,7 +355,7 @@ PcloudNetworksPortsPost performs port addition deletion and listing This API is deprecated for /v1/networks/{network_id}/network-interfaces. */ func (a *Client) PcloudNetworksPortsPost(params *PcloudNetworksPortsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPortsPostParams() } @@ -345,17 +375,22 @@ func (a *Client) PcloudNetworksPortsPost(params *PcloudNetworksPortsPostParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPortsPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.ports.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -366,7 +401,7 @@ PcloudNetworksPortsPut updates a port s information This API is deprecated for /v1/networks/{network_id}/network-interfaces/{network_interface_id}. */ func (a *Client) PcloudNetworksPortsPut(params *PcloudNetworksPortsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPortsPutParams() } @@ -386,17 +421,22 @@ func (a *Client) PcloudNetworksPortsPut(params *PcloudNetworksPortsPutParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPortsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.ports.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -405,7 +445,7 @@ func (a *Client) PcloudNetworksPortsPut(params *PcloudNetworksPortsPutParams, au PcloudNetworksPost creates a new network */ func (a *Client) PcloudNetworksPost(params *PcloudNetworksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPostOK, *PcloudNetworksPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPostParams() } @@ -425,18 +465,22 @@ func (a *Client) PcloudNetworksPost(params *PcloudNetworksPostParams, authInfo r for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudNetworksPostOK: return value, nil, nil case *PcloudNetworksPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_networks: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -445,7 +489,7 @@ func (a *Client) PcloudNetworksPost(params *PcloudNetworksPostParams, authInfo r PcloudNetworksPut updates a network */ func (a *Client) PcloudNetworksPut(params *PcloudNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudNetworksPutParams() } @@ -465,17 +509,22 @@ func (a *Client) PcloudNetworksPut(params *PcloudNetworksPutParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudNetworksPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.networks.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go index e16ec77985..698d19fb95 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksDeleteOK() @@ -54,6 +55,12 @@ func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 409: + result := NewPcloudNetworksDeleteConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudNetworksDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -132,7 +139,7 @@ func (o *PcloudNetworksDeleteOK) GetPayload() models.Object { func (o *PcloudNetworksDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +209,7 @@ func (o *PcloudNetworksDeleteBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +279,7 @@ func (o *PcloudNetworksDeleteUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +349,7 @@ func (o *PcloudNetworksDeleteForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +419,77 @@ func (o *PcloudNetworksDeleteNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudNetworksDeleteConflict creates a PcloudNetworksDeleteConflict with default headers values +func NewPcloudNetworksDeleteConflict() *PcloudNetworksDeleteConflict { + return &PcloudNetworksDeleteConflict{} +} + +/* +PcloudNetworksDeleteConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PcloudNetworksDeleteConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks delete conflict response has a 2xx status code +func (o *PcloudNetworksDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete conflict response has a 3xx status code +func (o *PcloudNetworksDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete conflict response has a 4xx status code +func (o *PcloudNetworksDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete conflict response has a 5xx status code +func (o *PcloudNetworksDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete conflict response a status code equal to that given +func (o *PcloudNetworksDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud networks delete conflict response +func (o *PcloudNetworksDeleteConflict) Code() int { + return 409 +} + +func (o *PcloudNetworksDeleteConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteConflict %s", 409, payload) +} + +func (o *PcloudNetworksDeleteConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteConflict %s", 409, payload) +} + +func (o *PcloudNetworksDeleteConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksDeleteConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +559,7 @@ func (o *PcloudNetworksDeleteGone) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +629,7 @@ func (o *PcloudNetworksDeleteInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go index ab247e2e98..ee328cce7a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksGetOK() @@ -128,7 +129,7 @@ func (o *PcloudNetworksGetOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Network) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudNetworksGetBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudNetworksGetUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudNetworksGetForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudNetworksGetNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudNetworksGetInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index fbb2e47c06..3cc9cfd8c0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudNetworksGetallOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Networks) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudNetworksGetallBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudNetworksGetallUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudNetworksGetallForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudNetworksGetallNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudNetworksGetallInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go index dad8ee6a6c..cca8a3fae1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPortsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPortsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPortsDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudNetworksPortsDeleteOK) GetPayload() models.Object { func (o *PcloudNetworksPortsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudNetworksPortsDeleteBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudNetworksPortsDeleteUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudNetworksPortsDeleteForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudNetworksPortsDeleteNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudNetworksPortsDeleteGone) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudNetworksPortsDeleteInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index f9591f57f8..7f5d16553b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPortsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPortsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudNetworksPortsGetOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.NetworkPort) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudNetworksPortsGetBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudNetworksPortsGetUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudNetworksPortsGetForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudNetworksPortsGetNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudNetworksPortsGetInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go index 0c8c61652d..e92d4e1eab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPortsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPortsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPortsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPortsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudNetworksPortsGetallOK) readResponse(response runtime.ClientRespon o.Payload = new(models.NetworkPorts) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudNetworksPortsGetallBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudNetworksPortsGetallUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudNetworksPortsGetallForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudNetworksPortsGetallNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudNetworksPortsGetallInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go index b596576980..acb70ec276 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPortsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPortsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPortsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewPcloudNetworksPortsPostCreated() @@ -140,7 +141,7 @@ func (o *PcloudNetworksPortsPostCreated) readResponse(response runtime.ClientRes o.Payload = new(models.NetworkPort) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudNetworksPortsPostBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudNetworksPortsPostUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudNetworksPortsPostForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudNetworksPortsPostNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudNetworksPortsPostConflict) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudNetworksPortsPostUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudNetworksPortsPostInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go index 28ef8ea09e..24e2424861 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPortsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPortsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPortsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPortsPutOK() @@ -134,7 +135,7 @@ func (o *PcloudNetworksPortsPutOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.NetworkPort) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudNetworksPortsPutBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudNetworksPortsPutUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudNetworksPortsPutForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudNetworksPortsPutNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudNetworksPortsPutUnprocessableEntity) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudNetworksPortsPutInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go index 982c363ef9..cf8f139c3a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPostOK() @@ -152,7 +153,7 @@ func (o *PcloudNetworksPostOK) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Network) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -222,7 +223,7 @@ func (o *PcloudNetworksPostCreated) readResponse(response runtime.ClientResponse o.Payload = new(models.Network) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -292,7 +293,7 @@ func (o *PcloudNetworksPostBadRequest) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -362,7 +363,7 @@ func (o *PcloudNetworksPostUnauthorized) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -432,7 +433,7 @@ func (o *PcloudNetworksPostForbidden) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -502,7 +503,7 @@ func (o *PcloudNetworksPostNotFound) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -572,7 +573,7 @@ func (o *PcloudNetworksPostConflict) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -642,7 +643,7 @@ func (o *PcloudNetworksPostUnprocessableEntity) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -712,7 +713,7 @@ func (o *PcloudNetworksPostInternalServerError) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -782,7 +783,7 @@ func (o *PcloudNetworksPostStatus550) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go index 406d09f8ae..bae9405a25 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_networks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudNetworksPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudNetworksPutOK() @@ -134,7 +135,7 @@ func (o *PcloudNetworksPutOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Network) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudNetworksPutBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudNetworksPutUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudNetworksPutForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudNetworksPutNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudNetworksPutUnprocessableEntity) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudNetworksPutInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go index 372270f55d..11dbd38e4c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go @@ -109,7 +109,7 @@ PcloudPvminstancesActionPost performs an action on a p VM instance Corresponding actions are 'start', 'stop', 'reboot', 'immediate-shutdown', 'reset' */ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesActionPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesActionPostParams() } @@ -129,17 +129,22 @@ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesActionPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.action.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -152,7 +157,7 @@ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPo >*Note*: Support for this API is available till Oct 2022. */ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesCapturePostOK, *PcloudPvminstancesCapturePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesCapturePostParams() } @@ -172,18 +177,22 @@ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapture for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudPvminstancesCapturePostOK: return value, nil, nil case *PcloudPvminstancesCapturePostAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_p_vm_instances: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -192,7 +201,7 @@ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapture PcloudPvminstancesClonePost clones a p VM instance */ func (a *Client) PcloudPvminstancesClonePost(params *PcloudPvminstancesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesClonePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesClonePostParams() } @@ -212,17 +221,22 @@ func (a *Client) PcloudPvminstancesClonePost(params *PcloudPvminstancesClonePost for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesClonePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.clone.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -231,7 +245,7 @@ func (a *Client) PcloudPvminstancesClonePost(params *PcloudPvminstancesClonePost PcloudPvminstancesConsoleGet lists all console languages */ func (a *Client) PcloudPvminstancesConsoleGet(params *PcloudPvminstancesConsoleGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsoleGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesConsoleGetParams() } @@ -251,17 +265,22 @@ func (a *Client) PcloudPvminstancesConsoleGet(params *PcloudPvminstancesConsoleG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesConsoleGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.console.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -270,7 +289,7 @@ func (a *Client) PcloudPvminstancesConsoleGet(params *PcloudPvminstancesConsoleG PcloudPvminstancesConsolePost generates the no v n c console URL */ func (a *Client) PcloudPvminstancesConsolePost(params *PcloudPvminstancesConsolePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsolePostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesConsolePostParams() } @@ -290,17 +309,22 @@ func (a *Client) PcloudPvminstancesConsolePost(params *PcloudPvminstancesConsole for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesConsolePostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.console.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -309,7 +333,7 @@ func (a *Client) PcloudPvminstancesConsolePost(params *PcloudPvminstancesConsole PcloudPvminstancesConsolePut updates p VM instance console language code */ func (a *Client) PcloudPvminstancesConsolePut(params *PcloudPvminstancesConsolePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsolePutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesConsolePutParams() } @@ -329,17 +353,22 @@ func (a *Client) PcloudPvminstancesConsolePut(params *PcloudPvminstancesConsoleP for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesConsolePutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.console.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -348,7 +377,7 @@ func (a *Client) PcloudPvminstancesConsolePut(params *PcloudPvminstancesConsoleP PcloudPvminstancesDelete deletes a p cloud p VM instance */ func (a *Client) PcloudPvminstancesDelete(params *PcloudPvminstancesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesDeleteParams() } @@ -368,17 +397,22 @@ func (a *Client) PcloudPvminstancesDelete(params *PcloudPvminstancesDeleteParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -387,7 +421,7 @@ func (a *Client) PcloudPvminstancesDelete(params *PcloudPvminstancesDeleteParams PcloudPvminstancesGet gets a p VM instance s current state or information */ func (a *Client) PcloudPvminstancesGet(params *PcloudPvminstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesGetParams() } @@ -407,17 +441,22 @@ func (a *Client) PcloudPvminstancesGet(params *PcloudPvminstancesGetParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -426,7 +465,7 @@ func (a *Client) PcloudPvminstancesGet(params *PcloudPvminstancesGetParams, auth PcloudPvminstancesGetall gets all the pvm instances for this cloud instance */ func (a *Client) PcloudPvminstancesGetall(params *PcloudPvminstancesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesGetallParams() } @@ -446,17 +485,22 @@ func (a *Client) PcloudPvminstancesGetall(params *PcloudPvminstancesGetallParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -465,7 +509,7 @@ func (a *Client) PcloudPvminstancesGetall(params *PcloudPvminstancesGetallParams PcloudPvminstancesNetworksDelete removes all address of network from a p VM instance */ func (a *Client) PcloudPvminstancesNetworksDelete(params *PcloudPvminstancesNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesNetworksDeleteParams() } @@ -485,17 +529,22 @@ func (a *Client) PcloudPvminstancesNetworksDelete(params *PcloudPvminstancesNetw for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesNetworksDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.networks.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -504,7 +553,7 @@ func (a *Client) PcloudPvminstancesNetworksDelete(params *PcloudPvminstancesNetw PcloudPvminstancesNetworksGet gets a p VM instance s network information */ func (a *Client) PcloudPvminstancesNetworksGet(params *PcloudPvminstancesNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesNetworksGetParams() } @@ -524,17 +573,22 @@ func (a *Client) PcloudPvminstancesNetworksGet(params *PcloudPvminstancesNetwork for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesNetworksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.networks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -543,7 +597,7 @@ func (a *Client) PcloudPvminstancesNetworksGet(params *PcloudPvminstancesNetwork PcloudPvminstancesNetworksGetall gets all networks for this p VM instance */ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetworksGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesNetworksGetallParams() } @@ -563,17 +617,22 @@ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetw for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesNetworksGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.networks.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -582,7 +641,7 @@ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetw PcloudPvminstancesNetworksPost performs network addition */ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetworksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesNetworksPostParams() } @@ -602,17 +661,22 @@ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetwor for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesNetworksPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.networks.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -621,7 +685,7 @@ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetwor PcloudPvminstancesOperationsPost performs an operation on a p VM instance */ func (a *Client) PcloudPvminstancesOperationsPost(params *PcloudPvminstancesOperationsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesOperationsPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesOperationsPostParams() } @@ -641,17 +705,22 @@ func (a *Client) PcloudPvminstancesOperationsPost(params *PcloudPvminstancesOper for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesOperationsPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.operations.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -660,7 +729,7 @@ func (a *Client) PcloudPvminstancesOperationsPost(params *PcloudPvminstancesOper PcloudPvminstancesPost creates a new power VM instance */ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesPostOK, *PcloudPvminstancesPostCreated, *PcloudPvminstancesPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesPostParams() } @@ -680,11 +749,12 @@ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudPvminstancesPostOK: return value, nil, nil, nil @@ -693,7 +763,10 @@ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, au case *PcloudPvminstancesPostAccepted: return nil, nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_p_vm_instances: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -702,7 +775,7 @@ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, au PcloudPvminstancesPut updates a p cloud p VM instance */ func (a *Client) PcloudPvminstancesPut(params *PcloudPvminstancesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesPutParams() } @@ -722,17 +795,22 @@ func (a *Client) PcloudPvminstancesPut(params *PcloudPvminstancesPutParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesPutAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -741,7 +819,7 @@ func (a *Client) PcloudPvminstancesPut(params *PcloudPvminstancesPutParams, auth PcloudPvminstancesSnapshotsGetall gets all snapshots for this p VM instance */ func (a *Client) PcloudPvminstancesSnapshotsGetall(params *PcloudPvminstancesSnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesSnapshotsGetallParams() } @@ -761,17 +839,22 @@ func (a *Client) PcloudPvminstancesSnapshotsGetall(params *PcloudPvminstancesSna for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesSnapshotsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.snapshots.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -780,7 +863,7 @@ func (a *Client) PcloudPvminstancesSnapshotsGetall(params *PcloudPvminstancesSna PcloudPvminstancesSnapshotsPost creates a p VM instance snapshot */ func (a *Client) PcloudPvminstancesSnapshotsPost(params *PcloudPvminstancesSnapshotsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesSnapshotsPostParams() } @@ -800,17 +883,22 @@ func (a *Client) PcloudPvminstancesSnapshotsPost(params *PcloudPvminstancesSnaps for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesSnapshotsPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.snapshots.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -819,7 +907,7 @@ func (a *Client) PcloudPvminstancesSnapshotsPost(params *PcloudPvminstancesSnaps PcloudPvminstancesSnapshotsRestorePost restores a p VM instance snapshot */ func (a *Client) PcloudPvminstancesSnapshotsRestorePost(params *PcloudPvminstancesSnapshotsRestorePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsRestorePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesSnapshotsRestorePostParams() } @@ -839,17 +927,22 @@ func (a *Client) PcloudPvminstancesSnapshotsRestorePost(params *PcloudPvminstanc for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesSnapshotsRestorePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.snapshots.restore.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -858,7 +951,7 @@ func (a *Client) PcloudPvminstancesSnapshotsRestorePost(params *PcloudPvminstanc PcloudV2PvminstancesCaptureGet gets detail of last capture job */ func (a *Client) PcloudV2PvminstancesCaptureGet(params *PcloudV2PvminstancesCaptureGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesCaptureGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2PvminstancesCaptureGetParams() } @@ -878,17 +971,22 @@ func (a *Client) PcloudV2PvminstancesCaptureGet(params *PcloudV2PvminstancesCapt for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2PvminstancesCaptureGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.pvminstances.capture.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -897,7 +995,7 @@ func (a *Client) PcloudV2PvminstancesCaptureGet(params *PcloudV2PvminstancesCapt PcloudV2PvminstancesCapturePost adds a capture pvm instance to the jobs queue */ func (a *Client) PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesCapturePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2PvminstancesCapturePostParams() } @@ -917,17 +1015,22 @@ func (a *Client) PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCap for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2PvminstancesCapturePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.pvminstances.capture.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -936,7 +1039,7 @@ func (a *Client) PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCap PcloudV2PvminstancesGetall gets all the pvm instances for this cloud instance */ func (a *Client) PcloudV2PvminstancesGetall(params *PcloudV2PvminstancesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2PvminstancesGetallParams() } @@ -956,17 +1059,22 @@ func (a *Client) PcloudV2PvminstancesGetall(params *PcloudV2PvminstancesGetallPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2PvminstancesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.pvminstances.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go index e97e8aed16..64bd276f4e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesActionPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesActionPostOK() @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesActionPostOK) GetPayload() models.Object { func (o *PcloudPvminstancesActionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesActionPostBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesActionPostUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesActionPostForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesActionPostNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesActionPostConflict) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesActionPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go index 277a94d13b..b5029ab08f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesCapturePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesCapturePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesCapturePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesCapturePostOK() @@ -144,7 +145,7 @@ func (o *PcloudPvminstancesCapturePostOK) GetPayload() models.Object { func (o *PcloudPvminstancesCapturePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -212,7 +213,7 @@ func (o *PcloudPvminstancesCapturePostAccepted) GetPayload() models.Object { func (o *PcloudPvminstancesCapturePostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -282,7 +283,7 @@ func (o *PcloudPvminstancesCapturePostBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -352,7 +353,7 @@ func (o *PcloudPvminstancesCapturePostUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -422,7 +423,7 @@ func (o *PcloudPvminstancesCapturePostForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -492,7 +493,7 @@ func (o *PcloudPvminstancesCapturePostNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -562,7 +563,7 @@ func (o *PcloudPvminstancesCapturePostConflict) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -632,7 +633,7 @@ func (o *PcloudPvminstancesCapturePostUnprocessableEntity) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -702,7 +703,7 @@ func (o *PcloudPvminstancesCapturePostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index 60397da2b3..ffd895e4e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesClonePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesClonePostAccepted() @@ -146,7 +147,7 @@ func (o *PcloudPvminstancesClonePostAccepted) readResponse(response runtime.Clie o.Payload = new(models.PVMInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *PcloudPvminstancesClonePostBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudPvminstancesClonePostUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudPvminstancesClonePostForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudPvminstancesClonePostNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudPvminstancesClonePostConflict) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudPvminstancesClonePostGone) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudPvminstancesClonePostUnprocessableEntity) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudPvminstancesClonePostInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go index 85083359d9..8ca5a2ad60 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesConsoleGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesConsoleGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesConsoleGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesConsoleGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesConsoleGetOK) readResponse(response runtime.ClientRes o.Payload = new(models.ConsoleLanguages) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesConsoleGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesConsoleGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesConsoleGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesConsoleGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesConsoleGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index 7bbc67ed62..c785c3df7f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesConsolePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewPcloudPvminstancesConsolePostCreated() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesConsolePostCreated) readResponse(response runtime.Cli o.Payload = new(models.PVMInstanceConsole) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesConsolePostBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesConsolePostUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesConsolePostForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesConsolePostNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesConsolePostConflict) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesConsolePostUnprocessableEntity) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesConsolePostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go index 21f30b57ea..fd1d1dbc26 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesConsolePutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesConsolePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesConsolePutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesConsolePutOK() @@ -134,7 +135,7 @@ func (o *PcloudPvminstancesConsolePutOK) readResponse(response runtime.ClientRes o.Payload = new(models.ConsoleLanguage) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudPvminstancesConsolePutBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudPvminstancesConsolePutUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudPvminstancesConsolePutForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudPvminstancesConsolePutNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudPvminstancesConsolePutConflict) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudPvminstancesConsolePutInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go index 19f033b09b..286b75891e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesDeleteOK() @@ -138,7 +139,7 @@ func (o *PcloudPvminstancesDeleteOK) GetPayload() models.Object { func (o *PcloudPvminstancesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -208,7 +209,7 @@ func (o *PcloudPvminstancesDeleteBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -278,7 +279,7 @@ func (o *PcloudPvminstancesDeleteUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -348,7 +349,7 @@ func (o *PcloudPvminstancesDeleteForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -418,7 +419,7 @@ func (o *PcloudPvminstancesDeleteNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -488,7 +489,7 @@ func (o *PcloudPvminstancesDeleteConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -558,7 +559,7 @@ func (o *PcloudPvminstancesDeleteGone) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -628,7 +629,7 @@ func (o *PcloudPvminstancesDeleteInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go index c520c6c9e3..31988f4de6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesGetOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.PVMInstance) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesGetBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesGetUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesGetForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesGetNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesGetInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index 411ef74ba6..beb4cea75a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesGetallOK() @@ -134,7 +135,7 @@ func (o *PcloudPvminstancesGetallOK) readResponse(response runtime.ClientRespons o.Payload = new(models.PVMInstances) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudPvminstancesGetallBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudPvminstancesGetallUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudPvminstancesGetallForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudPvminstancesGetallNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudPvminstancesGetallRequestTimeout) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudPvminstancesGetallInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 6649946ad1..b08fd400e8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesNetworksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesNetworksDeleteOK() @@ -138,7 +139,7 @@ func (o *PcloudPvminstancesNetworksDeleteOK) GetPayload() models.Object { func (o *PcloudPvminstancesNetworksDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -208,7 +209,7 @@ func (o *PcloudPvminstancesNetworksDeleteBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -278,7 +279,7 @@ func (o *PcloudPvminstancesNetworksDeleteUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -348,7 +349,7 @@ func (o *PcloudPvminstancesNetworksDeleteForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -418,7 +419,7 @@ func (o *PcloudPvminstancesNetworksDeleteNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -488,7 +489,7 @@ func (o *PcloudPvminstancesNetworksDeleteConflict) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -558,7 +559,7 @@ func (o *PcloudPvminstancesNetworksDeleteGone) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -628,7 +629,7 @@ func (o *PcloudPvminstancesNetworksDeleteInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index 066032b931..cea8703c1d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesNetworksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesNetworksGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesNetworksGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.PVMInstanceNetworks) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesNetworksGetBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesNetworksGetUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesNetworksGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesNetworksGetNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesNetworksGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index 1c6a6f1001..e75d513cbb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesNetworksGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesNetworksGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesNetworksGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesNetworksGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesNetworksGetallOK) readResponse(response runtime.Clien o.Payload = new(models.PVMInstanceNetworks) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesNetworksGetallBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesNetworksGetallUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesNetworksGetallForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesNetworksGetallNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesNetworksGetallInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index 9048edeefc..05bd41d23b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesNetworksPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesNetworksPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewPcloudPvminstancesNetworksPostCreated() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesNetworksPostCreated) readResponse(response runtime.Cl o.Payload = new(models.PVMInstanceNetwork) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesNetworksPostBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesNetworksPostUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesNetworksPostForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesNetworksPostNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesNetworksPostConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesNetworksPostInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index 0844f328d7..ce1f557031 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesOperationsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesOperationsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesOperationsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesOperationsPostOK() @@ -138,7 +139,7 @@ func (o *PcloudPvminstancesOperationsPostOK) GetPayload() models.Object { func (o *PcloudPvminstancesOperationsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -208,7 +209,7 @@ func (o *PcloudPvminstancesOperationsPostBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -278,7 +279,7 @@ func (o *PcloudPvminstancesOperationsPostUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -348,7 +349,7 @@ func (o *PcloudPvminstancesOperationsPostForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -418,7 +419,7 @@ func (o *PcloudPvminstancesOperationsPostNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -488,7 +489,7 @@ func (o *PcloudPvminstancesOperationsPostConflict) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -558,7 +559,7 @@ func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -628,7 +629,7 @@ func (o *PcloudPvminstancesOperationsPostInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go index 16e556e5ba..164f7d42b6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesPostOK() @@ -156,7 +157,7 @@ func (o *PcloudPvminstancesPostOK) GetPayload() models.PVMInstanceList { func (o *PcloudPvminstancesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -224,7 +225,7 @@ func (o *PcloudPvminstancesPostCreated) GetPayload() models.PVMInstanceList { func (o *PcloudPvminstancesPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -292,7 +293,7 @@ func (o *PcloudPvminstancesPostAccepted) GetPayload() models.PVMInstanceList { func (o *PcloudPvminstancesPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -362,7 +363,7 @@ func (o *PcloudPvminstancesPostBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -432,7 +433,7 @@ func (o *PcloudPvminstancesPostUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -502,7 +503,7 @@ func (o *PcloudPvminstancesPostForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -572,7 +573,7 @@ func (o *PcloudPvminstancesPostNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -642,7 +643,7 @@ func (o *PcloudPvminstancesPostConflict) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -712,7 +713,7 @@ func (o *PcloudPvminstancesPostUnprocessableEntity) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -782,7 +783,7 @@ func (o *PcloudPvminstancesPostInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -852,7 +853,7 @@ func (o *PcloudPvminstancesPostGatewayTimeout) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go index ee6dc36648..66037ef2da 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesPutAccepted() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesPutAccepted) readResponse(response runtime.ClientResp o.Payload = new(models.PVMInstanceUpdateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesPutBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesPutUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesPutForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesPutNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesPutConflict) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesPutUnprocessableEntity) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesPutInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go index f093e0305d..ff0da6017f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesSnapshotsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesSnapshotsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesSnapshotsGetallOK) readResponse(response runtime.Clie o.Payload = new(models.Snapshots) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesSnapshotsGetallBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesSnapshotsGetallForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesSnapshotsGetallNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go index 94ef37d943..b48da09365 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesSnapshotsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesSnapshotsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesSnapshotsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesSnapshotsPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesSnapshotsPostAccepted) readResponse(response runtime. o.Payload = new(models.SnapshotCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesSnapshotsPostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesSnapshotsPostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesSnapshotsPostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesSnapshotsPostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesSnapshotsPostConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesSnapshotsPostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go index 1ceae2e9d2..f07d612ef3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesSnapshotsRestorePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesSnapshotsRestorePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesSnapshotsRestorePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesSnapshotsRestorePostAccepted() @@ -134,7 +135,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) readResponse(response r o.Payload = new(models.Snapshot) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostConflict) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go index b438eef9dd..87c4fa65ca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2PvminstancesCaptureGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2PvminstancesCaptureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2PvminstancesCaptureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2PvminstancesCaptureGetOK() @@ -128,7 +129,7 @@ func (o *PcloudV2PvminstancesCaptureGetOK) readResponse(response runtime.ClientR o.Payload = new(models.Job) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2PvminstancesCaptureGetBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2PvminstancesCaptureGetUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2PvminstancesCaptureGetForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2PvminstancesCaptureGetNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2PvminstancesCaptureGetInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go index 1213c38bb9..3533cd2951 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2PvminstancesCapturePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2PvminstancesCapturePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2PvminstancesCapturePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2PvminstancesCapturePostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudV2PvminstancesCapturePostAccepted) readResponse(response runtime. o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudV2PvminstancesCapturePostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudV2PvminstancesCapturePostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudV2PvminstancesCapturePostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudV2PvminstancesCapturePostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudV2PvminstancesCapturePostConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudV2PvminstancesCapturePostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go index 52f5842ac4..61712a2f6c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_p_vm_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2PvminstancesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2PvminstancesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2PvminstancesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2PvminstancesGetallOK() @@ -134,7 +135,7 @@ func (o *PcloudV2PvminstancesGetallOK) readResponse(response runtime.ClientRespo o.Payload = new(models.PVMInstancesV2) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2PvminstancesGetallBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2PvminstancesGetallUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2PvminstancesGetallForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2PvminstancesGetallNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2PvminstancesGetallRequestTimeout) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2PvminstancesGetallInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go index 7ed0532a49..d141a57125 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go @@ -75,7 +75,7 @@ type ClientService interface { PcloudPlacementgroupsDelete deletes server placement group */ func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsDeleteParams() } @@ -95,17 +95,22 @@ func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDelete for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -114,7 +119,7 @@ func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDelete PcloudPlacementgroupsGet gets server placement group detail */ func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsGetParams() } @@ -134,17 +139,22 @@ func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -153,7 +163,7 @@ func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams PcloudPlacementgroupsGetall gets all server placement groups */ func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsGetallParams() } @@ -173,17 +183,22 @@ func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetall for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -192,7 +207,7 @@ func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetall PcloudPlacementgroupsMembersDelete removes server from placement group */ func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsMembersDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsMembersDeleteParams() } @@ -212,17 +227,22 @@ func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroup for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsMembersDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.members.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -231,7 +251,7 @@ func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroup PcloudPlacementgroupsMembersPost adds server to placement group */ func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsMembersPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsMembersPostParams() } @@ -251,17 +271,22 @@ func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsM for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsMembersPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.members.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -270,7 +295,7 @@ func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsM PcloudPlacementgroupsPost creates a new server placement group */ func (a *Client) PcloudPlacementgroupsPost(params *PcloudPlacementgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPlacementgroupsPostParams() } @@ -290,17 +315,22 @@ func (a *Client) PcloudPlacementgroupsPost(params *PcloudPlacementgroupsPostPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPlacementgroupsPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.placementgroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go index 69ec152f36..8999c40899 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsDeleteOK() @@ -126,7 +127,7 @@ func (o *PcloudPlacementgroupsDeleteOK) GetPayload() models.Object { func (o *PcloudPlacementgroupsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudPlacementgroupsDeleteBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudPlacementgroupsDeleteUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudPlacementgroupsDeleteForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudPlacementgroupsDeleteNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudPlacementgroupsDeleteInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go index df2c047f04..9705ab144d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPlacementgroupsGetOK) readResponse(response runtime.ClientRespons o.Payload = new(models.PlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPlacementgroupsGetBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPlacementgroupsGetUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPlacementgroupsGetForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPlacementgroupsGetNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPlacementgroupsGetInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go index d0016366de..7153470a31 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudPlacementgroupsGetallOK) readResponse(response runtime.ClientResp o.Payload = new(models.PlacementGroups) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPlacementgroupsGetallBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPlacementgroupsGetallUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPlacementgroupsGetallForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPlacementgroupsGetallNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPlacementgroupsGetallInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go index 617f9ce06e..6c2121f2cd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsMembersDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsMembersDeleteOK() @@ -140,7 +141,7 @@ func (o *PcloudPlacementgroupsMembersDeleteOK) readResponse(response runtime.Cli o.Payload = new(models.PlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPlacementgroupsMembersDeleteBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPlacementgroupsMembersDeleteForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPlacementgroupsMembersDeleteNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPlacementgroupsMembersDeleteConflict) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go index c15ea979b6..7972b4e492 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsMembersPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsMembersPostOK() @@ -140,7 +141,7 @@ func (o *PcloudPlacementgroupsMembersPostOK) readResponse(response runtime.Clien o.Payload = new(models.PlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPlacementgroupsMembersPostBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPlacementgroupsMembersPostUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPlacementgroupsMembersPostForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPlacementgroupsMembersPostNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPlacementgroupsMembersPostConflict) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPlacementgroupsMembersPostInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go index 0e908cf19d..cb7c98eb32 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPlacementgroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPlacementgroupsPostOK() @@ -140,7 +141,7 @@ func (o *PcloudPlacementgroupsPostOK) readResponse(response runtime.ClientRespon o.Payload = new(models.PlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPlacementgroupsPostBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPlacementgroupsPostUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPlacementgroupsPostForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPlacementgroupsPostNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPlacementgroupsPostConflict) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPlacementgroupsPostUnprocessableEntity) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPlacementgroupsPostInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go index 65c17f9405..0a14d3a0f3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go @@ -67,7 +67,7 @@ PcloudPodcapacityGet lists of available resources within a particular pod Applicable to satellite locations only. */ func (a *Client) PcloudPodcapacityGet(params *PcloudPodcapacityGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPodcapacityGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPodcapacityGetParams() } @@ -87,17 +87,22 @@ func (a *Client) PcloudPodcapacityGet(params *PcloudPodcapacityGetParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPodcapacityGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.podcapacity.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go index d8e7f26285..01e70185b4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_pod_capacity import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPodcapacityGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPodcapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPodcapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPodcapacityGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPodcapacityGetOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.PodCapacity) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPodcapacityGetBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPodcapacityGetUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPodcapacityGetForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPodcapacityGetNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPodcapacityGetInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go index f5433f5282..3739f74edf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go @@ -69,7 +69,7 @@ type ClientService interface { PcloudSapGet gets the information on an s a p profile */ func (a *Client) PcloudSapGet(params *PcloudSapGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSapGetParams() } @@ -89,17 +89,22 @@ func (a *Client) PcloudSapGet(params *PcloudSapGetParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSapGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sap.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -108,7 +113,7 @@ func (a *Client) PcloudSapGet(params *PcloudSapGetParams, authInfo runtime.Clien PcloudSapGetall gets list of s a p profiles */ func (a *Client) PcloudSapGetall(params *PcloudSapGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSapGetallParams() } @@ -128,17 +133,22 @@ func (a *Client) PcloudSapGetall(params *PcloudSapGetallParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSapGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sap.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +157,7 @@ func (a *Client) PcloudSapGetall(params *PcloudSapGetallParams, authInfo runtime PcloudSapPost creates a new s a p p VM instance */ func (a *Client) PcloudSapPost(params *PcloudSapPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapPostOK, *PcloudSapPostCreated, *PcloudSapPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSapPostParams() } @@ -167,11 +177,12 @@ func (a *Client) PcloudSapPost(params *PcloudSapPostParams, authInfo runtime.Cli for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudSapPostOK: return value, nil, nil, nil @@ -180,7 +191,10 @@ func (a *Client) PcloudSapPost(params *PcloudSapPostParams, authInfo runtime.Cli case *PcloudSapPostAccepted: return nil, nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_s_a_p: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index d0be31ba04..741cb5db36 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_a_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSapGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSapGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSapGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSapGetOK() @@ -128,7 +129,7 @@ func (o *PcloudSapGetOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.SAPProfile) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSapGetBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSapGetUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSapGetForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSapGetNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSapGetInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index e69d9995ae..6879a23274 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_a_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSapGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSapGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSapGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSapGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudSapGetallOK) readResponse(response runtime.ClientResponse, consum o.Payload = new(models.SAPProfiles) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSapGetallBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSapGetallUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSapGetallForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSapGetallNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSapGetallInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index cb808bed88..5aa404f73a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_a_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSapPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSapPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSapPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSapPostOK() @@ -150,7 +151,7 @@ func (o *PcloudSapPostOK) GetPayload() models.PVMInstanceList { func (o *PcloudSapPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -218,7 +219,7 @@ func (o *PcloudSapPostCreated) GetPayload() models.PVMInstanceList { func (o *PcloudSapPostCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudSapPostAccepted) GetPayload() models.PVMInstanceList { func (o *PcloudSapPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudSapPostBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudSapPostUnauthorized) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudSapPostForbidden) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudSapPostNotFound) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudSapPostConflict) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudSapPostUnprocessableEntity) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -776,7 +777,7 @@ func (o *PcloudSapPostInternalServerError) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go index e37b93ae9d..a71114725f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go @@ -75,7 +75,7 @@ type ClientService interface { PcloudSppplacementgroupsDelete deletes a shared processor pool placement group from a cloud instance */ func (a *Client) PcloudSppplacementgroupsDelete(params *PcloudSppplacementgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsDeleteParams() } @@ -95,17 +95,22 @@ func (a *Client) PcloudSppplacementgroupsDelete(params *PcloudSppplacementgroups for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -114,7 +119,7 @@ func (a *Client) PcloudSppplacementgroupsDelete(params *PcloudSppplacementgroups PcloudSppplacementgroupsGet gets the detail of a shared processor pool placement group for a cloud instance */ func (a *Client) PcloudSppplacementgroupsGet(params *PcloudSppplacementgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsGetParams() } @@ -134,17 +139,22 @@ func (a *Client) PcloudSppplacementgroupsGet(params *PcloudSppplacementgroupsGet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -153,7 +163,7 @@ func (a *Client) PcloudSppplacementgroupsGet(params *PcloudSppplacementgroupsGet PcloudSppplacementgroupsGetall gets the list of shared processor pool placement groups for a cloud instance */ func (a *Client) PcloudSppplacementgroupsGetall(params *PcloudSppplacementgroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsGetallParams() } @@ -173,17 +183,22 @@ func (a *Client) PcloudSppplacementgroupsGetall(params *PcloudSppplacementgroups for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -192,7 +207,7 @@ func (a *Client) PcloudSppplacementgroupsGetall(params *PcloudSppplacementgroups PcloudSppplacementgroupsMembersDelete deletes shared processor pool member from a shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsMembersDelete(params *PcloudSppplacementgroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsMembersDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsMembersDeleteParams() } @@ -212,17 +227,22 @@ func (a *Client) PcloudSppplacementgroupsMembersDelete(params *PcloudSppplacemen for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsMembersDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.members.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -231,7 +251,7 @@ func (a *Client) PcloudSppplacementgroupsMembersDelete(params *PcloudSppplacemen PcloudSppplacementgroupsMembersPost adds shared processor pool as a member of a shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsMembersPost(params *PcloudSppplacementgroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsMembersPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsMembersPostParams() } @@ -251,17 +271,22 @@ func (a *Client) PcloudSppplacementgroupsMembersPost(params *PcloudSppplacementg for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsMembersPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.members.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -270,7 +295,7 @@ func (a *Client) PcloudSppplacementgroupsMembersPost(params *PcloudSppplacementg PcloudSppplacementgroupsPost creates a new shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsPost(params *PcloudSppplacementgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSppplacementgroupsPostParams() } @@ -290,17 +315,22 @@ func (a *Client) PcloudSppplacementgroupsPost(params *PcloudSppplacementgroupsPo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSppplacementgroupsPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sppplacementgroups.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go index b3865e6c01..52f886f8e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudSppplacementgroupsDeleteOK) GetPayload() models.Object { func (o *PcloudSppplacementgroupsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudSppplacementgroupsDeleteBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudSppplacementgroupsDeleteUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudSppplacementgroupsDeleteForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudSppplacementgroupsDeleteNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudSppplacementgroupsDeleteConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudSppplacementgroupsDeleteInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go index f624ee8375..36549830df 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudSppplacementgroupsGetOK) readResponse(response runtime.ClientResp o.Payload = new(models.SPPPlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSppplacementgroupsGetBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSppplacementgroupsGetUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSppplacementgroupsGetForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSppplacementgroupsGetNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSppplacementgroupsGetInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go index e29b859363..3698110754 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudSppplacementgroupsGetallOK) readResponse(response runtime.ClientR o.Payload = new(models.SPPPlacementGroups) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSppplacementgroupsGetallBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSppplacementgroupsGetallUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSppplacementgroupsGetallForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSppplacementgroupsGetallNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSppplacementgroupsGetallInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go index e7c542a650..691e9161d9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsMembersDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsMembersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsMembersDeleteOK() @@ -134,7 +135,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteOK) readResponse(response runtime. o.Payload = new(models.SPPPlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteConflict) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go index e1c89983c3..e4328801b9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsMembersPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsMembersPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsMembersPostOK() @@ -140,7 +141,7 @@ func (o *PcloudSppplacementgroupsMembersPostOK) readResponse(response runtime.Cl o.Payload = new(models.SPPPlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudSppplacementgroupsMembersPostBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudSppplacementgroupsMembersPostUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudSppplacementgroupsMembersPostForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudSppplacementgroupsMembersPostNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudSppplacementgroupsMembersPostConflict) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudSppplacementgroupsMembersPostInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go index d63449673d..2863161d75 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_s_p_p_placement_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSppplacementgroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSppplacementgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSppplacementgroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSppplacementgroupsPostOK() @@ -140,7 +141,7 @@ func (o *PcloudSppplacementgroupsPostOK) readResponse(response runtime.ClientRes o.Payload = new(models.SPPPlacementGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudSppplacementgroupsPostBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudSppplacementgroupsPostUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudSppplacementgroupsPostForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudSppplacementgroupsPostNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudSppplacementgroupsPostConflict) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudSppplacementgroupsPostUnprocessableEntity) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudSppplacementgroupsPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go index 7200abcd3f..0e69f5b157 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go @@ -71,7 +71,7 @@ type ClientService interface { PcloudDhcpDelete deletes d h c p server open shift internal use only */ func (a *Client) PcloudDhcpDelete(params *PcloudDhcpDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudDhcpDeleteParams() } @@ -91,17 +91,22 @@ func (a *Client) PcloudDhcpDelete(params *PcloudDhcpDeleteParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudDhcpDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.dhcp.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -110,7 +115,7 @@ func (a *Client) PcloudDhcpDelete(params *PcloudDhcpDeleteParams, authInfo runti PcloudDhcpGet gets d h c p server information open shift internal use only */ func (a *Client) PcloudDhcpGet(params *PcloudDhcpGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudDhcpGetParams() } @@ -130,17 +135,22 @@ func (a *Client) PcloudDhcpGet(params *PcloudDhcpGetParams, authInfo runtime.Cli for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudDhcpGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.dhcp.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -149,7 +159,7 @@ func (a *Client) PcloudDhcpGet(params *PcloudDhcpGetParams, authInfo runtime.Cli PcloudDhcpGetall gets all d h c p servers information open shift internal use only */ func (a *Client) PcloudDhcpGetall(params *PcloudDhcpGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudDhcpGetallParams() } @@ -169,17 +179,22 @@ func (a *Client) PcloudDhcpGetall(params *PcloudDhcpGetallParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudDhcpGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.dhcp.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -188,7 +203,7 @@ func (a *Client) PcloudDhcpGetall(params *PcloudDhcpGetallParams, authInfo runti PcloudDhcpPost creates a d h c p server open shift internal use only */ func (a *Client) PcloudDhcpPost(params *PcloudDhcpPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudDhcpPostParams() } @@ -208,17 +223,22 @@ func (a *Client) PcloudDhcpPost(params *PcloudDhcpPostParams, authInfo runtime.C for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudDhcpPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.dhcp.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go index f23ea98679..02999fcd12 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_service_d_h_c_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudDhcpDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudDhcpDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudDhcpDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudDhcpDeleteAccepted() @@ -67,7 +68,7 @@ func NewPcloudDhcpDeleteAccepted() *PcloudDhcpDeleteAccepted { /* PcloudDhcpDeleteAccepted describes a response with status code 202, with default header values. -OK +Accepted */ type PcloudDhcpDeleteAccepted struct { Payload models.Object @@ -120,7 +121,7 @@ func (o *PcloudDhcpDeleteAccepted) GetPayload() models.Object { func (o *PcloudDhcpDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *PcloudDhcpDeleteBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *PcloudDhcpDeleteForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *PcloudDhcpDeleteNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *PcloudDhcpDeleteInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go index 858df91ad6..6439488dca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_service_d_h_c_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudDhcpGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudDhcpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudDhcpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudDhcpGetOK() @@ -128,7 +129,7 @@ func (o *PcloudDhcpGetOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.DHCPServerDetail) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudDhcpGetBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudDhcpGetUnauthorized) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudDhcpGetForbidden) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudDhcpGetNotFound) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudDhcpGetInternalServerError) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go index 2354a68e28..26f96eb3ad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_service_d_h_c_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudDhcpGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudDhcpGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudDhcpGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudDhcpGetallOK() @@ -126,7 +127,7 @@ func (o *PcloudDhcpGetallOK) GetPayload() models.DHCPServers { func (o *PcloudDhcpGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudDhcpGetallBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudDhcpGetallUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudDhcpGetallForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudDhcpGetallNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudDhcpGetallInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go index 6c2181e757..a1a5cb917b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_service_d_h_c_p import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudDhcpPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudDhcpPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudDhcpPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudDhcpPostAccepted() @@ -73,7 +74,7 @@ func NewPcloudDhcpPostAccepted() *PcloudDhcpPostAccepted { /* PcloudDhcpPostAccepted describes a response with status code 202, with default header values. -OK +Accepted */ type PcloudDhcpPostAccepted struct { Payload *models.DHCPServer @@ -128,7 +129,7 @@ func (o *PcloudDhcpPostAccepted) readResponse(response runtime.ClientResponse, c o.Payload = new(models.DHCPServer) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudDhcpPostBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudDhcpPostUnauthorized) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudDhcpPostForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudDhcpPostNotFound) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudDhcpPostInternalServerError) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go index 6e60de9088..5992a4d23e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go @@ -73,7 +73,7 @@ type ClientService interface { PcloudSharedprocessorpoolsDelete deletes a shared processor pool from a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsDelete(params *PcloudSharedprocessorpoolsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSharedprocessorpoolsDeleteParams() } @@ -93,17 +93,22 @@ func (a *Client) PcloudSharedprocessorpoolsDelete(params *PcloudSharedprocessorp for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSharedprocessorpoolsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sharedprocessorpools.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) PcloudSharedprocessorpoolsDelete(params *PcloudSharedprocessorp PcloudSharedprocessorpoolsGet gets the detail of a shared processor pool for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsGet(params *PcloudSharedprocessorpoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSharedprocessorpoolsGetParams() } @@ -132,17 +137,22 @@ func (a *Client) PcloudSharedprocessorpoolsGet(params *PcloudSharedprocessorpool for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSharedprocessorpoolsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sharedprocessorpools.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) PcloudSharedprocessorpoolsGet(params *PcloudSharedprocessorpool PcloudSharedprocessorpoolsGetall gets the list of shared processor pools for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsGetall(params *PcloudSharedprocessorpoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSharedprocessorpoolsGetallParams() } @@ -171,17 +181,22 @@ func (a *Client) PcloudSharedprocessorpoolsGetall(params *PcloudSharedprocessorp for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSharedprocessorpoolsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sharedprocessorpools.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -190,7 +205,7 @@ func (a *Client) PcloudSharedprocessorpoolsGetall(params *PcloudSharedprocessorp PcloudSharedprocessorpoolsPost creates a new shared processor pool */ func (a *Client) PcloudSharedprocessorpoolsPost(params *PcloudSharedprocessorpoolsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSharedprocessorpoolsPostParams() } @@ -210,17 +225,22 @@ func (a *Client) PcloudSharedprocessorpoolsPost(params *PcloudSharedprocessorpoo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSharedprocessorpoolsPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sharedprocessorpools.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -229,7 +249,7 @@ func (a *Client) PcloudSharedprocessorpoolsPost(params *PcloudSharedprocessorpoo PcloudSharedprocessorpoolsPut updates a shared processor pool for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsPut(params *PcloudSharedprocessorpoolsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSharedprocessorpoolsPutParams() } @@ -249,17 +269,22 @@ func (a *Client) PcloudSharedprocessorpoolsPut(params *PcloudSharedprocessorpool for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSharedprocessorpoolsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.sharedprocessorpools.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go index 376e3f8dab..5eca4f3183 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSharedprocessorpoolsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSharedprocessorpoolsDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudSharedprocessorpoolsDeleteOK) GetPayload() models.Object { func (o *PcloudSharedprocessorpoolsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudSharedprocessorpoolsDeleteBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudSharedprocessorpoolsDeleteForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudSharedprocessorpoolsDeleteNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudSharedprocessorpoolsDeleteConflict) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go index 9e6503413d..a3c622f93a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSharedprocessorpoolsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSharedprocessorpoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSharedprocessorpoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSharedprocessorpoolsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudSharedprocessorpoolsGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.SharedProcessorPoolDetail) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSharedprocessorpoolsGetBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSharedprocessorpoolsGetUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSharedprocessorpoolsGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSharedprocessorpoolsGetNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSharedprocessorpoolsGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go index 7d940969a9..1bbc79a38b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSharedprocessorpoolsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSharedprocessorpoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSharedprocessorpoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSharedprocessorpoolsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudSharedprocessorpoolsGetallOK) readResponse(response runtime.Clien o.Payload = new(models.SharedProcessorPools) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSharedprocessorpoolsGetallBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSharedprocessorpoolsGetallUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSharedprocessorpoolsGetallForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSharedprocessorpoolsGetallNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSharedprocessorpoolsGetallInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go index 95e946fd44..d0ce924799 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSharedprocessorpoolsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSharedprocessorpoolsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSharedprocessorpoolsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudSharedprocessorpoolsPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudSharedprocessorpoolsPostAccepted) readResponse(response runtime.C o.Payload = new(models.SharedProcessorPool) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudSharedprocessorpoolsPostBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudSharedprocessorpoolsPostUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudSharedprocessorpoolsPostForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudSharedprocessorpoolsPostNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudSharedprocessorpoolsPostConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudSharedprocessorpoolsPostInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go index 2ab1daef24..7a7c69b693 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_shared_processor_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSharedprocessorpoolsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSharedprocessorpoolsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSharedprocessorpoolsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSharedprocessorpoolsPutOK() @@ -128,7 +129,7 @@ func (o *PcloudSharedprocessorpoolsPutOK) readResponse(response runtime.ClientRe o.Payload = new(models.SharedProcessorPool) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudSharedprocessorpoolsPutBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudSharedprocessorpoolsPutUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudSharedprocessorpoolsPutForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudSharedprocessorpoolsPutNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudSharedprocessorpoolsPutInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go index c5f625646f..873e700ec0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go @@ -71,7 +71,7 @@ type ClientService interface { PcloudCloudinstancesSnapshotsDelete deletes a p VM instance snapshot of a cloud instance */ func (a *Client) PcloudCloudinstancesSnapshotsDelete(params *PcloudCloudinstancesSnapshotsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesSnapshotsDeleteParams() } @@ -91,17 +91,22 @@ func (a *Client) PcloudCloudinstancesSnapshotsDelete(params *PcloudCloudinstance for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesSnapshotsDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.snapshots.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -110,7 +115,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsDelete(params *PcloudCloudinstance PcloudCloudinstancesSnapshotsGet gets the detail of a snapshot */ func (a *Client) PcloudCloudinstancesSnapshotsGet(params *PcloudCloudinstancesSnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesSnapshotsGetParams() } @@ -130,17 +135,22 @@ func (a *Client) PcloudCloudinstancesSnapshotsGet(params *PcloudCloudinstancesSn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesSnapshotsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.snapshots.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -149,7 +159,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsGet(params *PcloudCloudinstancesSn PcloudCloudinstancesSnapshotsGetall lists all p VM instance snapshots for this cloud instance */ func (a *Client) PcloudCloudinstancesSnapshotsGetall(params *PcloudCloudinstancesSnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesSnapshotsGetallParams() } @@ -169,17 +179,22 @@ func (a *Client) PcloudCloudinstancesSnapshotsGetall(params *PcloudCloudinstance for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesSnapshotsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.snapshots.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -188,7 +203,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsGetall(params *PcloudCloudinstance PcloudCloudinstancesSnapshotsPut updates a p VM instance snapshot */ func (a *Client) PcloudCloudinstancesSnapshotsPut(params *PcloudCloudinstancesSnapshotsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesSnapshotsPutParams() } @@ -208,17 +223,22 @@ func (a *Client) PcloudCloudinstancesSnapshotsPut(params *PcloudCloudinstancesSn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesSnapshotsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.snapshots.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go index 85dd41fdcf..69efbf3a56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesSnapshotsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesSnapshotsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesSnapshotsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudCloudinstancesSnapshotsDeleteAccepted() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) GetPayload() models.Object func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteGone) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go index df56776420..560c2ba91d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesSnapshotsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesSnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesSnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesSnapshotsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesSnapshotsGetOK) readResponse(response runtime.Clien o.Payload = new(models.Snapshot) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesSnapshotsGetBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesSnapshotsGetForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesSnapshotsGetNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index 63d3af550b..6174ccec4e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesSnapshotsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesSnapshotsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallOK) readResponse(response runtime.Cl o.Payload = new(models.Snapshots) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go index dcba5cb8a0..a49c092f7f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesSnapshotsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesSnapshotsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesSnapshotsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesSnapshotsPutOK() @@ -76,7 +77,7 @@ PcloudCloudinstancesSnapshotsPutOK describes a response with status code 200, wi OK */ type PcloudCloudinstancesSnapshotsPutOK struct { - Payload models.Object + Payload *models.Snapshot } // IsSuccess returns true when this pcloud cloudinstances snapshots put o k response has a 2xx status code @@ -119,14 +120,16 @@ func (o *PcloudCloudinstancesSnapshotsPutOK) String() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %s", 200, payload) } -func (o *PcloudCloudinstancesSnapshotsPutOK) GetPayload() models.Object { +func (o *PcloudCloudinstancesSnapshotsPutOK) GetPayload() *models.Snapshot { return o.Payload } func (o *PcloudCloudinstancesSnapshotsPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.Snapshot) + // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +199,7 @@ func (o *PcloudCloudinstancesSnapshotsPutBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +269,7 @@ func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +339,7 @@ func (o *PcloudCloudinstancesSnapshotsPutForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +409,7 @@ func (o *PcloudCloudinstancesSnapshotsPutNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +479,7 @@ func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go index e2305a8a10..32f896767b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go @@ -71,7 +71,7 @@ type ClientService interface { PcloudStoragecapacityPoolsGet storages capacity for a storage pool in a region */ func (a *Client) PcloudStoragecapacityPoolsGet(params *PcloudStoragecapacityPoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityPoolsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudStoragecapacityPoolsGetParams() } @@ -91,17 +91,22 @@ func (a *Client) PcloudStoragecapacityPoolsGet(params *PcloudStoragecapacityPool for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudStoragecapacityPoolsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.storagecapacity.pools.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -110,7 +115,7 @@ func (a *Client) PcloudStoragecapacityPoolsGet(params *PcloudStoragecapacityPool PcloudStoragecapacityPoolsGetall storages capacity for all available storage pools in a region */ func (a *Client) PcloudStoragecapacityPoolsGetall(params *PcloudStoragecapacityPoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityPoolsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudStoragecapacityPoolsGetallParams() } @@ -130,17 +135,22 @@ func (a *Client) PcloudStoragecapacityPoolsGetall(params *PcloudStoragecapacityP for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudStoragecapacityPoolsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.storagecapacity.pools.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -149,7 +159,7 @@ func (a *Client) PcloudStoragecapacityPoolsGetall(params *PcloudStoragecapacityP PcloudStoragecapacityTypesGet storages capacity for a storage type in a region */ func (a *Client) PcloudStoragecapacityTypesGet(params *PcloudStoragecapacityTypesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityTypesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudStoragecapacityTypesGetParams() } @@ -169,17 +179,22 @@ func (a *Client) PcloudStoragecapacityTypesGet(params *PcloudStoragecapacityType for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudStoragecapacityTypesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.storagecapacity.types.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -188,7 +203,7 @@ func (a *Client) PcloudStoragecapacityTypesGet(params *PcloudStoragecapacityType PcloudStoragecapacityTypesGetall storages capacity for all available storage types in a region */ func (a *Client) PcloudStoragecapacityTypesGetall(params *PcloudStoragecapacityTypesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityTypesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudStoragecapacityTypesGetallParams() } @@ -208,17 +223,22 @@ func (a *Client) PcloudStoragecapacityTypesGetall(params *PcloudStoragecapacityT for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudStoragecapacityTypesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.storagecapacity.types.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index 7120965a4e..57d8b96576 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_storage_capacity import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudStoragecapacityPoolsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudStoragecapacityPoolsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudStoragecapacityPoolsGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.StoragePoolCapacity) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudStoragecapacityPoolsGetBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudStoragecapacityPoolsGetUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudStoragecapacityPoolsGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudStoragecapacityPoolsGetNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudStoragecapacityPoolsGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index 97ac829fbc..c0f2014166 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_storage_capacity import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudStoragecapacityPoolsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudStoragecapacityPoolsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudStoragecapacityPoolsGetallOK) readResponse(response runtime.Clien o.Payload = new(models.StoragePoolsCapacity) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudStoragecapacityPoolsGetallBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudStoragecapacityPoolsGetallUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudStoragecapacityPoolsGetallForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudStoragecapacityPoolsGetallNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudStoragecapacityPoolsGetallInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 229517d311..d3d8ef6644 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_storage_capacity import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudStoragecapacityTypesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudStoragecapacityTypesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudStoragecapacityTypesGetOK) readResponse(response runtime.ClientRe o.Payload = new(models.StorageTypeCapacity) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudStoragecapacityTypesGetBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudStoragecapacityTypesGetUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudStoragecapacityTypesGetForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudStoragecapacityTypesGetNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudStoragecapacityTypesGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index dba3624c36..2771d016f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_storage_capacity import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudStoragecapacityTypesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudStoragecapacityTypesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudStoragecapacityTypesGetallOK) readResponse(response runtime.Clien o.Payload = new(models.StorageTypesCapacity) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudStoragecapacityTypesGetallBadRequest) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudStoragecapacityTypesGetallUnauthorized) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudStoragecapacityTypesGetallForbidden) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudStoragecapacityTypesGetallNotFound) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudStoragecapacityTypesGetallInternalServerError) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go index 624d19155b..2d005b2f15 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go @@ -65,7 +65,7 @@ type ClientService interface { PcloudCloudinstancesStoragetiersGetall lists all supported storage tiers for this cloud instance */ func (a *Client) PcloudCloudinstancesStoragetiersGetall(params *PcloudCloudinstancesStoragetiersGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStoragetiersGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesStoragetiersGetallParams() } @@ -85,17 +85,22 @@ func (a *Client) PcloudCloudinstancesStoragetiersGetall(params *PcloudCloudinsta for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesStoragetiersGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.storagetiers.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go index 6a033ad38c..9306aea700 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_storage_tiers import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesStoragetiersGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesStoragetiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesStoragetiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesStoragetiersGetallOK() @@ -126,7 +127,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallOK) GetPayload() models.RegionSto func (o *PcloudCloudinstancesStoragetiersGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallForbidden) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallNotFound) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go index 63de58c27c..505090dd84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go @@ -65,7 +65,7 @@ type ClientService interface { PcloudSystempoolsGet lists of available system pools within a particular data center */ func (a *Client) PcloudSystempoolsGet(params *PcloudSystempoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSystempoolsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudSystempoolsGetParams() } @@ -85,17 +85,22 @@ func (a *Client) PcloudSystempoolsGet(params *PcloudSystempoolsGetParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudSystempoolsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.systempools.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index 139f134da0..64db5760d7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_system_pools import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudSystempoolsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudSystempoolsGetOK() @@ -126,7 +127,7 @@ func (o *PcloudSystempoolsGetOK) GetPayload() models.SystemPools { func (o *PcloudSystempoolsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudSystempoolsGetBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudSystempoolsGetUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudSystempoolsGetForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudSystempoolsGetNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudSystempoolsGetInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go index 47b5fe5d75..32ee798068 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go @@ -67,7 +67,7 @@ type ClientService interface { PcloudTasksDelete deletes a task */ func (a *Client) PcloudTasksDelete(params *PcloudTasksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTasksDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTasksDeleteParams() } @@ -87,17 +87,22 @@ func (a *Client) PcloudTasksDelete(params *PcloudTasksDeleteParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTasksDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tasks.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) PcloudTasksDelete(params *PcloudTasksDeleteParams, authInfo run PcloudTasksGet gets a task */ func (a *Client) PcloudTasksGet(params *PcloudTasksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTasksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTasksGetParams() } @@ -126,17 +131,22 @@ func (a *Client) PcloudTasksGet(params *PcloudTasksGetParams, authInfo runtime.C for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTasksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tasks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go index b98b472bc2..f258415c15 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_tasks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTasksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTasksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTasksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTasksDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudTasksDeleteOK) GetPayload() models.Object { func (o *PcloudTasksDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudTasksDeleteBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudTasksDeleteUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudTasksDeleteForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudTasksDeleteNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudTasksDeleteGone) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudTasksDeleteInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go index 7d919787d5..5076ffe885 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_tasks import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTasksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTasksGetOK() @@ -128,7 +129,7 @@ func (o *PcloudTasksGetOK) readResponse(response runtime.ClientResponse, consume o.Payload = new(models.Task) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudTasksGetBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudTasksGetUnauthorized) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudTasksGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudTasksGetNotFound) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudTasksGetInternalServerError) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go index 0813b7f89f..a7bf064898 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go @@ -67,7 +67,7 @@ type ClientService interface { PcloudTenantsGet gets a tenant s current state information */ func (a *Client) PcloudTenantsGet(params *PcloudTenantsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsGetParams() } @@ -87,17 +87,22 @@ func (a *Client) PcloudTenantsGet(params *PcloudTenantsGetParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) PcloudTenantsGet(params *PcloudTenantsGetParams, authInfo runti PcloudTenantsPut updates a tenant */ func (a *Client) PcloudTenantsPut(params *PcloudTenantsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsPutParams() } @@ -126,17 +131,22 @@ func (a *Client) PcloudTenantsPut(params *PcloudTenantsPutParams, authInfo runti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go index be445f73c2..c86e29f308 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudTenantsGetOK) readResponse(response runtime.ClientResponse, consu o.Payload = new(models.Tenant) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudTenantsGetBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudTenantsGetUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudTenantsGetForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudTenantsGetNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudTenantsGetInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index b91d00cf3c..97b59e7bad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsPutOK() @@ -134,7 +135,7 @@ func (o *PcloudTenantsPutOK) readResponse(response runtime.ClientResponse, consu o.Payload = new(models.Tenant) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudTenantsPutBadRequest) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudTenantsPutUnauthorized) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudTenantsPutForbidden) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudTenantsPutNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudTenantsPutUnprocessableEntity) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudTenantsPutInternalServerError) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go index 441452be12..263d96cb91 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go @@ -73,7 +73,7 @@ type ClientService interface { PcloudTenantsSshkeysDelete deletes a tenant s SSH key */ func (a *Client) PcloudTenantsSshkeysDelete(params *PcloudTenantsSshkeysDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsSshkeysDeleteParams() } @@ -93,17 +93,22 @@ func (a *Client) PcloudTenantsSshkeysDelete(params *PcloudTenantsSshkeysDeletePa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsSshkeysDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.sshkeys.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) PcloudTenantsSshkeysDelete(params *PcloudTenantsSshkeysDeletePa PcloudTenantsSshkeysGet gets a tenant s SSH key by name */ func (a *Client) PcloudTenantsSshkeysGet(params *PcloudTenantsSshkeysGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsSshkeysGetParams() } @@ -132,17 +137,22 @@ func (a *Client) PcloudTenantsSshkeysGet(params *PcloudTenantsSshkeysGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsSshkeysGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.sshkeys.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) PcloudTenantsSshkeysGet(params *PcloudTenantsSshkeysGetParams, PcloudTenantsSshkeysGetall lists a tenant s SSH keys */ func (a *Client) PcloudTenantsSshkeysGetall(params *PcloudTenantsSshkeysGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsSshkeysGetallParams() } @@ -171,17 +181,22 @@ func (a *Client) PcloudTenantsSshkeysGetall(params *PcloudTenantsSshkeysGetallPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsSshkeysGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.sshkeys.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -190,7 +205,7 @@ func (a *Client) PcloudTenantsSshkeysGetall(params *PcloudTenantsSshkeysGetallPa PcloudTenantsSshkeysPost adds a new SSH key to the tenant */ func (a *Client) PcloudTenantsSshkeysPost(params *PcloudTenantsSshkeysPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysPostOK, *PcloudTenantsSshkeysPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsSshkeysPostParams() } @@ -210,18 +225,22 @@ func (a *Client) PcloudTenantsSshkeysPost(params *PcloudTenantsSshkeysPostParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudTenantsSshkeysPostOK: return value, nil, nil case *PcloudTenantsSshkeysPostCreated: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_tenants_ssh_keys: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -230,7 +249,7 @@ func (a *Client) PcloudTenantsSshkeysPost(params *PcloudTenantsSshkeysPostParams PcloudTenantsSshkeysPut updates an SSH key */ func (a *Client) PcloudTenantsSshkeysPut(params *PcloudTenantsSshkeysPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudTenantsSshkeysPutParams() } @@ -250,17 +269,22 @@ func (a *Client) PcloudTenantsSshkeysPut(params *PcloudTenantsSshkeysPutParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudTenantsSshkeysPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.tenants.sshkeys.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index b301a433bf..0c2bb182be 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants_ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsSshkeysDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsSshkeysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsSshkeysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsSshkeysDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudTenantsSshkeysDeleteOK) GetPayload() models.Object { func (o *PcloudTenantsSshkeysDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudTenantsSshkeysDeleteBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudTenantsSshkeysDeleteUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudTenantsSshkeysDeleteForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudTenantsSshkeysDeleteNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudTenantsSshkeysDeleteGone) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudTenantsSshkeysDeleteInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go index 03d83f7f86..d3c8d3ae50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants_ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsSshkeysGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsSshkeysGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsSshkeysGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsSshkeysGetOK() @@ -128,7 +129,7 @@ func (o *PcloudTenantsSshkeysGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.SSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudTenantsSshkeysGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudTenantsSshkeysGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudTenantsSshkeysGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudTenantsSshkeysGetNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudTenantsSshkeysGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go index 6e339e1d01..fa88835281 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants_ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsSshkeysGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsSshkeysGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsSshkeysGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsSshkeysGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudTenantsSshkeysGetallOK) readResponse(response runtime.ClientRespo o.Payload = new(models.SSHKeys) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudTenantsSshkeysGetallBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudTenantsSshkeysGetallUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudTenantsSshkeysGetallForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudTenantsSshkeysGetallNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudTenantsSshkeysGetallInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index 76dbebc956..83c3ade4eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants_ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsSshkeysPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsSshkeysPostOK() @@ -146,7 +147,7 @@ func (o *PcloudTenantsSshkeysPostOK) readResponse(response runtime.ClientRespons o.Payload = new(models.SSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *PcloudTenantsSshkeysPostCreated) readResponse(response runtime.ClientRe o.Payload = new(models.SSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudTenantsSshkeysPostBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudTenantsSshkeysPostUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudTenantsSshkeysPostForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudTenantsSshkeysPostNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudTenantsSshkeysPostConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudTenantsSshkeysPostUnprocessableEntity) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudTenantsSshkeysPostInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index 70026ead73..5e2a4fb525 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_tenants_ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudTenantsSshkeysPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudTenantsSshkeysPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudTenantsSshkeysPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudTenantsSshkeysPutOK() @@ -134,7 +135,7 @@ func (o *PcloudTenantsSshkeysPutOK) readResponse(response runtime.ClientResponse o.Payload = new(models.SSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudTenantsSshkeysPutBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudTenantsSshkeysPutUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudTenantsSshkeysPutForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudTenantsSshkeysPutNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudTenantsSshkeysPutUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudTenantsSshkeysPutInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/p_cloudvp_mem_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/p_cloudvp_mem_volumes_client.go new file mode 100644 index 0000000000..175ddc014c --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/p_cloudvp_mem_volumes_client.go @@ -0,0 +1,253 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// New creates a new p cloud v p mem volumes API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +// New creates a new p cloud v p mem volumes API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new p cloud v p mem volumes API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + +/* +Client for p cloud v p mem volumes API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + PcloudPvminstancesVpmemVolumesDelete(params *PcloudPvminstancesVpmemVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesDeleteAccepted, error) + + PcloudPvminstancesVpmemVolumesGet(params *PcloudPvminstancesVpmemVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesGetOK, error) + + PcloudPvminstancesVpmemVolumesGetall(params *PcloudPvminstancesVpmemVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesGetallOK, error) + + PcloudPvminstancesVpmemVolumesPost(params *PcloudPvminstancesVpmemVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesPostAccepted, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +PcloudPvminstancesVpmemVolumesDelete deletes a v p m e m volume attached to this p VM instance + +vPMEM volumes of PVM Instances using SAP profiles will return carved out memory. Other cases are a reduction from total memory. +*/ +func (a *Client) PcloudPvminstancesVpmemVolumesDelete(params *PcloudPvminstancesVpmemVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesDeleteAccepted, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewPcloudPvminstancesVpmemVolumesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.pvminstances.vpmem-volumes.delete", + Method: "DELETE", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPvminstancesVpmemVolumesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*PcloudPvminstancesVpmemVolumesDeleteAccepted) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.vpmem-volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PcloudPvminstancesVpmemVolumesGet gets information about a v p m e m volume +*/ +func (a *Client) PcloudPvminstancesVpmemVolumesGet(params *PcloudPvminstancesVpmemVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesGetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewPcloudPvminstancesVpmemVolumesGetParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.pvminstances.vpmem-volumes.get", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPvminstancesVpmemVolumesGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*PcloudPvminstancesVpmemVolumesGetOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.vpmem-volumes.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PcloudPvminstancesVpmemVolumesGetall lists all v p m e m volumes attached to this p VM instance +*/ +func (a *Client) PcloudPvminstancesVpmemVolumesGetall(params *PcloudPvminstancesVpmemVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesGetallOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewPcloudPvminstancesVpmemVolumesGetallParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.pvminstances.vpmem-volumes.getall", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPvminstancesVpmemVolumesGetallReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*PcloudPvminstancesVpmemVolumesGetallOK) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.vpmem-volumes.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +PcloudPvminstancesVpmemVolumesPost creates a v p m e m volume to be attached to this p VM instance + +vPMEM volumes of PVM Instances using SAP profiles will be carved out of profile total memory. Other cases are in addition to total memory. +*/ +func (a *Client) PcloudPvminstancesVpmemVolumesPost(params *PcloudPvminstancesVpmemVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVpmemVolumesPostAccepted, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewPcloudPvminstancesVpmemVolumesPostParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.pvminstances.vpmem-volumes.post", + Method: "POST", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPvminstancesVpmemVolumesPostReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + + // only one success response has to be checked + success, ok := result.(*PcloudPvminstancesVpmemVolumesPostAccepted) + if ok { + return success, nil + } + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.vpmem-volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_parameters.go new file mode 100644 index 0000000000..fede6ddc38 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPcloudPvminstancesVpmemVolumesDeleteParams creates a new PcloudPvminstancesVpmemVolumesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPcloudPvminstancesVpmemVolumesDeleteParams() *PcloudPvminstancesVpmemVolumesDeleteParams { + return &PcloudPvminstancesVpmemVolumesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesDeleteParamsWithTimeout creates a new PcloudPvminstancesVpmemVolumesDeleteParams object +// with the ability to set a timeout on a request. +func NewPcloudPvminstancesVpmemVolumesDeleteParamsWithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesDeleteParams { + return &PcloudPvminstancesVpmemVolumesDeleteParams{ + timeout: timeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesDeleteParamsWithContext creates a new PcloudPvminstancesVpmemVolumesDeleteParams object +// with the ability to set a context for a request. +func NewPcloudPvminstancesVpmemVolumesDeleteParamsWithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesDeleteParams { + return &PcloudPvminstancesVpmemVolumesDeleteParams{ + Context: ctx, + } +} + +// NewPcloudPvminstancesVpmemVolumesDeleteParamsWithHTTPClient creates a new PcloudPvminstancesVpmemVolumesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudPvminstancesVpmemVolumesDeleteParamsWithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesDeleteParams { + return &PcloudPvminstancesVpmemVolumesDeleteParams{ + HTTPClient: client, + } +} + +/* +PcloudPvminstancesVpmemVolumesDeleteParams contains all the parameters to send to the API endpoint + + for the pcloud pvminstances vpmem volumes delete operation. + + Typically these are written to a http.Request. +*/ +type PcloudPvminstancesVpmemVolumesDeleteParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + /* PvmInstanceID. + + PCloud PVM Instance ID + */ + PvmInstanceID string + + /* VpmemVolumeID. + + vPMEM Volume ID + */ + VpmemVolumeID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud pvminstances vpmem volumes delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithDefaults() *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud pvminstances vpmem volumes delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPvmInstanceID adds the pvmInstanceID to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithPvmInstanceID(pvmInstanceID string) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetPvmInstanceID(pvmInstanceID) + return o +} + +// SetPvmInstanceID adds the pvmInstanceId to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetPvmInstanceID(pvmInstanceID string) { + o.PvmInstanceID = pvmInstanceID +} + +// WithVpmemVolumeID adds the vpmemVolumeID to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WithVpmemVolumeID(vpmemVolumeID string) *PcloudPvminstancesVpmemVolumesDeleteParams { + o.SetVpmemVolumeID(vpmemVolumeID) + return o +} + +// SetVpmemVolumeID adds the vpmemVolumeId to the pcloud pvminstances vpmem volumes delete params +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) SetVpmemVolumeID(vpmemVolumeID string) { + o.VpmemVolumeID = vpmemVolumeID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPvminstancesVpmemVolumesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param pvm_instance_id + if err := r.SetPathParam("pvm_instance_id", o.PvmInstanceID); err != nil { + return err + } + + // path param vpmem_volume_id + if err := r.SetPathParam("vpmem_volume_id", o.VpmemVolumeID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_responses.go new file mode 100644 index 0000000000..ae819b4574 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_delete_responses.go @@ -0,0 +1,561 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPvminstancesVpmemVolumesDeleteReader is a Reader for the PcloudPvminstancesVpmemVolumesDelete structure. +type PcloudPvminstancesVpmemVolumesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPvminstancesVpmemVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 202: + result := NewPcloudPvminstancesVpmemVolumesDeleteAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudPvminstancesVpmemVolumesDeleteBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudPvminstancesVpmemVolumesDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudPvminstancesVpmemVolumesDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesVpmemVolumesDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewPcloudPvminstancesVpmemVolumesDeleteConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPcloudPvminstancesVpmemVolumesDeleteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}] pcloud.pvminstances.vpmem-volumes.delete", response, response.Code()) + } +} + +// NewPcloudPvminstancesVpmemVolumesDeleteAccepted creates a PcloudPvminstancesVpmemVolumesDeleteAccepted with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteAccepted() *PcloudPvminstancesVpmemVolumesDeleteAccepted { + return &PcloudPvminstancesVpmemVolumesDeleteAccepted{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteAccepted describes a response with status code 202, with default header values. + +Accepted +*/ +type PcloudPvminstancesVpmemVolumesDeleteAccepted struct { + Payload models.Object +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete accepted response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete accepted response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete accepted response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete accepted response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete accepted response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete accepted response +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) Code() int { + return 202 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteAccepted %s", 202, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteAccepted %s", 202, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) GetPayload() models.Object { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteBadRequest creates a PcloudPvminstancesVpmemVolumesDeleteBadRequest with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteBadRequest() *PcloudPvminstancesVpmemVolumesDeleteBadRequest { + return &PcloudPvminstancesVpmemVolumesDeleteBadRequest{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesVpmemVolumesDeleteBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete bad request response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete bad request response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete bad request response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete bad request response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete bad request response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete bad request response +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteUnauthorized creates a PcloudPvminstancesVpmemVolumesDeleteUnauthorized with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteUnauthorized() *PcloudPvminstancesVpmemVolumesDeleteUnauthorized { + return &PcloudPvminstancesVpmemVolumesDeleteUnauthorized{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVpmemVolumesDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete unauthorized response +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteForbidden creates a PcloudPvminstancesVpmemVolumesDeleteForbidden with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteForbidden() *PcloudPvminstancesVpmemVolumesDeleteForbidden { + return &PcloudPvminstancesVpmemVolumesDeleteForbidden{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVpmemVolumesDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete forbidden response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete forbidden response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete forbidden response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete forbidden response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete forbidden response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete forbidden response +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteNotFound creates a PcloudPvminstancesVpmemVolumesDeleteNotFound with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteNotFound() *PcloudPvminstancesVpmemVolumesDeleteNotFound { + return &PcloudPvminstancesVpmemVolumesDeleteNotFound{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesVpmemVolumesDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete not found response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete not found response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete not found response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete not found response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete not found response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete not found response +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteConflict creates a PcloudPvminstancesVpmemVolumesDeleteConflict with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteConflict() *PcloudPvminstancesVpmemVolumesDeleteConflict { + return &PcloudPvminstancesVpmemVolumesDeleteConflict{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PcloudPvminstancesVpmemVolumesDeleteConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete conflict response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete conflict response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete conflict response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete conflict response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete conflict response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete conflict response +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) Code() int { + return 409 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteConflict %s", 409, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteConflict %s", 409, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesDeleteInternalServerError creates a PcloudPvminstancesVpmemVolumesDeleteInternalServerError with default headers values +func NewPcloudPvminstancesVpmemVolumesDeleteInternalServerError() *PcloudPvminstancesVpmemVolumesDeleteInternalServerError { + return &PcloudPvminstancesVpmemVolumesDeleteInternalServerError{} +} + +/* +PcloudPvminstancesVpmemVolumesDeleteInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudPvminstancesVpmemVolumesDeleteInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes delete internal server error response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes delete internal server error response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes delete internal server error response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes delete internal server error response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes delete internal server error response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes delete internal server error response +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) Code() int { + return 500 +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesDeleteInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesDeleteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_parameters.go new file mode 100644 index 0000000000..75c8d70df1 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_parameters.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPcloudPvminstancesVpmemVolumesGetParams creates a new PcloudPvminstancesVpmemVolumesGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPcloudPvminstancesVpmemVolumesGetParams() *PcloudPvminstancesVpmemVolumesGetParams { + return &PcloudPvminstancesVpmemVolumesGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetParamsWithTimeout creates a new PcloudPvminstancesVpmemVolumesGetParams object +// with the ability to set a timeout on a request. +func NewPcloudPvminstancesVpmemVolumesGetParamsWithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesGetParams { + return &PcloudPvminstancesVpmemVolumesGetParams{ + timeout: timeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetParamsWithContext creates a new PcloudPvminstancesVpmemVolumesGetParams object +// with the ability to set a context for a request. +func NewPcloudPvminstancesVpmemVolumesGetParamsWithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesGetParams { + return &PcloudPvminstancesVpmemVolumesGetParams{ + Context: ctx, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetParamsWithHTTPClient creates a new PcloudPvminstancesVpmemVolumesGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudPvminstancesVpmemVolumesGetParamsWithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesGetParams { + return &PcloudPvminstancesVpmemVolumesGetParams{ + HTTPClient: client, + } +} + +/* +PcloudPvminstancesVpmemVolumesGetParams contains all the parameters to send to the API endpoint + + for the pcloud pvminstances vpmem volumes get operation. + + Typically these are written to a http.Request. +*/ +type PcloudPvminstancesVpmemVolumesGetParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + /* PvmInstanceID. + + PCloud PVM Instance ID + */ + PvmInstanceID string + + /* VpmemVolumeID. + + vPMEM Volume ID + */ + VpmemVolumeID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud pvminstances vpmem volumes get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithDefaults() *PcloudPvminstancesVpmemVolumesGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud pvminstances vpmem volumes get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPvmInstanceID adds the pvmInstanceID to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithPvmInstanceID(pvmInstanceID string) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetPvmInstanceID(pvmInstanceID) + return o +} + +// SetPvmInstanceID adds the pvmInstanceId to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetPvmInstanceID(pvmInstanceID string) { + o.PvmInstanceID = pvmInstanceID +} + +// WithVpmemVolumeID adds the vpmemVolumeID to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) WithVpmemVolumeID(vpmemVolumeID string) *PcloudPvminstancesVpmemVolumesGetParams { + o.SetVpmemVolumeID(vpmemVolumeID) + return o +} + +// SetVpmemVolumeID adds the vpmemVolumeId to the pcloud pvminstances vpmem volumes get params +func (o *PcloudPvminstancesVpmemVolumesGetParams) SetVpmemVolumeID(vpmemVolumeID string) { + o.VpmemVolumeID = vpmemVolumeID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPvminstancesVpmemVolumesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param pvm_instance_id + if err := r.SetPathParam("pvm_instance_id", o.PvmInstanceID); err != nil { + return err + } + + // path param vpmem_volume_id + if err := r.SetPathParam("vpmem_volume_id", o.VpmemVolumeID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_responses.go new file mode 100644 index 0000000000..5659488977 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_get_responses.go @@ -0,0 +1,487 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPvminstancesVpmemVolumesGetReader is a Reader for the PcloudPvminstancesVpmemVolumesGet structure. +type PcloudPvminstancesVpmemVolumesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPvminstancesVpmemVolumesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewPcloudPvminstancesVpmemVolumesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudPvminstancesVpmemVolumesGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudPvminstancesVpmemVolumesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudPvminstancesVpmemVolumesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesVpmemVolumesGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPcloudPvminstancesVpmemVolumesGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}] pcloud.pvminstances.vpmem-volumes.get", response, response.Code()) + } +} + +// NewPcloudPvminstancesVpmemVolumesGetOK creates a PcloudPvminstancesVpmemVolumesGetOK with default headers values +func NewPcloudPvminstancesVpmemVolumesGetOK() *PcloudPvminstancesVpmemVolumesGetOK { + return &PcloudPvminstancesVpmemVolumesGetOK{} +} + +/* +PcloudPvminstancesVpmemVolumesGetOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudPvminstancesVpmemVolumesGetOK struct { + Payload *models.VPMemVolumeReference +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get o k response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get o k response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get o k response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get o k response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get o k response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get o k response +func (o *PcloudPvminstancesVpmemVolumesGetOK) Code() int { + return 200 +} + +func (o *PcloudPvminstancesVpmemVolumesGetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetOK %s", 200, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetOK %s", 200, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetOK) GetPayload() *models.VPMemVolumeReference { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.VPMemVolumeReference) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetBadRequest creates a PcloudPvminstancesVpmemVolumesGetBadRequest with default headers values +func NewPcloudPvminstancesVpmemVolumesGetBadRequest() *PcloudPvminstancesVpmemVolumesGetBadRequest { + return &PcloudPvminstancesVpmemVolumesGetBadRequest{} +} + +/* +PcloudPvminstancesVpmemVolumesGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesVpmemVolumesGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get bad request response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get bad request response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get bad request response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get bad request response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get bad request response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get bad request response +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetUnauthorized creates a PcloudPvminstancesVpmemVolumesGetUnauthorized with default headers values +func NewPcloudPvminstancesVpmemVolumesGetUnauthorized() *PcloudPvminstancesVpmemVolumesGetUnauthorized { + return &PcloudPvminstancesVpmemVolumesGetUnauthorized{} +} + +/* +PcloudPvminstancesVpmemVolumesGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVpmemVolumesGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get unauthorized response +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetForbidden creates a PcloudPvminstancesVpmemVolumesGetForbidden with default headers values +func NewPcloudPvminstancesVpmemVolumesGetForbidden() *PcloudPvminstancesVpmemVolumesGetForbidden { + return &PcloudPvminstancesVpmemVolumesGetForbidden{} +} + +/* +PcloudPvminstancesVpmemVolumesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVpmemVolumesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get forbidden response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get forbidden response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get forbidden response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get forbidden response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get forbidden response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get forbidden response +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetNotFound creates a PcloudPvminstancesVpmemVolumesGetNotFound with default headers values +func NewPcloudPvminstancesVpmemVolumesGetNotFound() *PcloudPvminstancesVpmemVolumesGetNotFound { + return &PcloudPvminstancesVpmemVolumesGetNotFound{} +} + +/* +PcloudPvminstancesVpmemVolumesGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesVpmemVolumesGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get not found response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get not found response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get not found response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get not found response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get not found response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get not found response +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetInternalServerError creates a PcloudPvminstancesVpmemVolumesGetInternalServerError with default headers values +func NewPcloudPvminstancesVpmemVolumesGetInternalServerError() *PcloudPvminstancesVpmemVolumesGetInternalServerError { + return &PcloudPvminstancesVpmemVolumesGetInternalServerError{} +} + +/* +PcloudPvminstancesVpmemVolumesGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudPvminstancesVpmemVolumesGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes get internal server error response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes get internal server error response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes get internal server error response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes get internal server error response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes get internal server error response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes get internal server error response +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) Code() int { + return 500 +} + +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes/{vpmem_volume_id}][%d] pcloudPvminstancesVpmemVolumesGetInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_parameters.go new file mode 100644 index 0000000000..baceb9c5a0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPcloudPvminstancesVpmemVolumesGetallParams creates a new PcloudPvminstancesVpmemVolumesGetallParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPcloudPvminstancesVpmemVolumesGetallParams() *PcloudPvminstancesVpmemVolumesGetallParams { + return &PcloudPvminstancesVpmemVolumesGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetallParamsWithTimeout creates a new PcloudPvminstancesVpmemVolumesGetallParams object +// with the ability to set a timeout on a request. +func NewPcloudPvminstancesVpmemVolumesGetallParamsWithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesGetallParams { + return &PcloudPvminstancesVpmemVolumesGetallParams{ + timeout: timeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetallParamsWithContext creates a new PcloudPvminstancesVpmemVolumesGetallParams object +// with the ability to set a context for a request. +func NewPcloudPvminstancesVpmemVolumesGetallParamsWithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesGetallParams { + return &PcloudPvminstancesVpmemVolumesGetallParams{ + Context: ctx, + } +} + +// NewPcloudPvminstancesVpmemVolumesGetallParamsWithHTTPClient creates a new PcloudPvminstancesVpmemVolumesGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudPvminstancesVpmemVolumesGetallParamsWithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesGetallParams { + return &PcloudPvminstancesVpmemVolumesGetallParams{ + HTTPClient: client, + } +} + +/* +PcloudPvminstancesVpmemVolumesGetallParams contains all the parameters to send to the API endpoint + + for the pcloud pvminstances vpmem volumes getall operation. + + Typically these are written to a http.Request. +*/ +type PcloudPvminstancesVpmemVolumesGetallParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + /* PvmInstanceID. + + PCloud PVM Instance ID + */ + PvmInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud pvminstances vpmem volumes getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithDefaults() *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud pvminstances vpmem volumes getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPvmInstanceID adds the pvmInstanceID to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WithPvmInstanceID(pvmInstanceID string) *PcloudPvminstancesVpmemVolumesGetallParams { + o.SetPvmInstanceID(pvmInstanceID) + return o +} + +// SetPvmInstanceID adds the pvmInstanceId to the pcloud pvminstances vpmem volumes getall params +func (o *PcloudPvminstancesVpmemVolumesGetallParams) SetPvmInstanceID(pvmInstanceID string) { + o.PvmInstanceID = pvmInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPvminstancesVpmemVolumesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param pvm_instance_id + if err := r.SetPathParam("pvm_instance_id", o.PvmInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_responses.go new file mode 100644 index 0000000000..ea2447a02e --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_getall_responses.go @@ -0,0 +1,487 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPvminstancesVpmemVolumesGetallReader is a Reader for the PcloudPvminstancesVpmemVolumesGetall structure. +type PcloudPvminstancesVpmemVolumesGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPvminstancesVpmemVolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewPcloudPvminstancesVpmemVolumesGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudPvminstancesVpmemVolumesGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudPvminstancesVpmemVolumesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudPvminstancesVpmemVolumesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesVpmemVolumesGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPcloudPvminstancesVpmemVolumesGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes] pcloud.pvminstances.vpmem-volumes.getall", response, response.Code()) + } +} + +// NewPcloudPvminstancesVpmemVolumesGetallOK creates a PcloudPvminstancesVpmemVolumesGetallOK with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallOK() *PcloudPvminstancesVpmemVolumesGetallOK { + return &PcloudPvminstancesVpmemVolumesGetallOK{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudPvminstancesVpmemVolumesGetallOK struct { + Payload *models.VPMemVolumes +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall o k response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall o k response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall o k response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall o k response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall o k response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall o k response +func (o *PcloudPvminstancesVpmemVolumesGetallOK) Code() int { + return 200 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallOK %s", 200, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallOK %s", 200, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallOK) GetPayload() *models.VPMemVolumes { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.VPMemVolumes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetallBadRequest creates a PcloudPvminstancesVpmemVolumesGetallBadRequest with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallBadRequest() *PcloudPvminstancesVpmemVolumesGetallBadRequest { + return &PcloudPvminstancesVpmemVolumesGetallBadRequest{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesVpmemVolumesGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall bad request response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall bad request response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall bad request response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall bad request response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall bad request response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall bad request response +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetallUnauthorized creates a PcloudPvminstancesVpmemVolumesGetallUnauthorized with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallUnauthorized() *PcloudPvminstancesVpmemVolumesGetallUnauthorized { + return &PcloudPvminstancesVpmemVolumesGetallUnauthorized{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVpmemVolumesGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall unauthorized response +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetallForbidden creates a PcloudPvminstancesVpmemVolumesGetallForbidden with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallForbidden() *PcloudPvminstancesVpmemVolumesGetallForbidden { + return &PcloudPvminstancesVpmemVolumesGetallForbidden{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVpmemVolumesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall forbidden response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall forbidden response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall forbidden response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall forbidden response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall forbidden response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall forbidden response +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetallNotFound creates a PcloudPvminstancesVpmemVolumesGetallNotFound with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallNotFound() *PcloudPvminstancesVpmemVolumesGetallNotFound { + return &PcloudPvminstancesVpmemVolumesGetallNotFound{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesVpmemVolumesGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall not found response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall not found response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall not found response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall not found response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall not found response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall not found response +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesGetallInternalServerError creates a PcloudPvminstancesVpmemVolumesGetallInternalServerError with default headers values +func NewPcloudPvminstancesVpmemVolumesGetallInternalServerError() *PcloudPvminstancesVpmemVolumesGetallInternalServerError { + return &PcloudPvminstancesVpmemVolumesGetallInternalServerError{} +} + +/* +PcloudPvminstancesVpmemVolumesGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudPvminstancesVpmemVolumesGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes getall internal server error response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes getall internal server error response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes getall internal server error response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes getall internal server error response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes getall internal server error response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes getall internal server error response +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) Code() int { + return 500 +} + +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesGetallInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesGetallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_parameters.go new file mode 100644 index 0000000000..0aa898ed02 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_parameters.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// NewPcloudPvminstancesVpmemVolumesPostParams creates a new PcloudPvminstancesVpmemVolumesPostParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewPcloudPvminstancesVpmemVolumesPostParams() *PcloudPvminstancesVpmemVolumesPostParams { + return &PcloudPvminstancesVpmemVolumesPostParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesPostParamsWithTimeout creates a new PcloudPvminstancesVpmemVolumesPostParams object +// with the ability to set a timeout on a request. +func NewPcloudPvminstancesVpmemVolumesPostParamsWithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesPostParams { + return &PcloudPvminstancesVpmemVolumesPostParams{ + timeout: timeout, + } +} + +// NewPcloudPvminstancesVpmemVolumesPostParamsWithContext creates a new PcloudPvminstancesVpmemVolumesPostParams object +// with the ability to set a context for a request. +func NewPcloudPvminstancesVpmemVolumesPostParamsWithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesPostParams { + return &PcloudPvminstancesVpmemVolumesPostParams{ + Context: ctx, + } +} + +// NewPcloudPvminstancesVpmemVolumesPostParamsWithHTTPClient creates a new PcloudPvminstancesVpmemVolumesPostParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudPvminstancesVpmemVolumesPostParamsWithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesPostParams { + return &PcloudPvminstancesVpmemVolumesPostParams{ + HTTPClient: client, + } +} + +/* +PcloudPvminstancesVpmemVolumesPostParams contains all the parameters to send to the API endpoint + + for the pcloud pvminstances vpmem volumes post operation. + + Typically these are written to a http.Request. +*/ +type PcloudPvminstancesVpmemVolumesPostParams struct { + + /* Body. + + PVM Instance vPMEM volume create parameters + */ + Body *models.VPMemVolumeAttach + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + /* PvmInstanceID. + + PCloud PVM Instance ID + */ + PvmInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud pvminstances vpmem volumes post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithDefaults() *PcloudPvminstancesVpmemVolumesPostParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud pvminstances vpmem volumes post params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithTimeout(timeout time.Duration) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithContext(ctx context.Context) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithHTTPClient(client *http.Client) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithBody(body *models.VPMemVolumeAttach) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetBody(body *models.VPMemVolumeAttach) { + o.Body = body +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WithPvmInstanceID adds the pvmInstanceID to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) WithPvmInstanceID(pvmInstanceID string) *PcloudPvminstancesVpmemVolumesPostParams { + o.SetPvmInstanceID(pvmInstanceID) + return o +} + +// SetPvmInstanceID adds the pvmInstanceId to the pcloud pvminstances vpmem volumes post params +func (o *PcloudPvminstancesVpmemVolumesPostParams) SetPvmInstanceID(pvmInstanceID string) { + o.PvmInstanceID = pvmInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPvminstancesVpmemVolumesPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + // path param pvm_instance_id + if err := r.SetPathParam("pvm_instance_id", o.PvmInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_responses.go new file mode 100644 index 0000000000..7030e49e28 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes/pcloud_pvminstances_vpmem_volumes_post_responses.go @@ -0,0 +1,639 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_v_p_mem_volumes + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + stderrors "errors" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// PcloudPvminstancesVpmemVolumesPostReader is a Reader for the PcloudPvminstancesVpmemVolumesPost structure. +type PcloudPvminstancesVpmemVolumesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPvminstancesVpmemVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 202: + result := NewPcloudPvminstancesVpmemVolumesPostAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudPvminstancesVpmemVolumesPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudPvminstancesVpmemVolumesPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudPvminstancesVpmemVolumesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesVpmemVolumesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewPcloudPvminstancesVpmemVolumesPostConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPcloudPvminstancesVpmemVolumesPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPcloudPvminstancesVpmemVolumesPostInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes] pcloud.pvminstances.vpmem-volumes.post", response, response.Code()) + } +} + +// NewPcloudPvminstancesVpmemVolumesPostAccepted creates a PcloudPvminstancesVpmemVolumesPostAccepted with default headers values +func NewPcloudPvminstancesVpmemVolumesPostAccepted() *PcloudPvminstancesVpmemVolumesPostAccepted { + return &PcloudPvminstancesVpmemVolumesPostAccepted{} +} + +/* +PcloudPvminstancesVpmemVolumesPostAccepted describes a response with status code 202, with default header values. + +Accepted +*/ +type PcloudPvminstancesVpmemVolumesPostAccepted struct { + Payload *models.VPMemVolumes +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post accepted response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post accepted response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post accepted response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post accepted response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post accepted response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post accepted response +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) Code() int { + return 202 +} + +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostAccepted %s", 202, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostAccepted %s", 202, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) GetPayload() *models.VPMemVolumes { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.VPMemVolumes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostBadRequest creates a PcloudPvminstancesVpmemVolumesPostBadRequest with default headers values +func NewPcloudPvminstancesVpmemVolumesPostBadRequest() *PcloudPvminstancesVpmemVolumesPostBadRequest { + return &PcloudPvminstancesVpmemVolumesPostBadRequest{} +} + +/* +PcloudPvminstancesVpmemVolumesPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesVpmemVolumesPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post bad request response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post bad request response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post bad request response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post bad request response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post bad request response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post bad request response +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostBadRequest %s", 400, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostUnauthorized creates a PcloudPvminstancesVpmemVolumesPostUnauthorized with default headers values +func NewPcloudPvminstancesVpmemVolumesPostUnauthorized() *PcloudPvminstancesVpmemVolumesPostUnauthorized { + return &PcloudPvminstancesVpmemVolumesPostUnauthorized{} +} + +/* +PcloudPvminstancesVpmemVolumesPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVpmemVolumesPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post unauthorized response +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostUnauthorized %s", 401, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostForbidden creates a PcloudPvminstancesVpmemVolumesPostForbidden with default headers values +func NewPcloudPvminstancesVpmemVolumesPostForbidden() *PcloudPvminstancesVpmemVolumesPostForbidden { + return &PcloudPvminstancesVpmemVolumesPostForbidden{} +} + +/* +PcloudPvminstancesVpmemVolumesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVpmemVolumesPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post forbidden response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post forbidden response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post forbidden response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post forbidden response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post forbidden response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post forbidden response +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostForbidden %s", 403, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostNotFound creates a PcloudPvminstancesVpmemVolumesPostNotFound with default headers values +func NewPcloudPvminstancesVpmemVolumesPostNotFound() *PcloudPvminstancesVpmemVolumesPostNotFound { + return &PcloudPvminstancesVpmemVolumesPostNotFound{} +} + +/* +PcloudPvminstancesVpmemVolumesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesVpmemVolumesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post not found response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post not found response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post not found response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post not found response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post not found response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post not found response +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostNotFound %s", 404, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostConflict creates a PcloudPvminstancesVpmemVolumesPostConflict with default headers values +func NewPcloudPvminstancesVpmemVolumesPostConflict() *PcloudPvminstancesVpmemVolumesPostConflict { + return &PcloudPvminstancesVpmemVolumesPostConflict{} +} + +/* +PcloudPvminstancesVpmemVolumesPostConflict describes a response with status code 409, with default header values. + +Conflict +*/ +type PcloudPvminstancesVpmemVolumesPostConflict struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post conflict response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post conflict response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post conflict response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post conflict response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post conflict response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post conflict response +func (o *PcloudPvminstancesVpmemVolumesPostConflict) Code() int { + return 409 +} + +func (o *PcloudPvminstancesVpmemVolumesPostConflict) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostConflict %s", 409, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostConflict) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostConflict %s", 409, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostConflict) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostUnprocessableEntity creates a PcloudPvminstancesVpmemVolumesPostUnprocessableEntity with default headers values +func NewPcloudPvminstancesVpmemVolumesPostUnprocessableEntity() *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity { + return &PcloudPvminstancesVpmemVolumesPostUnprocessableEntity{} +} + +/* +PcloudPvminstancesVpmemVolumesPostUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity +*/ +type PcloudPvminstancesVpmemVolumesPostUnprocessableEntity struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post unprocessable entity response +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) Code() int { + return 422 +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostUnprocessableEntity %s", 422, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostUnprocessableEntity %s", 422, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewPcloudPvminstancesVpmemVolumesPostInternalServerError creates a PcloudPvminstancesVpmemVolumesPostInternalServerError with default headers values +func NewPcloudPvminstancesVpmemVolumesPostInternalServerError() *PcloudPvminstancesVpmemVolumesPostInternalServerError { + return &PcloudPvminstancesVpmemVolumesPostInternalServerError{} +} + +/* +PcloudPvminstancesVpmemVolumesPostInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudPvminstancesVpmemVolumesPostInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances vpmem volumes post internal server error response has a 2xx status code +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances vpmem volumes post internal server error response has a 3xx status code +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances vpmem volumes post internal server error response has a 4xx status code +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances vpmem volumes post internal server error response has a 5xx status code +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances vpmem volumes post internal server error response a status code equal to that given +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances vpmem volumes post internal server error response +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) Code() int { + return 500 +} + +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/vpmem-volumes][%d] pcloudPvminstancesVpmemVolumesPostInternalServerError %s", 500, payload) +} + +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVpmemVolumesPostInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go index 1d549c5a5a..2611e36f84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go @@ -87,7 +87,7 @@ PcloudVpnconnectionsDelete deletes v p n connection Delete VPN Connection (by its identifier) */ func (a *Client) PcloudVpnconnectionsDelete(params *PcloudVpnconnectionsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsDeleteParams() } @@ -107,17 +107,22 @@ func (a *Client) PcloudVpnconnectionsDelete(params *PcloudVpnconnectionsDeletePa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -128,7 +133,7 @@ PcloudVpnconnectionsGet gets v p n connection Get a VPN Connection */ func (a *Client) PcloudVpnconnectionsGet(params *PcloudVpnconnectionsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsGetParams() } @@ -148,17 +153,22 @@ func (a *Client) PcloudVpnconnectionsGet(params *PcloudVpnconnectionsGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -169,7 +179,7 @@ PcloudVpnconnectionsGetall gets all v p n connections Get all VPN Connections */ func (a *Client) PcloudVpnconnectionsGetall(params *PcloudVpnconnectionsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsGetallParams() } @@ -189,17 +199,22 @@ func (a *Client) PcloudVpnconnectionsGetall(params *PcloudVpnconnectionsGetallPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -210,7 +225,7 @@ PcloudVpnconnectionsNetworksDelete detaches network Detach network from a specific VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksDelete(params *PcloudVpnconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsNetworksDeleteParams() } @@ -230,17 +245,22 @@ func (a *Client) PcloudVpnconnectionsNetworksDelete(params *PcloudVpnconnections for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsNetworksDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.networks.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -251,7 +271,7 @@ PcloudVpnconnectionsNetworksGet gets attached networks Get a list of network IDs attached to a VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksGet(params *PcloudVpnconnectionsNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsNetworksGetParams() } @@ -271,17 +291,22 @@ func (a *Client) PcloudVpnconnectionsNetworksGet(params *PcloudVpnconnectionsNet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsNetworksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.networks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -292,7 +317,7 @@ PcloudVpnconnectionsNetworksPut attaches network Attach a network to a VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksPut(params *PcloudVpnconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsNetworksPutParams() } @@ -312,17 +337,22 @@ func (a *Client) PcloudVpnconnectionsNetworksPut(params *PcloudVpnconnectionsNet for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsNetworksPutAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.networks.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -333,7 +363,7 @@ PcloudVpnconnectionsPeersubnetsDelete detaches peer subnet Detach peer subnet from a VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsDelete(params *PcloudVpnconnectionsPeersubnetsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsPeersubnetsDeleteParams() } @@ -353,17 +383,22 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsDelete(params *PcloudVpnconnecti for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsPeersubnetsDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.peersubnets.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -374,7 +409,7 @@ PcloudVpnconnectionsPeersubnetsGet gets peer subnets Get a list of peer subnets attached to a specific VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsGet(params *PcloudVpnconnectionsPeersubnetsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsPeersubnetsGetParams() } @@ -394,17 +429,22 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsGet(params *PcloudVpnconnections for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsPeersubnetsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.peersubnets.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -415,7 +455,7 @@ PcloudVpnconnectionsPeersubnetsPut attaches peer subnet Attach peer subnet to a VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsPut(params *PcloudVpnconnectionsPeersubnetsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsPeersubnetsPutParams() } @@ -435,17 +475,22 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsPut(params *PcloudVpnconnections for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsPeersubnetsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.peersubnets.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -456,7 +501,7 @@ PcloudVpnconnectionsPost creates v p n connection Create a new VPN Connection */ func (a *Client) PcloudVpnconnectionsPost(params *PcloudVpnconnectionsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsPostParams() } @@ -476,17 +521,22 @@ func (a *Client) PcloudVpnconnectionsPost(params *PcloudVpnconnectionsPostParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -497,7 +547,7 @@ PcloudVpnconnectionsPut updates v p n connection update a VPN Connection (by its identifier) */ func (a *Client) PcloudVpnconnectionsPut(params *PcloudVpnconnectionsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVpnconnectionsPutParams() } @@ -517,17 +567,22 @@ func (a *Client) PcloudVpnconnectionsPut(params *PcloudVpnconnectionsPutParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVpnconnectionsPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.vpnconnections.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go index c65485ab45..149ace4c0d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVpnconnectionsDeleteAccepted() @@ -128,7 +129,7 @@ func (o *PcloudVpnconnectionsDeleteAccepted) readResponse(response runtime.Clien o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVpnconnectionsDeleteBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVpnconnectionsDeleteUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVpnconnectionsDeleteForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVpnconnectionsDeleteNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVpnconnectionsDeleteInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go index fcfd6dd00e..360985cd6e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsGetOK() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.VPNConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsGetNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsGetUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go index 30ec06a3bf..8333120616 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudVpnconnectionsGetallOK) readResponse(response runtime.ClientRespo o.Payload = new(models.VPNConnections) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVpnconnectionsGetallBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVpnconnectionsGetallUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVpnconnectionsGetallForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVpnconnectionsGetallNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVpnconnectionsGetallInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go index 8e46558911..e4c4379c91 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsNetworksDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsNetworksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVpnconnectionsNetworksDeleteAccepted() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteAccepted) readResponse(response runti o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go index 4a496ffef2..81f9d01af0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsNetworksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsNetworksGetOK() @@ -128,7 +129,7 @@ func (o *PcloudVpnconnectionsNetworksGetOK) readResponse(response runtime.Client o.Payload = new(models.NetworkIDs) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVpnconnectionsNetworksGetBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVpnconnectionsNetworksGetUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVpnconnectionsNetworksGetForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVpnconnectionsNetworksGetNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVpnconnectionsNetworksGetInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go index 601d1d5724..4c2d313116 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsNetworksPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsNetworksPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVpnconnectionsNetworksPutAccepted() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsNetworksPutAccepted) readResponse(response runtime. o.Payload = new(models.JobReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsNetworksPutBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsNetworksPutUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsNetworksPutForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsNetworksPutNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsNetworksPutInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go index 8ef0944e5a..66d2a867e3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsPeersubnetsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsPeersubnetsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsPeersubnetsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsPeersubnetsDeleteOK() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) readResponse(response runtime. o.Payload = new(models.PeerSubnets) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go index 6dd71e9749..abe3bb1314 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsPeersubnetsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsPeersubnetsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsPeersubnetsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsPeersubnetsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetOK) readResponse(response runtime.Cli o.Payload = new(models.PeerSubnets) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go index a2f6e873bd..4b0aadd45c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsPeersubnetsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsPeersubnetsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsPeersubnetsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsPeersubnetsPutOK() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutOK) readResponse(response runtime.Cli o.Payload = new(models.PeerSubnets) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go index 7306c23922..e2375f96eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVpnconnectionsPostAccepted() @@ -146,7 +147,7 @@ func (o *PcloudVpnconnectionsPostAccepted) readResponse(response runtime.ClientR o.Payload = new(models.VPNConnectionCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *PcloudVpnconnectionsPostBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *PcloudVpnconnectionsPostUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *PcloudVpnconnectionsPostForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *PcloudVpnconnectionsPostNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *PcloudVpnconnectionsPostMethodNotAllowed) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *PcloudVpnconnectionsPostConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *PcloudVpnconnectionsPostUnprocessableEntity) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *PcloudVpnconnectionsPostInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go index fd3b640966..0b26b557fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_connections import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVpnconnectionsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVpnconnectionsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVpnconnectionsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVpnconnectionsPutOK() @@ -134,7 +135,7 @@ func (o *PcloudVpnconnectionsPutOK) readResponse(response runtime.ClientResponse o.Payload = new(models.VPNConnection) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVpnconnectionsPutBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVpnconnectionsPutUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVpnconnectionsPutForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVpnconnectionsPutNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVpnconnectionsPutUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVpnconnectionsPutInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go index 0184c9dafa..8173da36da 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go @@ -85,7 +85,7 @@ PcloudIkepoliciesDelete deletes i k e policy Delete an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesDelete(params *PcloudIkepoliciesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIkepoliciesDeleteParams() } @@ -105,17 +105,22 @@ func (a *Client) PcloudIkepoliciesDelete(params *PcloudIkepoliciesDeleteParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIkepoliciesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ikepolicies.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -126,7 +131,7 @@ PcloudIkepoliciesGet gets the specified i k e policy Get an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesGet(params *PcloudIkepoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIkepoliciesGetParams() } @@ -146,17 +151,22 @@ func (a *Client) PcloudIkepoliciesGet(params *PcloudIkepoliciesGetParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIkepoliciesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ikepolicies.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -167,7 +177,7 @@ PcloudIkepoliciesGetall gets all i k e policies List all IKE Policies with all attributes */ func (a *Client) PcloudIkepoliciesGetall(params *PcloudIkepoliciesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIkepoliciesGetallParams() } @@ -187,17 +197,22 @@ func (a *Client) PcloudIkepoliciesGetall(params *PcloudIkepoliciesGetallParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIkepoliciesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ikepolicies.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -208,7 +223,7 @@ PcloudIkepoliciesPost adds i k e policy Add a new IKE Policy */ func (a *Client) PcloudIkepoliciesPost(params *PcloudIkepoliciesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIkepoliciesPostParams() } @@ -228,17 +243,22 @@ func (a *Client) PcloudIkepoliciesPost(params *PcloudIkepoliciesPostParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIkepoliciesPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ikepolicies.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -249,7 +269,7 @@ PcloudIkepoliciesPut updates i k e policy update an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesPut(params *PcloudIkepoliciesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIkepoliciesPutParams() } @@ -269,17 +289,22 @@ func (a *Client) PcloudIkepoliciesPut(params *PcloudIkepoliciesPutParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIkepoliciesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ikepolicies.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -290,7 +315,7 @@ PcloudIpsecpoliciesDelete deletes IP sec policy Delete an IPSec Policy (by its unique identifier) */ func (a *Client) PcloudIpsecpoliciesDelete(params *PcloudIpsecpoliciesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIpsecpoliciesDeleteParams() } @@ -310,17 +335,22 @@ func (a *Client) PcloudIpsecpoliciesDelete(params *PcloudIpsecpoliciesDeletePara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIpsecpoliciesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ipsecpolicies.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -331,7 +361,7 @@ PcloudIpsecpoliciesGet gets the specified IP sec policy Get an IPSec Policy (by its unique identifier) */ func (a *Client) PcloudIpsecpoliciesGet(params *PcloudIpsecpoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIpsecpoliciesGetParams() } @@ -351,17 +381,22 @@ func (a *Client) PcloudIpsecpoliciesGet(params *PcloudIpsecpoliciesGetParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIpsecpoliciesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ipsecpolicies.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -372,7 +407,7 @@ PcloudIpsecpoliciesGetall gets all IP sec policies Get all IPSec Policies with all their attributes */ func (a *Client) PcloudIpsecpoliciesGetall(params *PcloudIpsecpoliciesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIpsecpoliciesGetallParams() } @@ -392,17 +427,22 @@ func (a *Client) PcloudIpsecpoliciesGetall(params *PcloudIpsecpoliciesGetallPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIpsecpoliciesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ipsecpolicies.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -413,7 +453,7 @@ PcloudIpsecpoliciesPost adds IP sec policy Add a new IPSec Policy */ func (a *Client) PcloudIpsecpoliciesPost(params *PcloudIpsecpoliciesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIpsecpoliciesPostParams() } @@ -433,17 +473,22 @@ func (a *Client) PcloudIpsecpoliciesPost(params *PcloudIpsecpoliciesPostParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIpsecpoliciesPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ipsecpolicies.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -454,7 +499,7 @@ PcloudIpsecpoliciesPut updates IP sec policy update an IPSec Policy */ func (a *Client) PcloudIpsecpoliciesPut(params *PcloudIpsecpoliciesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudIpsecpoliciesPutParams() } @@ -474,17 +519,22 @@ func (a *Client) PcloudIpsecpoliciesPut(params *PcloudIpsecpoliciesPutParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudIpsecpoliciesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.ipsecpolicies.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go index 642873dce4..6337e22439 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIkepoliciesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIkepoliciesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIkepoliciesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIkepoliciesDeleteOK() @@ -126,7 +127,7 @@ func (o *PcloudIkepoliciesDeleteOK) GetPayload() models.Object { func (o *PcloudIkepoliciesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudIkepoliciesDeleteBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudIkepoliciesDeleteUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudIkepoliciesDeleteForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudIkepoliciesDeleteNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudIkepoliciesDeleteInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go index 4868743792..a7dc6e2a8f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIkepoliciesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIkepoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIkepoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIkepoliciesGetOK() @@ -134,7 +135,7 @@ func (o *PcloudIkepoliciesGetOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.IKEPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudIkepoliciesGetBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudIkepoliciesGetUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudIkepoliciesGetForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudIkepoliciesGetNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudIkepoliciesGetUnprocessableEntity) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudIkepoliciesGetInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go index ed9eeb0d96..bcf30d9f8d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIkepoliciesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIkepoliciesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIkepoliciesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIkepoliciesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudIkepoliciesGetallOK) readResponse(response runtime.ClientResponse o.Payload = new(models.IKEPolicies) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudIkepoliciesGetallBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudIkepoliciesGetallUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudIkepoliciesGetallForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudIkepoliciesGetallNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudIkepoliciesGetallInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go index 119e2e5af4..61222c13ee 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIkepoliciesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIkepoliciesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIkepoliciesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIkepoliciesPostOK() @@ -134,7 +135,7 @@ func (o *PcloudIkepoliciesPostOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.IKEPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudIkepoliciesPostBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudIkepoliciesPostUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudIkepoliciesPostForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudIkepoliciesPostConflict) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudIkepoliciesPostUnprocessableEntity) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudIkepoliciesPostInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go index 046ca51acb..80b1a1fec2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIkepoliciesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIkepoliciesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIkepoliciesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIkepoliciesPutOK() @@ -134,7 +135,7 @@ func (o *PcloudIkepoliciesPutOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.IKEPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudIkepoliciesPutBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudIkepoliciesPutUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudIkepoliciesPutForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudIkepoliciesPutNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudIkepoliciesPutUnprocessableEntity) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudIkepoliciesPutInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go index 4b3ba8ecd9..5ede2140a7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIpsecpoliciesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIpsecpoliciesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIpsecpoliciesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIpsecpoliciesDeleteOK() @@ -126,7 +127,7 @@ func (o *PcloudIpsecpoliciesDeleteOK) GetPayload() models.Object { func (o *PcloudIpsecpoliciesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudIpsecpoliciesDeleteBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudIpsecpoliciesDeleteUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudIpsecpoliciesDeleteForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudIpsecpoliciesDeleteNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudIpsecpoliciesDeleteInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go index 0aa1b208ea..3ef2c3333b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIpsecpoliciesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIpsecpoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIpsecpoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIpsecpoliciesGetOK() @@ -134,7 +135,7 @@ func (o *PcloudIpsecpoliciesGetOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.IPSecPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudIpsecpoliciesGetBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudIpsecpoliciesGetUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudIpsecpoliciesGetForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudIpsecpoliciesGetNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudIpsecpoliciesGetUnprocessableEntity) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudIpsecpoliciesGetInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go index d33c2905d7..5bd5c10f00 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIpsecpoliciesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIpsecpoliciesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIpsecpoliciesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIpsecpoliciesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudIpsecpoliciesGetallOK) readResponse(response runtime.ClientRespon o.Payload = new(models.IPSecPolicies) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudIpsecpoliciesGetallBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudIpsecpoliciesGetallUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudIpsecpoliciesGetallForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudIpsecpoliciesGetallNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudIpsecpoliciesGetallInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go index f7870d033d..6e51607600 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIpsecpoliciesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIpsecpoliciesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIpsecpoliciesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIpsecpoliciesPostOK() @@ -140,7 +141,7 @@ func (o *PcloudIpsecpoliciesPostOK) readResponse(response runtime.ClientResponse o.Payload = new(models.IPSecPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudIpsecpoliciesPostBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudIpsecpoliciesPostUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudIpsecpoliciesPostForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudIpsecpoliciesPostNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudIpsecpoliciesPostConflict) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudIpsecpoliciesPostUnprocessableEntity) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudIpsecpoliciesPostInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go index b8626e3a78..3cfcf47438 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_v_p_n_policies import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudIpsecpoliciesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudIpsecpoliciesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudIpsecpoliciesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudIpsecpoliciesPutOK() @@ -140,7 +141,7 @@ func (o *PcloudIpsecpoliciesPutOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.IPSecPolicy) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudIpsecpoliciesPutBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudIpsecpoliciesPutUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudIpsecpoliciesPutForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudIpsecpoliciesPutNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudIpsecpoliciesPutConflict) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudIpsecpoliciesPutUnprocessableEntity) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudIpsecpoliciesPutInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_parameters.go deleted file mode 100644 index 3f54fca4ac..0000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_parameters.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package p_cloud_virtual_serial_number - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewPcloudCloudinstancesVirtualSerialNumberGetallParams creates a new PcloudCloudinstancesVirtualSerialNumberGetallParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPcloudCloudinstancesVirtualSerialNumberGetallParams() *PcloudCloudinstancesVirtualSerialNumberGetallParams { - return &PcloudCloudinstancesVirtualSerialNumberGetallParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithTimeout creates a new PcloudCloudinstancesVirtualSerialNumberGetallParams object -// with the ability to set a timeout on a request. -func NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithTimeout(timeout time.Duration) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - return &PcloudCloudinstancesVirtualSerialNumberGetallParams{ - timeout: timeout, - } -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithContext creates a new PcloudCloudinstancesVirtualSerialNumberGetallParams object -// with the ability to set a context for a request. -func NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithContext(ctx context.Context) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - return &PcloudCloudinstancesVirtualSerialNumberGetallParams{ - Context: ctx, - } -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithHTTPClient creates a new PcloudCloudinstancesVirtualSerialNumberGetallParams object -// with the ability to set a custom HTTPClient for a request. -func NewPcloudCloudinstancesVirtualSerialNumberGetallParamsWithHTTPClient(client *http.Client) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - return &PcloudCloudinstancesVirtualSerialNumberGetallParams{ - HTTPClient: client, - } -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallParams contains all the parameters to send to the API endpoint - - for the pcloud cloudinstances virtual serial number getall operation. - - Typically these are written to a http.Request. -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallParams struct { - - /* CloudInstanceID. - - Cloud Instance ID of a PCloud Instance - */ - CloudInstanceID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the pcloud cloudinstances virtual serial number getall params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WithDefaults() *PcloudCloudinstancesVirtualSerialNumberGetallParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the pcloud cloudinstances virtual serial number getall params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WithTimeout(timeout time.Duration) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WithContext(ctx context.Context) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WithHTTPClient(client *http.Client) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCloudInstanceID adds the cloudInstanceID to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WithCloudInstanceID(cloudInstanceID string) *PcloudCloudinstancesVirtualSerialNumberGetallParams { - o.SetCloudInstanceID(cloudInstanceID) - return o -} - -// SetCloudInstanceID adds the cloudInstanceId to the pcloud cloudinstances virtual serial number getall params -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) SetCloudInstanceID(cloudInstanceID string) { - o.CloudInstanceID = cloudInstanceID -} - -// WriteToRequest writes these params to a swagger request -func (o *PcloudCloudinstancesVirtualSerialNumberGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cloud_instance_id - if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_responses.go deleted file mode 100644 index 37efbafdd5..0000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_cloudinstances_virtual_serial_number_getall_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package p_cloud_virtual_serial_number - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/IBM-Cloud/power-go-client/power/models" -) - -// PcloudCloudinstancesVirtualSerialNumberGetallReader is a Reader for the PcloudCloudinstancesVirtualSerialNumberGetall structure. -type PcloudCloudinstancesVirtualSerialNumberGetallReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVirtualSerialNumberGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 401: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallUnauthorized() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 403: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallForbidden() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewPcloudCloudinstancesVirtualSerialNumberGetallInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number] pcloud.cloudinstances.virtual-serial-number.getall", response, response.Code()) - } -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallOK creates a PcloudCloudinstancesVirtualSerialNumberGetallOK with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallOK() *PcloudCloudinstancesVirtualSerialNumberGetallOK { - return &PcloudCloudinstancesVirtualSerialNumberGetallOK{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallOK describes a response with status code 200, with default header values. - -OK -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallOK struct { - Payload models.VirtualSerialNumberList -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall o k response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall o k response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall o k response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall o k response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) IsServerError() bool { - return false -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall o k response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall o k response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) Code() int { - return 200 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallOK %s", 200, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallOK %s", 200, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) GetPayload() models.VirtualSerialNumberList { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallBadRequest creates a PcloudCloudinstancesVirtualSerialNumberGetallBadRequest with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallBadRequest() *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest { - return &PcloudCloudinstancesVirtualSerialNumberGetallBadRequest{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallBadRequest struct { - Payload *models.Error -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall bad request response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall bad request response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall bad request response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall bad request response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall bad request response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall bad request response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) Code() int { - return 400 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallBadRequest %s", 400, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallBadRequest %s", 400, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallUnauthorized creates a PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallUnauthorized() *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized { - return &PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized describes a response with status code 401, with default header values. - -Unauthorized -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized struct { - Payload *models.Error -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall unauthorized response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall unauthorized response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall unauthorized response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) IsClientError() bool { - return true -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall unauthorized response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) IsServerError() bool { - return false -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall unauthorized response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) IsCode(code int) bool { - return code == 401 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall unauthorized response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) Code() int { - return 401 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallUnauthorized %s", 401, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallUnauthorized %s", 401, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallForbidden creates a PcloudCloudinstancesVirtualSerialNumberGetallForbidden with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallForbidden() *PcloudCloudinstancesVirtualSerialNumberGetallForbidden { - return &PcloudCloudinstancesVirtualSerialNumberGetallForbidden{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallForbidden describes a response with status code 403, with default header values. - -Forbidden -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallForbidden struct { - Payload *models.Error -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall forbidden response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall forbidden response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall forbidden response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) IsClientError() bool { - return true -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall forbidden response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) IsServerError() bool { - return false -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall forbidden response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) IsCode(code int) bool { - return code == 403 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall forbidden response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) Code() int { - return 403 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallForbidden %s", 403, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallForbidden %s", 403, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallNotFound creates a PcloudCloudinstancesVirtualSerialNumberGetallNotFound with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallNotFound() *PcloudCloudinstancesVirtualSerialNumberGetallNotFound { - return &PcloudCloudinstancesVirtualSerialNumberGetallNotFound{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallNotFound struct { - Payload *models.Error -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall not found response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall not found response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall not found response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall not found response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall not found response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall not found response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) Code() int { - return 404 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallNotFound %s", 404, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallNotFound %s", 404, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPcloudCloudinstancesVirtualSerialNumberGetallInternalServerError creates a PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError with default headers values -func NewPcloudCloudinstancesVirtualSerialNumberGetallInternalServerError() *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError { - return &PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError{} -} - -/* -PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError struct { - Payload *models.Error -} - -// IsSuccess returns true when this pcloud cloudinstances virtual serial number getall internal server error response has a 2xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this pcloud cloudinstances virtual serial number getall internal server error response has a 3xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this pcloud cloudinstances virtual serial number getall internal server error response has a 4xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this pcloud cloudinstances virtual serial number getall internal server error response has a 5xx status code -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this pcloud cloudinstances virtual serial number getall internal server error response a status code equal to that given -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the pcloud cloudinstances virtual serial number getall internal server error response -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) Code() int { - return 500 -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallInternalServerError %s", 500, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/virtual-serial-number][%d] pcloudCloudinstancesVirtualSerialNumberGetallInternalServerError %s", 500, payload) -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudCloudinstancesVirtualSerialNumberGetallInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_delete_responses.go index 320b74c69b..7c815b70d2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVirtualserialnumberDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVirtualserialnumberDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVirtualserialnumberDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesVirtualserialnumberDeleteAccepted() @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteAccepted) GetPayload() model func (o *PcloudPvminstancesVirtualserialnumberDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteBadRequest) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteUnauthorized) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteForbidden) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteNotFound) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteGone) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesVirtualserialnumberDeleteInternalServerError) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_get_responses.go index e9f85fbe81..17429f8ea7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVirtualserialnumberGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVirtualserialnumberGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVirtualserialnumberGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVirtualserialnumberGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetOK) readResponse(response runti o.Payload = new(models.VirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetBadRequest) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetUnauthorized) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetForbidden) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetNotFound) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesVirtualserialnumberGetInternalServerError) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_post_responses.go index 8a7516dd85..176cc0eb84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVirtualserialnumberPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVirtualserialnumberPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVirtualserialnumberPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesVirtualserialnumberPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostAccepted) readResponse(respons o.Payload = new(models.VirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostBadRequest) readResponse(respo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostUnauthorized) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostForbidden) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostNotFound) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostConflict) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostInternalServerError) readRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPostGatewayTimeout) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_put_responses.go index e351a1b06f..dc4d65b304 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_pvminstances_virtualserialnumber_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVirtualserialnumberPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVirtualserialnumberPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVirtualserialnumberPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVirtualserialnumberPutOK() @@ -140,7 +141,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutOK) readResponse(response runti o.Payload = new(models.VirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutAccepted) readResponse(response o.Payload = new(models.VirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutBadRequest) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutUnauthorized) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutForbidden) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutNotFound) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutUnprocessableEntity) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudPvminstancesVirtualserialnumberPutInternalServerError) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_delete_responses.go index c067ad876e..40b3c1945b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVirtualserialnumberDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVirtualserialnumberDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVirtualserialnumberDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVirtualserialnumberDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudVirtualserialnumberDeleteOK) GetPayload() models.Object { func (o *PcloudVirtualserialnumberDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudVirtualserialnumberDeleteBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudVirtualserialnumberDeleteUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudVirtualserialnumberDeleteForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudVirtualserialnumberDeleteNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudVirtualserialnumberDeleteGone) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudVirtualserialnumberDeleteInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_get_responses.go index 720b911be7..73d219bfca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVirtualserialnumberGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVirtualserialnumberGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVirtualserialnumberGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVirtualserialnumberGetOK() @@ -128,7 +129,7 @@ func (o *PcloudVirtualserialnumberGetOK) readResponse(response runtime.ClientRes o.Payload = new(models.VirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVirtualserialnumberGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVirtualserialnumberGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVirtualserialnumberGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVirtualserialnumberGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVirtualserialnumberGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_getall_responses.go index 9484d00761..1f340956a4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVirtualserialnumberGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVirtualserialnumberGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVirtualserialnumberGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVirtualserialnumberGetallOK() @@ -126,7 +127,7 @@ func (o *PcloudVirtualserialnumberGetallOK) GetPayload() models.VirtualSerialNum func (o *PcloudVirtualserialnumberGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudVirtualserialnumberGetallBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudVirtualserialnumberGetallUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudVirtualserialnumberGetallForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudVirtualserialnumberGetallNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudVirtualserialnumberGetallInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_put_responses.go index 577d9f7c08..1df5e85928 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVirtualserialnumberPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVirtualserialnumberPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVirtualserialnumberPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVirtualserialnumberPutOK() @@ -134,7 +135,7 @@ func (o *PcloudVirtualserialnumberPutOK) readResponse(response runtime.ClientRes o.Payload = new(models.GetServerVirtualSerialNumber) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVirtualserialnumberPutBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVirtualserialnumberPutUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVirtualserialnumberPutForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVirtualserialnumberPutNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVirtualserialnumberPutGone) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVirtualserialnumberPutInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_softwaretiers_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_softwaretiers_getall_responses.go index 53d0a5b9cc..7f202b8af1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_softwaretiers_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number/pcloud_virtualserialnumber_softwaretiers_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_virtual_serial_number import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVirtualserialnumberSoftwaretiersGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVirtualserialnumberSoftwaretiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVirtualserialnumberSoftwaretiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVirtualserialnumberSoftwaretiersGetallOK() @@ -120,7 +121,7 @@ func (o *PcloudVirtualserialnumberSoftwaretiersGetallOK) GetPayload() models.Sup func (o *PcloudVirtualserialnumberSoftwaretiersGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *PcloudVirtualserialnumberSoftwaretiersGetallBadRequest) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *PcloudVirtualserialnumberSoftwaretiersGetallUnauthorized) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *PcloudVirtualserialnumberSoftwaretiersGetallForbidden) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *PcloudVirtualserialnumberSoftwaretiersGetallInternalServerError) readRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go index f307f596a8..73aa355fc9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go @@ -85,7 +85,7 @@ PcloudVolumegroupsActionPost performs an action on a volume group Corresponding actions are 'start', 'stop', 'reset' */ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsActionPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsActionPostParams() } @@ -105,17 +105,22 @@ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsActionPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.action.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -124,7 +129,7 @@ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPo PcloudVolumegroupsDelete deletes a cloud instance volume group */ func (a *Client) PcloudVolumegroupsDelete(params *PcloudVolumegroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsDeleteParams() } @@ -144,17 +149,22 @@ func (a *Client) PcloudVolumegroupsDelete(params *PcloudVolumegroupsDeleteParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -163,7 +173,7 @@ func (a *Client) PcloudVolumegroupsDelete(params *PcloudVolumegroupsDeleteParams PcloudVolumegroupsGet gets volume group */ func (a *Client) PcloudVolumegroupsGet(params *PcloudVolumegroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsGetParams() } @@ -183,17 +193,22 @@ func (a *Client) PcloudVolumegroupsGet(params *PcloudVolumegroupsGetParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -202,7 +217,7 @@ func (a *Client) PcloudVolumegroupsGet(params *PcloudVolumegroupsGetParams, auth PcloudVolumegroupsGetDetails gets volume group details */ func (a *Client) PcloudVolumegroupsGetDetails(params *PcloudVolumegroupsGetDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetDetailsOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsGetDetailsParams() } @@ -222,17 +237,22 @@ func (a *Client) PcloudVolumegroupsGetDetails(params *PcloudVolumegroupsGetDetai for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsGetDetailsOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.getDetails: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -241,7 +261,7 @@ func (a *Client) PcloudVolumegroupsGetDetails(params *PcloudVolumegroupsGetDetai PcloudVolumegroupsGetall gets all volume groups */ func (a *Client) PcloudVolumegroupsGetall(params *PcloudVolumegroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsGetallParams() } @@ -261,17 +281,22 @@ func (a *Client) PcloudVolumegroupsGetall(params *PcloudVolumegroupsGetallParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -280,7 +305,7 @@ func (a *Client) PcloudVolumegroupsGetall(params *PcloudVolumegroupsGetallParams PcloudVolumegroupsGetallDetails gets all volume groups with details */ func (a *Client) PcloudVolumegroupsGetallDetails(params *PcloudVolumegroupsGetallDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetallDetailsOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsGetallDetailsParams() } @@ -300,17 +325,22 @@ func (a *Client) PcloudVolumegroupsGetallDetails(params *PcloudVolumegroupsGetal for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsGetallDetailsOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.getallDetails: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -319,7 +349,7 @@ func (a *Client) PcloudVolumegroupsGetallDetails(params *PcloudVolumegroupsGetal PcloudVolumegroupsPost creates a new volume group */ func (a *Client) PcloudVolumegroupsPost(params *PcloudVolumegroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsPostAccepted, *PcloudVolumegroupsPostPartialContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsPostParams() } @@ -339,18 +369,22 @@ func (a *Client) PcloudVolumegroupsPost(params *PcloudVolumegroupsPostParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudVolumegroupsPostAccepted: return value, nil, nil case *PcloudVolumegroupsPostPartialContent: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_volume_groups: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -359,7 +393,7 @@ func (a *Client) PcloudVolumegroupsPost(params *PcloudVolumegroupsPostParams, au PcloudVolumegroupsPut updates the volume group */ func (a *Client) PcloudVolumegroupsPut(params *PcloudVolumegroupsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsPutAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsPutParams() } @@ -379,17 +413,22 @@ func (a *Client) PcloudVolumegroupsPut(params *PcloudVolumegroupsPutParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsPutAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -398,7 +437,7 @@ func (a *Client) PcloudVolumegroupsPut(params *PcloudVolumegroupsPutParams, auth PcloudVolumegroupsRemoteCopyRelationshipsGet gets remote copy relationships of the volume belonging to volume group */ func (a *Client) PcloudVolumegroupsRemoteCopyRelationshipsGet(params *PcloudVolumegroupsRemoteCopyRelationshipsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsRemoteCopyRelationshipsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsRemoteCopyRelationshipsGetParams() } @@ -418,17 +457,22 @@ func (a *Client) PcloudVolumegroupsRemoteCopyRelationshipsGet(params *PcloudVolu for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsRemoteCopyRelationshipsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.remoteCopyRelationships.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -437,7 +481,7 @@ func (a *Client) PcloudVolumegroupsRemoteCopyRelationshipsGet(params *PcloudVolu PcloudVolumegroupsStorageDetailsGet gets storage details of volume group */ func (a *Client) PcloudVolumegroupsStorageDetailsGet(params *PcloudVolumegroupsStorageDetailsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsStorageDetailsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumegroupsStorageDetailsGetParams() } @@ -457,17 +501,22 @@ func (a *Client) PcloudVolumegroupsStorageDetailsGet(params *PcloudVolumegroupsS for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumegroupsStorageDetailsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumegroups.storageDetails.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go index 1bef926881..61c4e46925 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsActionPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVolumegroupsActionPostAccepted() @@ -132,7 +133,7 @@ func (o *PcloudVolumegroupsActionPostAccepted) GetPayload() models.Object { func (o *PcloudVolumegroupsActionPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudVolumegroupsActionPostBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudVolumegroupsActionPostUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudVolumegroupsActionPostForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudVolumegroupsActionPostNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudVolumegroupsActionPostUnprocessableEntity) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudVolumegroupsActionPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go index 259bec925b..9d689cec11 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVolumegroupsDeleteAccepted() @@ -126,7 +127,7 @@ func (o *PcloudVolumegroupsDeleteAccepted) GetPayload() models.Object { func (o *PcloudVolumegroupsDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudVolumegroupsDeleteBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudVolumegroupsDeleteUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudVolumegroupsDeleteForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudVolumegroupsDeleteNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudVolumegroupsDeleteInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go index e44337c27d..77fef53980 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsGetDetailsReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsGetDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsGetDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsGetDetailsOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumegroupsGetDetailsOK) readResponse(response runtime.ClientRes o.Payload = new(models.VolumeGroupDetails) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumegroupsGetDetailsBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumegroupsGetDetailsUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumegroupsGetDetailsForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumegroupsGetDetailsNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumegroupsGetDetailsInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go index 38e740724b..d0727fe08f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsGetOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumegroupsGetOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.VolumeGroup) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumegroupsGetBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumegroupsGetUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumegroupsGetForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumegroupsGetNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumegroupsGetInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go index bc076a047a..98f12849f7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsGetallDetailsReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsGetallDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsGetallDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsGetallDetailsOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumegroupsGetallDetailsOK) readResponse(response runtime.Client o.Payload = new(models.VolumeGroupsDetails) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumegroupsGetallDetailsBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumegroupsGetallDetailsUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumegroupsGetallDetailsForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumegroupsGetallDetailsNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumegroupsGetallDetailsInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go index d8b1a7a283..e264993756 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumegroupsGetallOK) readResponse(response runtime.ClientRespons o.Payload = new(models.VolumeGroups) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumegroupsGetallBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumegroupsGetallUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumegroupsGetallForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumegroupsGetallNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumegroupsGetallInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go index 731fc036c9..017b607f06 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVolumegroupsPostAccepted() @@ -152,7 +153,7 @@ func (o *PcloudVolumegroupsPostAccepted) readResponse(response runtime.ClientRes o.Payload = new(models.VolumeGroupCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -222,7 +223,7 @@ func (o *PcloudVolumegroupsPostPartialContent) readResponse(response runtime.Cli o.Payload = new(models.VolumeGroupCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -292,7 +293,7 @@ func (o *PcloudVolumegroupsPostBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -362,7 +363,7 @@ func (o *PcloudVolumegroupsPostUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -432,7 +433,7 @@ func (o *PcloudVolumegroupsPostForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -502,7 +503,7 @@ func (o *PcloudVolumegroupsPostNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -572,7 +573,7 @@ func (o *PcloudVolumegroupsPostConflict) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -642,7 +643,7 @@ func (o *PcloudVolumegroupsPostUnprocessableEntity) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -712,7 +713,7 @@ func (o *PcloudVolumegroupsPostInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -782,7 +783,7 @@ func (o *PcloudVolumegroupsPostGatewayTimeout) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go index 4ed822ba06..194b18a918 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVolumegroupsPutAccepted() @@ -138,7 +139,7 @@ func (o *PcloudVolumegroupsPutAccepted) GetPayload() models.Object { func (o *PcloudVolumegroupsPutAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -208,7 +209,7 @@ func (o *PcloudVolumegroupsPutBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -278,7 +279,7 @@ func (o *PcloudVolumegroupsPutUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -348,7 +349,7 @@ func (o *PcloudVolumegroupsPutForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -418,7 +419,7 @@ func (o *PcloudVolumegroupsPutNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -488,7 +489,7 @@ func (o *PcloudVolumegroupsPutConflict) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -558,7 +559,7 @@ func (o *PcloudVolumegroupsPutUnprocessableEntity) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -628,7 +629,7 @@ func (o *PcloudVolumegroupsPutInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go index 17163b577c..f080841891 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsRemoteCopyRelationshipsGetOK() @@ -134,7 +135,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) readResponse(response r o.Payload = new(models.VolumeGroupRemoteCopyRelationships) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) readResponse(res o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) readRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go index 54136c937b..4863d58651 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_groups import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumegroupsStorageDetailsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumegroupsStorageDetailsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumegroupsStorageDetailsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumegroupsStorageDetailsGetOK() @@ -134,7 +135,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetOK) readResponse(response runtime.Cl o.Payload = new(models.VolumeGroupStorageDetails) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go index 9b7bfb391a..571fc84a66 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go @@ -69,7 +69,7 @@ type ClientService interface { PcloudVolumeOnboardingGet gets the information of volume onboarding operation */ func (a *Client) PcloudVolumeOnboardingGet(params *PcloudVolumeOnboardingGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumeOnboardingGetParams() } @@ -89,17 +89,22 @@ func (a *Client) PcloudVolumeOnboardingGet(params *PcloudVolumeOnboardingGetPara for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumeOnboardingGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volume.onboarding.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -108,7 +113,7 @@ func (a *Client) PcloudVolumeOnboardingGet(params *PcloudVolumeOnboardingGetPara PcloudVolumeOnboardingGetall lists all volume onboardings for this cloud instance */ func (a *Client) PcloudVolumeOnboardingGetall(params *PcloudVolumeOnboardingGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumeOnboardingGetallParams() } @@ -128,17 +133,22 @@ func (a *Client) PcloudVolumeOnboardingGetall(params *PcloudVolumeOnboardingGeta for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumeOnboardingGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volume.onboarding.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -147,7 +157,7 @@ func (a *Client) PcloudVolumeOnboardingGetall(params *PcloudVolumeOnboardingGeta PcloudVolumeOnboardingPost onboards auxiliary volumes to target site */ func (a *Client) PcloudVolumeOnboardingPost(params *PcloudVolumeOnboardingPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumeOnboardingPostParams() } @@ -167,17 +177,22 @@ func (a *Client) PcloudVolumeOnboardingPost(params *PcloudVolumeOnboardingPostPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumeOnboardingPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volume.onboarding.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go index 7f28d3c807..901d6c8f59 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_onboarding import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumeOnboardingGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumeOnboardingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumeOnboardingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumeOnboardingGetOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumeOnboardingGetOK) readResponse(response runtime.ClientRespon o.Payload = new(models.VolumeOnboarding) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumeOnboardingGetBadRequest) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumeOnboardingGetUnauthorized) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumeOnboardingGetForbidden) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumeOnboardingGetNotFound) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumeOnboardingGetInternalServerError) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go index 59968522b5..12b40d2831 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_onboarding import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumeOnboardingGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumeOnboardingGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudVolumeOnboardingGetallOK) readResponse(response runtime.ClientRes o.Payload = new(models.VolumeOnboardings) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudVolumeOnboardingGetallBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudVolumeOnboardingGetallUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudVolumeOnboardingGetallForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudVolumeOnboardingGetallNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudVolumeOnboardingGetallInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go index 801df4b410..09f309918e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volume_onboarding import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumeOnboardingPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumeOnboardingPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumeOnboardingPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudVolumeOnboardingPostAccepted() @@ -134,7 +135,7 @@ func (o *PcloudVolumeOnboardingPostAccepted) readResponse(response runtime.Clien o.Payload = new(models.VolumeOnboardingCreateResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVolumeOnboardingPostBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVolumeOnboardingPostUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVolumeOnboardingPostForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVolumeOnboardingPostNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVolumeOnboardingPostConflict) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVolumeOnboardingPostInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go index 219bd859cd..7528616f05 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go @@ -121,7 +121,7 @@ type ClientService interface { PcloudCloudinstancesVolumesFlashCopyMappingsGet gets a list of flashcopy mappings of a given volume */ func (a *Client) PcloudCloudinstancesVolumesFlashCopyMappingsGet(params *PcloudCloudinstancesVolumesFlashCopyMappingsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesFlashCopyMappingsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesFlashCopyMappingsGetParams() } @@ -141,17 +141,22 @@ func (a *Client) PcloudCloudinstancesVolumesFlashCopyMappingsGet(params *PcloudC for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.FlashCopyMappings.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -160,7 +165,7 @@ func (a *Client) PcloudCloudinstancesVolumesFlashCopyMappingsGet(params *PcloudC PcloudCloudinstancesVolumesActionPost performs an action on a volume */ func (a *Client) PcloudCloudinstancesVolumesActionPost(params *PcloudCloudinstancesVolumesActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesActionPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesActionPostParams() } @@ -180,17 +185,22 @@ func (a *Client) PcloudCloudinstancesVolumesActionPost(params *PcloudCloudinstan for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesActionPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.action.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -199,7 +209,7 @@ func (a *Client) PcloudCloudinstancesVolumesActionPost(params *PcloudCloudinstan PcloudCloudinstancesVolumesDelete deletes a cloud instance volume */ func (a *Client) PcloudCloudinstancesVolumesDelete(params *PcloudCloudinstancesVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesDeleteParams() } @@ -219,17 +229,22 @@ func (a *Client) PcloudCloudinstancesVolumesDelete(params *PcloudCloudinstancesV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -238,7 +253,7 @@ func (a *Client) PcloudCloudinstancesVolumesDelete(params *PcloudCloudinstancesV PcloudCloudinstancesVolumesGet detaileds info of a volume */ func (a *Client) PcloudCloudinstancesVolumesGet(params *PcloudCloudinstancesVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesGetParams() } @@ -258,17 +273,22 @@ func (a *Client) PcloudCloudinstancesVolumesGet(params *PcloudCloudinstancesVolu for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -277,7 +297,7 @@ func (a *Client) PcloudCloudinstancesVolumesGet(params *PcloudCloudinstancesVolu PcloudCloudinstancesVolumesGetall lists all volumes for this cloud instance */ func (a *Client) PcloudCloudinstancesVolumesGetall(params *PcloudCloudinstancesVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesGetallParams() } @@ -297,17 +317,22 @@ func (a *Client) PcloudCloudinstancesVolumesGetall(params *PcloudCloudinstancesV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -316,7 +341,7 @@ func (a *Client) PcloudCloudinstancesVolumesGetall(params *PcloudCloudinstancesV PcloudCloudinstancesVolumesPost creates a new data volume */ func (a *Client) PcloudCloudinstancesVolumesPost(params *PcloudCloudinstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesPostParams() } @@ -336,17 +361,22 @@ func (a *Client) PcloudCloudinstancesVolumesPost(params *PcloudCloudinstancesVol for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -355,7 +385,7 @@ func (a *Client) PcloudCloudinstancesVolumesPost(params *PcloudCloudinstancesVol PcloudCloudinstancesVolumesPut updates a cloud instance volume */ func (a *Client) PcloudCloudinstancesVolumesPut(params *PcloudCloudinstancesVolumesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesPutParams() } @@ -375,17 +405,22 @@ func (a *Client) PcloudCloudinstancesVolumesPut(params *PcloudCloudinstancesVolu for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -394,7 +429,7 @@ func (a *Client) PcloudCloudinstancesVolumesPut(params *PcloudCloudinstancesVolu PcloudCloudinstancesVolumesRemoteCopyRelationshipGet gets remote copy relationship of a volume */ func (a *Client) PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams() } @@ -414,17 +449,22 @@ func (a *Client) PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params *Pc for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.cloudinstances.volumes.remoteCopyRelationship.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -433,7 +473,7 @@ func (a *Client) PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params *Pc PcloudPvminstancesVolumesDelete detaches a volume from a p VM instance */ func (a *Client) PcloudPvminstancesVolumesDelete(params *PcloudPvminstancesVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesDeleteParams() } @@ -453,17 +493,22 @@ func (a *Client) PcloudPvminstancesVolumesDelete(params *PcloudPvminstancesVolum for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -472,7 +517,7 @@ func (a *Client) PcloudPvminstancesVolumesDelete(params *PcloudPvminstancesVolum PcloudPvminstancesVolumesGet detaileds info of a volume attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesGet(params *PcloudPvminstancesVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesGetParams() } @@ -492,17 +537,22 @@ func (a *Client) PcloudPvminstancesVolumesGet(params *PcloudPvminstancesVolumesG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -511,7 +561,7 @@ func (a *Client) PcloudPvminstancesVolumesGet(params *PcloudPvminstancesVolumesG PcloudPvminstancesVolumesGetall lists all volumes attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesGetallParams() } @@ -531,17 +581,22 @@ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolum for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -554,7 +609,7 @@ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolum >**Note**: Recommended for attaching data volumes. In the case of VMRM, it is recommended to use the 'Attach all volumes to a PVM instance' API for attaching the first boot volume. */ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesPostParams() } @@ -574,17 +629,22 @@ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumes for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -593,7 +653,7 @@ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumes PcloudPvminstancesVolumesPut updates a volume attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesPutParams() } @@ -613,17 +673,22 @@ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesP for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -636,7 +701,7 @@ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesP >**Note**: If a non-bootable volume is provided, it will be converted to a bootable volume and then attached. */ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesVolumesSetbootPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesSetbootPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudPvminstancesVolumesSetbootPutParams() } @@ -656,17 +721,22 @@ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudPvminstancesVolumesSetbootPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.pvminstances.volumes.setboot.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -675,7 +745,7 @@ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesV PcloudV2PvminstancesVolumesDelete detaches multiple volumes from a p VM instance */ func (a *Client) PcloudV2PvminstancesVolumesDelete(params *PcloudV2PvminstancesVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesVolumesDeleteAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2PvminstancesVolumesDeleteParams() } @@ -695,17 +765,22 @@ func (a *Client) PcloudV2PvminstancesVolumesDelete(params *PcloudV2PvminstancesV for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2PvminstancesVolumesDeleteAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.pvminstances.volumes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -718,7 +793,7 @@ func (a *Client) PcloudV2PvminstancesVolumesDelete(params *PcloudV2PvminstancesV >**Note**: In the case of VMRM, if a single volume ID is provided in the 'volumeIDs' field, that volume will be converted to a bootable volume and then attached. */ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesVolumesPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2PvminstancesVolumesPostParams() } @@ -738,17 +813,22 @@ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVol for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2PvminstancesVolumesPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.pvminstances.volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -757,7 +837,7 @@ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVol PcloudV2VolumesClonePost creates a volume clone for specified volumes */ func (a *Client) PcloudV2VolumesClonePost(params *PcloudV2VolumesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesClonePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesClonePostParams() } @@ -777,17 +857,22 @@ func (a *Client) PcloudV2VolumesClonePost(params *PcloudV2VolumesClonePostParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumesClonePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumes.clone.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -796,7 +881,7 @@ func (a *Client) PcloudV2VolumesClonePost(params *PcloudV2VolumesClonePostParams PcloudV2VolumesClonetasksGet gets the status of a volumes clone request for the specified clone task ID */ func (a *Client) PcloudV2VolumesClonetasksGet(params *PcloudV2VolumesClonetasksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesClonetasksGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesClonetasksGetParams() } @@ -816,17 +901,22 @@ func (a *Client) PcloudV2VolumesClonetasksGet(params *PcloudV2VolumesClonetasksG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumesClonetasksGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumes.clonetasks.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -835,7 +925,7 @@ func (a *Client) PcloudV2VolumesClonetasksGet(params *PcloudV2VolumesClonetasksG PcloudV2VolumesDelete deletes all volumes */ func (a *Client) PcloudV2VolumesDelete(params *PcloudV2VolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesDeleteAccepted, *PcloudV2VolumesDeletePartialContent, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesDeleteParams() } @@ -855,18 +945,22 @@ func (a *Client) PcloudV2VolumesDelete(params *PcloudV2VolumesDeleteParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *PcloudV2VolumesDeleteAccepted: return value, nil, nil case *PcloudV2VolumesDeletePartialContent: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for p_cloud_volumes: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -875,7 +969,7 @@ func (a *Client) PcloudV2VolumesDelete(params *PcloudV2VolumesDeleteParams, auth PcloudV2VolumesGetall lists specified volumes for this cloud instance */ func (a *Client) PcloudV2VolumesGetall(params *PcloudV2VolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesGetallParams() } @@ -895,17 +989,22 @@ func (a *Client) PcloudV2VolumesGetall(params *PcloudV2VolumesGetallParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumes.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -914,7 +1013,7 @@ func (a *Client) PcloudV2VolumesGetall(params *PcloudV2VolumesGetallParams, auth PcloudV2VolumesPost creates multiple data volumes from a single definition */ func (a *Client) PcloudV2VolumesPost(params *PcloudV2VolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesPostParams() } @@ -934,17 +1033,22 @@ func (a *Client) PcloudV2VolumesPost(params *PcloudV2VolumesPostParams, authInfo for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -955,7 +1059,7 @@ PcloudV2VolumescloneCancelPost cancels a volumes clone request Initiates the cleanup action that performs the cleanup of the preparatory clones and snapshot volumes. */ func (a *Client) PcloudV2VolumescloneCancelPost(params *PcloudV2VolumescloneCancelPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneCancelPostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneCancelPostParams() } @@ -975,17 +1079,22 @@ func (a *Client) PcloudV2VolumescloneCancelPost(params *PcloudV2VolumescloneCanc for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneCancelPostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.cancel.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -994,7 +1103,7 @@ func (a *Client) PcloudV2VolumescloneCancelPost(params *PcloudV2VolumescloneCanc PcloudV2VolumescloneDelete deletes a volumes clone request */ func (a *Client) PcloudV2VolumescloneDelete(params *PcloudV2VolumescloneDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneDeleteParams() } @@ -1014,17 +1123,22 @@ func (a *Client) PcloudV2VolumescloneDelete(params *PcloudV2VolumescloneDeletePa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1035,7 +1149,7 @@ PcloudV2VolumescloneExecutePost initiates the execute action for a volumes clone Execute action creates the cloned volumes using the volume snapshots. */ func (a *Client) PcloudV2VolumescloneExecutePost(params *PcloudV2VolumescloneExecutePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneExecutePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneExecutePostParams() } @@ -1055,17 +1169,22 @@ func (a *Client) PcloudV2VolumescloneExecutePost(params *PcloudV2VolumescloneExe for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneExecutePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.execute.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1074,7 +1193,7 @@ func (a *Client) PcloudV2VolumescloneExecutePost(params *PcloudV2VolumescloneExe PcloudV2VolumescloneGet gets the details for a volumes clone request */ func (a *Client) PcloudV2VolumescloneGet(params *PcloudV2VolumescloneGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneGetParams() } @@ -1094,17 +1213,22 @@ func (a *Client) PcloudV2VolumescloneGet(params *PcloudV2VolumescloneGetParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1113,7 +1237,7 @@ func (a *Client) PcloudV2VolumescloneGet(params *PcloudV2VolumescloneGetParams, PcloudV2VolumescloneGetall gets the list of volumes clone request for a cloud instance */ func (a *Client) PcloudV2VolumescloneGetall(params *PcloudV2VolumescloneGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneGetallParams() } @@ -1133,17 +1257,22 @@ func (a *Client) PcloudV2VolumescloneGetall(params *PcloudV2VolumescloneGetallPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1159,7 +1288,7 @@ Prepare action does the preparatory work for creating the snapshot volumes. >**Note**: If there is an existing prepare, user cannot trigger another prepare for the same set of volumes. Prepare should be followed by start and execute. If existing prepare does not have to be used then it should be first cancelled before the next prepare operation. */ func (a *Client) PcloudV2VolumesclonePost(params *PcloudV2VolumesclonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesclonePostAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumesclonePostParams() } @@ -1179,17 +1308,22 @@ func (a *Client) PcloudV2VolumesclonePost(params *PcloudV2VolumesclonePostParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumesclonePostAccepted) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1200,7 +1334,7 @@ PcloudV2VolumescloneStartPost initiates the start action for a volumes clone req Start action starts the consistency group to initiate the flash copy. */ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStartPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneStartPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudV2VolumescloneStartPostParams() } @@ -1220,17 +1354,22 @@ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStart for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudV2VolumescloneStartPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.v2.volumesclone.start.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1243,7 +1382,7 @@ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStart >*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudVolumesClonePost(params *PcloudVolumesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumesClonePostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewPcloudVolumesClonePostParams() } @@ -1263,17 +1402,22 @@ func (a *Client) PcloudVolumesClonePost(params *PcloudVolumesClonePostParams, au for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*PcloudVolumesClonePostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for pcloud.volumes.clone.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go index 6be188ce32..4f2489cc4e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesActionPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudCloudinstancesVolumesActionPostAccepted() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesVolumesActionPostAccepted) GetPayload() models.Obje func (o *PcloudCloudinstancesVolumesActionPostAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesVolumesActionPostBadRequest) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesVolumesActionPostForbidden) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesVolumesActionPostNotFound) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesVolumesActionPostConflict) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go index 55000c6077..e10fa3cc40 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesDeleteOK() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesVolumesDeleteOK) GetPayload() models.Object { func (o *PcloudCloudinstancesVolumesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesVolumesDeleteBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesVolumesDeleteForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesVolumesDeleteNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesVolumesDeleteGone) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go index 150b2a2cfd..aa5bab2b9f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesFlashCopyMappingsGetOK() @@ -132,7 +133,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) GetPayload() models. func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) readResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) readRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) readResponse( o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) readResponse(r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) rea o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go index 7bbc8dda0b..de5be37b5a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesVolumesGetOK) readResponse(response runtime.ClientR o.Payload = new(models.Volume) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesVolumesGetBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesVolumesGetUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesVolumesGetForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesVolumesGetNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesVolumesGetInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go index 82c90d1ca4..9749ff7253 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudCloudinstancesVolumesGetallOK) readResponse(response runtime.Clie o.Payload = new(models.Volumes) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudCloudinstancesVolumesGetallBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudCloudinstancesVolumesGetallUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudCloudinstancesVolumesGetallForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudCloudinstancesVolumesGetallNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudCloudinstancesVolumesGetallInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index 907ef6189c..bf322ffc3e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudCloudinstancesVolumesPostAccepted() @@ -140,7 +141,7 @@ func (o *PcloudCloudinstancesVolumesPostAccepted) readResponse(response runtime. o.Payload = new(models.Volume) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudCloudinstancesVolumesPostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudCloudinstancesVolumesPostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudCloudinstancesVolumesPostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudCloudinstancesVolumesPostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudCloudinstancesVolumesPostConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudCloudinstancesVolumesPostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go index ae40c474b1..c584dfefa1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesPutOK() @@ -140,7 +141,7 @@ func (o *PcloudCloudinstancesVolumesPutOK) readResponse(response runtime.ClientR o.Payload = new(models.Volume) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudCloudinstancesVolumesPutBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudCloudinstancesVolumesPutUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudCloudinstancesVolumesPutForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudCloudinstancesVolumesPutNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudCloudinstancesVolumesPutConflict) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudCloudinstancesVolumesPutInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go index 4ff6389310..1543888202 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK() @@ -134,7 +135,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) readResponse(re o.Payload = new(models.VolumeRemoteCopyRelationship) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) readRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) readR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) readResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) readRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go index b29535e9f5..159e389bdd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudPvminstancesVolumesDeleteAccepted() @@ -79,7 +80,7 @@ func NewPcloudPvminstancesVolumesDeleteAccepted() *PcloudPvminstancesVolumesDele /* PcloudPvminstancesVolumesDeleteAccepted describes a response with status code 202, with default header values. -OK +Accepted */ type PcloudPvminstancesVolumesDeleteAccepted struct { Payload models.Object @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesVolumesDeleteAccepted) GetPayload() models.Object { func (o *PcloudPvminstancesVolumesDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesVolumesDeleteBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesVolumesDeleteUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesVolumesDeleteForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesVolumesDeleteNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesVolumesDeleteConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesVolumesDeleteInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go index c495c92508..234c36cfc2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVolumesGetOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesVolumesGetOK) readResponse(response runtime.ClientRes o.Payload = new(models.Volume) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesVolumesGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesVolumesGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesVolumesGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesVolumesGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesVolumesGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go index d81c92f572..65904726c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVolumesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudPvminstancesVolumesGetallOK) readResponse(response runtime.Client o.Payload = new(models.Volumes) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudPvminstancesVolumesGetallBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudPvminstancesVolumesGetallUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudPvminstancesVolumesGetallForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudPvminstancesVolumesGetallNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudPvminstancesVolumesGetallInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go index add3acdaf9..702a6c36c1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVolumesPostOK() @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesVolumesPostOK) GetPayload() models.Object { func (o *PcloudPvminstancesVolumesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesVolumesPostBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesVolumesPostUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesVolumesPostForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesVolumesPostNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesVolumesPostConflict) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesVolumesPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go index 15c63425f8..288d200e19 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVolumesPutOK() @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesVolumesPutOK) GetPayload() models.Object { func (o *PcloudPvminstancesVolumesPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesVolumesPutBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesVolumesPutUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesVolumesPutForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesVolumesPutNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesVolumesPutConflict) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesVolumesPutInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go index b05f294527..5c5287ff76 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudPvminstancesVolumesSetbootPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudPvminstancesVolumesSetbootPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudPvminstancesVolumesSetbootPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudPvminstancesVolumesSetbootPutOK() @@ -132,7 +133,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutOK) GetPayload() models.Object { func (o *PcloudPvminstancesVolumesSetbootPutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutForbidden) readResponse(response run o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutNotFound) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutConflict) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) readResponse(re o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go index 21ab22789c..7a772f6cf7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2PvminstancesVolumesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2PvminstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2PvminstancesVolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2PvminstancesVolumesDeleteAccepted() @@ -134,7 +135,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteAccepted) readResponse(response runtim o.Payload = new(models.VolumesDetachmentResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteBadRequest) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteUnauthorized) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteForbidden) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteNotFound) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteConflict) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2PvminstancesVolumesDeleteInternalServerError) readResponse(resp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go index 4ead42953f..7e680e7400 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2PvminstancesVolumesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2PvminstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2PvminstancesVolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2PvminstancesVolumesPostAccepted() @@ -134,7 +135,7 @@ func (o *PcloudV2PvminstancesVolumesPostAccepted) readResponse(response runtime. o.Payload = new(models.VolumesAttachmentResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2PvminstancesVolumesPostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2PvminstancesVolumesPostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2PvminstancesVolumesPostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2PvminstancesVolumesPostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2PvminstancesVolumesPostConflict) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2PvminstancesVolumesPostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index 96c73c807f..eddcd7a3d0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesClonePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2VolumesClonePostAccepted() @@ -134,7 +135,7 @@ func (o *PcloudV2VolumesClonePostAccepted) readResponse(response runtime.ClientR o.Payload = new(models.CloneTaskReference) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2VolumesClonePostBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2VolumesClonePostUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2VolumesClonePostForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2VolumesClonePostNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2VolumesClonePostConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2VolumesClonePostInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go index 1efc53ca78..16d43dc3f6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesClonetasksGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesClonetasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesClonetasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumesClonetasksGetOK() @@ -134,7 +135,7 @@ func (o *PcloudV2VolumesClonetasksGetOK) readResponse(response runtime.ClientRes o.Payload = new(models.CloneTaskStatus) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2VolumesClonetasksGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2VolumesClonetasksGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2VolumesClonetasksGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2VolumesClonetasksGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2VolumesClonetasksGetConflict) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2VolumesClonetasksGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go index 822c9e957b..f766ea00d8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2VolumesDeleteAccepted() @@ -140,7 +141,7 @@ func (o *PcloudV2VolumesDeleteAccepted) readResponse(response runtime.ClientResp o.Payload = new(models.VolumesDeleteResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudV2VolumesDeletePartialContent) readResponse(response runtime.Clie o.Payload = new(models.VolumesDeleteResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudV2VolumesDeleteBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudV2VolumesDeleteUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudV2VolumesDeleteNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudV2VolumesDeleteRequestTimeout) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudV2VolumesDeleteTooManyRequests) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudV2VolumesDeleteInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_getall_responses.go index 8d2120b5cd..785cc8532e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumesGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumesGetallOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.Volumes) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumesGetallBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumesGetallUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumesGetallForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumesGetallNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumesGetallInternalServerError) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index 6febceb288..1b2e4be249 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewPcloudV2VolumesPostCreated() @@ -140,7 +141,7 @@ func (o *PcloudV2VolumesPostCreated) readResponse(response runtime.ClientRespons o.Payload = new(models.Volumes) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *PcloudV2VolumesPostBadRequest) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *PcloudV2VolumesPostUnauthorized) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *PcloudV2VolumesPostForbidden) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *PcloudV2VolumesPostNotFound) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *PcloudV2VolumesPostConflict) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *PcloudV2VolumesPostUnprocessableEntity) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *PcloudV2VolumesPostInternalServerError) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index 0ed0b8061c..1569e873e8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneCancelPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2VolumescloneCancelPostAccepted() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumescloneCancelPostAccepted) readResponse(response runtime.C o.Payload = new(models.VolumesClone) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumescloneCancelPostBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumescloneCancelPostUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumescloneCancelPostForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumescloneCancelPostNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumescloneCancelPostInternalServerError) readResponse(respons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index b5ca513a99..1b527e1655 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumescloneDeleteOK() @@ -126,7 +127,7 @@ func (o *PcloudV2VolumescloneDeleteOK) GetPayload() models.Object { func (o *PcloudV2VolumescloneDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -196,7 +197,7 @@ func (o *PcloudV2VolumescloneDeleteBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -266,7 +267,7 @@ func (o *PcloudV2VolumescloneDeleteUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -336,7 +337,7 @@ func (o *PcloudV2VolumescloneDeleteForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -406,7 +407,7 @@ func (o *PcloudV2VolumescloneDeleteNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -476,7 +477,7 @@ func (o *PcloudV2VolumescloneDeleteInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 0d09798c03..bd34639335 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneExecutePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneExecutePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneExecutePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2VolumescloneExecutePostAccepted() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumescloneExecutePostAccepted) readResponse(response runtime. o.Payload = new(models.VolumesClone) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumescloneExecutePostBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumescloneExecutePostUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumescloneExecutePostForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumescloneExecutePostNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumescloneExecutePostInternalServerError) readResponse(respon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go index 04f093c853..2b2e42619e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumescloneGetOK() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumescloneGetOK) readResponse(response runtime.ClientResponse o.Payload = new(models.VolumesCloneDetail) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumescloneGetBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumescloneGetUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumescloneGetForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumescloneGetNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumescloneGetInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index a7317a2a11..1b6d348d56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumescloneGetallOK() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumescloneGetallOK) readResponse(response runtime.ClientRespo o.Payload = new(models.VolumesClones) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumescloneGetallBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumescloneGetallUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumescloneGetallForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumescloneGetallNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumescloneGetallInternalServerError) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 97ccfd7f95..661321bd0b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumesclonePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 202: result := NewPcloudV2VolumesclonePostAccepted() @@ -134,7 +135,7 @@ func (o *PcloudV2VolumesclonePostAccepted) readResponse(response runtime.ClientR o.Payload = new(models.VolumesClone) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudV2VolumesclonePostBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudV2VolumesclonePostUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudV2VolumesclonePostForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudV2VolumesclonePostNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudV2VolumesclonePostConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudV2VolumesclonePostInternalServerError) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index 1af5ddc5e4..a874d261ce 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudV2VolumescloneStartPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudV2VolumescloneStartPostOK() @@ -128,7 +129,7 @@ func (o *PcloudV2VolumescloneStartPostOK) readResponse(response runtime.ClientRe o.Payload = new(models.VolumesClone) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *PcloudV2VolumescloneStartPostBadRequest) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *PcloudV2VolumescloneStartPostUnauthorized) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *PcloudV2VolumescloneStartPostForbidden) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *PcloudV2VolumescloneStartPostNotFound) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *PcloudV2VolumescloneStartPostInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index bb5b118c85..2de700fcfe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go @@ -7,6 +7,7 @@ package p_cloud_volumes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type PcloudVolumesClonePostReader struct { } // ReadResponse reads a server response into the received o. -func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewPcloudVolumesClonePostOK() @@ -134,7 +135,7 @@ func (o *PcloudVolumesClonePostOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.VolumesCloneResponse) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *PcloudVolumesClonePostBadRequest) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *PcloudVolumesClonePostUnauthorized) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *PcloudVolumesClonePostForbidden) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *PcloudVolumesClonePostNotFound) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *PcloudVolumesClonePostConflict) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *PcloudVolumesClonePostInternalServerError) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/power_edge_router_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/power_edge_router_client.go index 67f3b9c7a9..f6db763607 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/power_edge_router_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/power_edge_router_client.go @@ -65,7 +65,7 @@ type ClientService interface { V1PoweredgerouterActionPost performs a power edge router action migrate start migrate validate on a workspace */ func (a *Client) V1PoweredgerouterActionPost(params *V1PoweredgerouterActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1PoweredgerouterActionPostOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1PoweredgerouterActionPostParams() } @@ -85,17 +85,22 @@ func (a *Client) V1PoweredgerouterActionPost(params *V1PoweredgerouterActionPost for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1PoweredgerouterActionPostOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.poweredgerouter.action.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go index 625910f4cf..2b784462db 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_edge_router/v1_poweredgerouter_action_post_responses.go @@ -7,6 +7,7 @@ package power_edge_router import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1PoweredgerouterActionPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1PoweredgerouterActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1PoweredgerouterActionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1PoweredgerouterActionPostOK() @@ -132,7 +133,7 @@ func (o *V1PoweredgerouterActionPostOK) GetPayload() models.Object { func (o *V1PoweredgerouterActionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1PoweredgerouterActionPostBadRequest) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1PoweredgerouterActionPostUnauthorized) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1PoweredgerouterActionPostForbidden) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1PoweredgerouterActionPostNotFound) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1PoweredgerouterActionPostConflict) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1PoweredgerouterActionPostInternalServerError) readResponse(response r o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go index a637694abf..c0e1829eb9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go @@ -17,6 +17,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms" "github.com/IBM-Cloud/power-go-client/power/client/host_groups" "github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker" + "github.com/IBM-Cloud/power-go-client/power/client/internal_capacity_management" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_dedicated_hosts" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_images" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_network_address_groups" @@ -26,6 +27,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_pvm_instances" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_shared_processor_pools" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_snapshots" + "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_v_p_mem_volumes" "github.com/IBM-Cloud/power-go-client/power/client/internal_operations_volumes" "github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances" "github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations" @@ -57,6 +59,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_mem_volumes" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_virtual_serial_number" @@ -123,6 +126,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.HardwarePlatforms = hardware_platforms.New(transport, formats) cli.HostGroups = host_groups.New(transport, formats) cli.IaasServiceBroker = iaas_service_broker.New(transport, formats) + cli.InternalCapacityManagement = internal_capacity_management.New(transport, formats) cli.InternalOperationsDedicatedHosts = internal_operations_dedicated_hosts.New(transport, formats) cli.InternalOperationsImages = internal_operations_images.New(transport, formats) cli.InternalOperationsNetworkAddressGroups = internal_operations_network_address_groups.New(transport, formats) @@ -132,6 +136,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.InternalOperationsPvmInstances = internal_operations_pvm_instances.New(transport, formats) cli.InternalOperationsSharedProcessorPools = internal_operations_shared_processor_pools.New(transport, formats) cli.InternalOperationsSnapshots = internal_operations_snapshots.New(transport, formats) + cli.InternalOperationsvpMemVolumes = internal_operations_v_p_mem_volumes.New(transport, formats) cli.InternalOperationsVolumes = internal_operations_volumes.New(transport, formats) cli.InternalPowervsInstances = internal_power_v_s_instances.New(transport, formats) cli.InternalPowervsLocations = internal_power_v_s_locations.New(transport, formats) @@ -163,6 +168,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.PCloudTasks = p_cloud_tasks.New(transport, formats) cli.PCloudTenants = p_cloud_tenants.New(transport, formats) cli.PCloudTenantsSSHKeys = p_cloud_tenants_ssh_keys.New(transport, formats) + cli.PCloudvpMemVolumes = p_cloud_v_p_mem_volumes.New(transport, formats) cli.PCloudvpnConnections = p_cloud_v_p_n_connections.New(transport, formats) cli.PCloudvpnPolicies = p_cloud_v_p_n_policies.New(transport, formats) cli.PCloudVirtualSerialNumber = p_cloud_virtual_serial_number.New(transport, formats) @@ -236,6 +242,8 @@ type PowerIaasAPI struct { IaasServiceBroker iaas_service_broker.ClientService + InternalCapacityManagement internal_capacity_management.ClientService + InternalOperationsDedicatedHosts internal_operations_dedicated_hosts.ClientService InternalOperationsImages internal_operations_images.ClientService @@ -254,6 +262,8 @@ type PowerIaasAPI struct { InternalOperationsSnapshots internal_operations_snapshots.ClientService + InternalOperationsvpMemVolumes internal_operations_v_p_mem_volumes.ClientService + InternalOperationsVolumes internal_operations_volumes.ClientService InternalPowervsInstances internal_power_v_s_instances.ClientService @@ -316,6 +326,8 @@ type PowerIaasAPI struct { PCloudTenantsSSHKeys p_cloud_tenants_ssh_keys.ClientService + PCloudvpMemVolumes p_cloud_v_p_mem_volumes.ClientService + PCloudvpnConnections p_cloud_v_p_n_connections.ClientService PCloudvpnPolicies p_cloud_v_p_n_policies.ClientService @@ -359,6 +371,7 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.HardwarePlatforms.SetTransport(transport) c.HostGroups.SetTransport(transport) c.IaasServiceBroker.SetTransport(transport) + c.InternalCapacityManagement.SetTransport(transport) c.InternalOperationsDedicatedHosts.SetTransport(transport) c.InternalOperationsImages.SetTransport(transport) c.InternalOperationsNetworkAddressGroups.SetTransport(transport) @@ -368,6 +381,7 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.InternalOperationsPvmInstances.SetTransport(transport) c.InternalOperationsSharedProcessorPools.SetTransport(transport) c.InternalOperationsSnapshots.SetTransport(transport) + c.InternalOperationsvpMemVolumes.SetTransport(transport) c.InternalOperationsVolumes.SetTransport(transport) c.InternalPowervsInstances.SetTransport(transport) c.InternalPowervsLocations.SetTransport(transport) @@ -399,6 +413,7 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.PCloudTasks.SetTransport(transport) c.PCloudTenants.SetTransport(transport) c.PCloudTenantsSSHKeys.SetTransport(transport) + c.PCloudvpMemVolumes.SetTransport(transport) c.PCloudvpnConnections.SetTransport(transport) c.PCloudvpnPolicies.SetTransport(transport) c.PCloudVirtualSerialNumber.SetTransport(transport) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/routes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/routes_client.go index 946f16df46..9fd4a57894 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/routes_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/routes_client.go @@ -75,7 +75,7 @@ type ClientService interface { V1RoutesDelete deletes a route */ func (a *Client) V1RoutesDelete(params *V1RoutesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesDeleteParams() } @@ -95,17 +95,22 @@ func (a *Client) V1RoutesDelete(params *V1RoutesDeleteParams, authInfo runtime.C for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -114,7 +119,7 @@ func (a *Client) V1RoutesDelete(params *V1RoutesDeleteParams, authInfo runtime.C V1RoutesGet gets a route s information */ func (a *Client) V1RoutesGet(params *V1RoutesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesGetParams() } @@ -134,17 +139,22 @@ func (a *Client) V1RoutesGet(params *V1RoutesGetParams, authInfo runtime.ClientA for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -153,7 +163,7 @@ func (a *Client) V1RoutesGet(params *V1RoutesGetParams, authInfo runtime.ClientA V1RoutesGetall gets all routes in the workspace */ func (a *Client) V1RoutesGetall(params *V1RoutesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesGetallParams() } @@ -173,17 +183,22 @@ func (a *Client) V1RoutesGetall(params *V1RoutesGetallParams, authInfo runtime.C for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -192,7 +207,7 @@ func (a *Client) V1RoutesGetall(params *V1RoutesGetallParams, authInfo runtime.C V1RoutesPost performs a route creation */ func (a *Client) V1RoutesPost(params *V1RoutesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesPostParams() } @@ -212,17 +227,22 @@ func (a *Client) V1RoutesPost(params *V1RoutesPostParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -231,7 +251,7 @@ func (a *Client) V1RoutesPost(params *V1RoutesPostParams, authInfo runtime.Clien V1RoutesPut updates a route s information */ func (a *Client) V1RoutesPut(params *V1RoutesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesPutParams() } @@ -251,17 +271,22 @@ func (a *Client) V1RoutesPut(params *V1RoutesPutParams, authInfo runtime.ClientA for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -270,7 +295,7 @@ func (a *Client) V1RoutesPut(params *V1RoutesPutParams, authInfo runtime.ClientA V1RoutesReportGet gets the route report for a workspace */ func (a *Client) V1RoutesReportGet(params *V1RoutesReportGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1RoutesReportGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1RoutesReportGetParams() } @@ -290,17 +315,22 @@ func (a *Client) V1RoutesReportGet(params *V1RoutesReportGetParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1RoutesReportGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.routes.report.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_delete_responses.go index 6244d6c08e..3ab2a9a5ac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_delete_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1RoutesDeleteOK() @@ -132,7 +133,7 @@ func (o *V1RoutesDeleteOK) GetPayload() models.Object { func (o *V1RoutesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1RoutesDeleteBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1RoutesDeleteUnauthorized) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1RoutesDeleteForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1RoutesDeleteNotFound) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1RoutesDeleteGone) readResponse(response runtime.ClientResponse, consu o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1RoutesDeleteInternalServerError) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_get_responses.go index e09afbbdb0..d3d1c831f0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_get_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1RoutesGetOK() @@ -128,7 +129,7 @@ func (o *V1RoutesGetOK) readResponse(response runtime.ClientResponse, consumer r o.Payload = new(models.Route) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1RoutesGetBadRequest) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1RoutesGetUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1RoutesGetForbidden) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1RoutesGetNotFound) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1RoutesGetInternalServerError) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_getall_responses.go index cf9001c74e..179bb3f20c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_getall_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1RoutesGetallOK() @@ -128,7 +129,7 @@ func (o *V1RoutesGetallOK) readResponse(response runtime.ClientResponse, consume o.Payload = new(models.Routes) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1RoutesGetallBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1RoutesGetallUnauthorized) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1RoutesGetallForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1RoutesGetallNotFound) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1RoutesGetallInternalServerError) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_post_responses.go index 91acfe074f..c7e956376f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_post_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1RoutesPostCreated() @@ -140,7 +141,7 @@ func (o *V1RoutesPostCreated) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Route) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1RoutesPostBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1RoutesPostUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1RoutesPostForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1RoutesPostNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1RoutesPostConflict) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1RoutesPostUnprocessableEntity) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1RoutesPostInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_put_responses.go index 6d1f58a349..bd30b3d8ab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_put_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1RoutesPutOK() @@ -134,7 +135,7 @@ func (o *V1RoutesPutOK) readResponse(response runtime.ClientResponse, consumer r o.Payload = new(models.Route) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1RoutesPutBadRequest) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1RoutesPutUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1RoutesPutForbidden) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1RoutesPutNotFound) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1RoutesPutUnprocessableEntity) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1RoutesPutInternalServerError) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_report_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_report_get_responses.go index 7081aec1c9..f0d51082a5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_report_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/routes/v1_routes_report_get_responses.go @@ -7,6 +7,7 @@ package routes import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1RoutesReportGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1RoutesReportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1RoutesReportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1RoutesReportGetOK() @@ -128,7 +129,7 @@ func (o *V1RoutesReportGetOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.RouteReport) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1RoutesReportGetBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1RoutesReportGetUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1RoutesReportGetForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1RoutesReportGetNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1RoutesReportGetInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go index 6bd01f3cc1..d1040b7b1f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go @@ -7,6 +7,7 @@ package service_bindings import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBindingBindingReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBindingBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBindingBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBindingBindingOK() @@ -146,7 +147,7 @@ func (o *ServiceBindingBindingOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.ServiceBinding) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *ServiceBindingBindingCreated) readResponse(response runtime.ClientRespo o.Payload = new(models.ServiceBinding) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *ServiceBindingBindingAccepted) readResponse(response runtime.ClientResp o.Payload = new(models.AsyncOperation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *ServiceBindingBindingBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *ServiceBindingBindingUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *ServiceBindingBindingForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *ServiceBindingBindingNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *ServiceBindingBindingConflict) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *ServiceBindingBindingUnprocessableEntity) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go index 740dc49652..a180e417ab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go @@ -7,6 +7,7 @@ package service_bindings import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBindingGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBindingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBindingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBindingGetOK() @@ -122,7 +123,7 @@ func (o *ServiceBindingGetOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.ServiceBindingResource) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *ServiceBindingGetBadRequest) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *ServiceBindingGetUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *ServiceBindingGetForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *ServiceBindingGetNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go index 9f0824ba5d..01e5ac47fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go @@ -7,6 +7,7 @@ package service_bindings import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBindingLastOperationGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBindingLastOperationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBindingLastOperationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBindingLastOperationGetOK() @@ -128,7 +129,7 @@ func (o *ServiceBindingLastOperationGetOK) readResponse(response runtime.ClientR o.Payload = new(models.LastOperationResource) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceBindingLastOperationGetBadRequest) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceBindingLastOperationGetUnauthorized) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceBindingLastOperationGetForbidden) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceBindingLastOperationGetNotFound) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceBindingLastOperationGetGone) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go index 2fdaa4f6ce..c2a96c4bcf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go @@ -7,6 +7,7 @@ package service_bindings import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBindingUnbindingReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBindingUnbindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBindingUnbindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBindingUnbindingOK() @@ -132,7 +133,7 @@ func (o *ServiceBindingUnbindingOK) GetPayload() models.Object { func (o *ServiceBindingUnbindingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *ServiceBindingUnbindingAccepted) readResponse(response runtime.ClientRe o.Payload = new(models.AsyncOperation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *ServiceBindingUnbindingBadRequest) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *ServiceBindingUnbindingUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *ServiceBindingUnbindingForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *ServiceBindingUnbindingNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *ServiceBindingUnbindingGone) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go index 7eb11603ef..59b29aa6a9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go @@ -71,7 +71,7 @@ type ClientService interface { ServiceBindingBinding generations of a service binding */ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingBindingOK, *ServiceBindingBindingCreated, *ServiceBindingBindingAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBindingBindingParams() } @@ -91,11 +91,12 @@ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceBindingBindingOK: return value, nil, nil, nil @@ -104,7 +105,10 @@ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, auth case *ServiceBindingBindingAccepted: return nil, nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for service_bindings: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -113,7 +117,7 @@ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, auth ServiceBindingGet gets a service binding */ func (a *Client) ServiceBindingGet(params *ServiceBindingGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBindingGetParams() } @@ -133,17 +137,22 @@ func (a *Client) ServiceBindingGet(params *ServiceBindingGetParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBindingGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBinding.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -152,7 +161,7 @@ func (a *Client) ServiceBindingGet(params *ServiceBindingGetParams, authInfo run ServiceBindingLastOperationGet lasts requested operation state for service binding */ func (a *Client) ServiceBindingLastOperationGet(params *ServiceBindingLastOperationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingLastOperationGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBindingLastOperationGetParams() } @@ -172,17 +181,22 @@ func (a *Client) ServiceBindingLastOperationGet(params *ServiceBindingLastOperat for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBindingLastOperationGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBinding.lastOperation.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -191,7 +205,7 @@ func (a *Client) ServiceBindingLastOperationGet(params *ServiceBindingLastOperat ServiceBindingUnbinding deprovisions of a service binding */ func (a *Client) ServiceBindingUnbinding(params *ServiceBindingUnbindingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingUnbindingOK, *ServiceBindingUnbindingAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBindingUnbindingParams() } @@ -211,18 +225,22 @@ func (a *Client) ServiceBindingUnbinding(params *ServiceBindingUnbindingParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceBindingUnbindingOK: return value, nil, nil case *ServiceBindingUnbindingAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for service_bindings: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go index 83b0ddd224..3afc8332db 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go @@ -7,6 +7,7 @@ package service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceInstanceDeprovisionReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceInstanceDeprovisionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceInstanceDeprovisionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceInstanceDeprovisionOK() @@ -138,7 +139,7 @@ func (o *ServiceInstanceDeprovisionOK) GetPayload() models.Object { func (o *ServiceInstanceDeprovisionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -208,7 +209,7 @@ func (o *ServiceInstanceDeprovisionAccepted) readResponse(response runtime.Clien o.Payload = new(models.AsyncOperation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -278,7 +279,7 @@ func (o *ServiceInstanceDeprovisionBadRequest) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -348,7 +349,7 @@ func (o *ServiceInstanceDeprovisionUnauthorized) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -418,7 +419,7 @@ func (o *ServiceInstanceDeprovisionForbidden) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -488,7 +489,7 @@ func (o *ServiceInstanceDeprovisionNotFound) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -558,7 +559,7 @@ func (o *ServiceInstanceDeprovisionGone) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -628,7 +629,7 @@ func (o *ServiceInstanceDeprovisionUnprocessableEntity) readResponse(response ru o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go index d94ed17c37..1ce7ee66f1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go @@ -7,6 +7,7 @@ package service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceInstanceGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceInstanceGetOK() @@ -122,7 +123,7 @@ func (o *ServiceInstanceGetOK) readResponse(response runtime.ClientResponse, con o.Payload = new(models.ServiceInstanceResource) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *ServiceInstanceGetBadRequest) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *ServiceInstanceGetUnauthorized) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *ServiceInstanceGetForbidden) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *ServiceInstanceGetNotFound) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go index e9a10245b7..1bce0dc2a3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go @@ -7,6 +7,7 @@ package service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceInstanceLastOperationGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceInstanceLastOperationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceInstanceLastOperationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceInstanceLastOperationGetOK() @@ -128,7 +129,7 @@ func (o *ServiceInstanceLastOperationGetOK) readResponse(response runtime.Client o.Payload = new(models.LastOperationResource) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *ServiceInstanceLastOperationGetBadRequest) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *ServiceInstanceLastOperationGetUnauthorized) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *ServiceInstanceLastOperationGetForbidden) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *ServiceInstanceLastOperationGetNotFound) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *ServiceInstanceLastOperationGetGone) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go index 6d82abbf6a..bcad0826ff 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go @@ -7,6 +7,7 @@ package service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceInstanceProvisionReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceInstanceProvisionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceInstanceProvisionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceInstanceProvisionOK() @@ -146,7 +147,7 @@ func (o *ServiceInstanceProvisionOK) readResponse(response runtime.ClientRespons o.Payload = new(models.ServiceInstanceProvision) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -216,7 +217,7 @@ func (o *ServiceInstanceProvisionCreated) readResponse(response runtime.ClientRe o.Payload = new(models.ServiceInstanceProvision) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -286,7 +287,7 @@ func (o *ServiceInstanceProvisionAccepted) readResponse(response runtime.ClientR o.Payload = new(models.ServiceInstanceAsyncOperation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -356,7 +357,7 @@ func (o *ServiceInstanceProvisionBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -426,7 +427,7 @@ func (o *ServiceInstanceProvisionUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -496,7 +497,7 @@ func (o *ServiceInstanceProvisionForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -566,7 +567,7 @@ func (o *ServiceInstanceProvisionNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -636,7 +637,7 @@ func (o *ServiceInstanceProvisionConflict) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -706,7 +707,7 @@ func (o *ServiceInstanceProvisionUnprocessableEntity) readResponse(response runt o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go index 94fcb78286..921f84fd6b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go @@ -7,6 +7,7 @@ package service_instances import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceInstanceUpdateReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceInstanceUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceInstanceUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceInstanceUpdateOK() @@ -134,7 +135,7 @@ func (o *ServiceInstanceUpdateOK) readResponse(response runtime.ClientResponse, o.Payload = new(models.ServiceInstanceUpdate) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *ServiceInstanceUpdateAccepted) readResponse(response runtime.ClientResp o.Payload = new(models.ServiceInstanceAsyncOperation) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *ServiceInstanceUpdateBadRequest) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *ServiceInstanceUpdateUnauthorized) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *ServiceInstanceUpdateForbidden) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *ServiceInstanceUpdateNotFound) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *ServiceInstanceUpdateUnprocessableEntity) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go index 094ce61c0b..3f7070f461 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go @@ -73,7 +73,7 @@ type ClientService interface { ServiceInstanceDeprovision deprovisions a service instance */ func (a *Client) ServiceInstanceDeprovision(params *ServiceInstanceDeprovisionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceDeprovisionOK, *ServiceInstanceDeprovisionAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceInstanceDeprovisionParams() } @@ -93,18 +93,22 @@ func (a *Client) ServiceInstanceDeprovision(params *ServiceInstanceDeprovisionPa for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceInstanceDeprovisionOK: return value, nil, nil case *ServiceInstanceDeprovisionAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for service_instances: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -113,7 +117,7 @@ func (a *Client) ServiceInstanceDeprovision(params *ServiceInstanceDeprovisionPa ServiceInstanceGet gets a service instance */ func (a *Client) ServiceInstanceGet(params *ServiceInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceInstanceGetParams() } @@ -133,17 +137,22 @@ func (a *Client) ServiceInstanceGet(params *ServiceInstanceGetParams, authInfo r for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceInstanceGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceInstance.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -152,7 +161,7 @@ func (a *Client) ServiceInstanceGet(params *ServiceInstanceGetParams, authInfo r ServiceInstanceLastOperationGet lasts requested operation state for service instance */ func (a *Client) ServiceInstanceLastOperationGet(params *ServiceInstanceLastOperationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceLastOperationGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceInstanceLastOperationGetParams() } @@ -172,17 +181,22 @@ func (a *Client) ServiceInstanceLastOperationGet(params *ServiceInstanceLastOper for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceInstanceLastOperationGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceInstance.lastOperation.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -191,7 +205,7 @@ func (a *Client) ServiceInstanceLastOperationGet(params *ServiceInstanceLastOper ServiceInstanceProvision provisions a service instance */ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceProvisionOK, *ServiceInstanceProvisionCreated, *ServiceInstanceProvisionAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceInstanceProvisionParams() } @@ -211,11 +225,12 @@ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceInstanceProvisionOK: return value, nil, nil, nil @@ -224,7 +239,10 @@ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams case *ServiceInstanceProvisionAccepted: return nil, nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for service_instances: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -233,7 +251,7 @@ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams ServiceInstanceUpdate updates a service instance */ func (a *Client) ServiceInstanceUpdate(params *ServiceInstanceUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceUpdateOK, *ServiceInstanceUpdateAccepted, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceInstanceUpdateParams() } @@ -253,18 +271,22 @@ func (a *Client) ServiceInstanceUpdate(params *ServiceInstanceUpdateParams, auth for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, nil, err } + + // several success responses have to be checked switch value := result.(type) { case *ServiceInstanceUpdateOK: return value, nil, nil case *ServiceInstanceUpdateAccepted: return nil, value, nil } - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for service_instances: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/snapshots_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/snapshots_client.go index a486474803..633e5d5aa9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/snapshots_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/snapshots_client.go @@ -77,7 +77,7 @@ The API v1/volume-snapshots has replaced this endpoint. View the usage of a snapshot. The snapshot may take time sync because the data is cached. */ func (a *Client) V1SnapshotsGet(params *V1SnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SnapshotsGetParams() } @@ -97,17 +97,22 @@ func (a *Client) V1SnapshotsGet(params *V1SnapshotsGetParams, authInfo runtime.C for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SnapshotsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.snapshots.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -122,7 +127,7 @@ The API v1/volume-snapshots has replaced this endpoint. View the usage of snapshots on the workspace. The snapshots may take time sync because the data is cached. */ func (a *Client) V1SnapshotsGetall(params *V1SnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SnapshotsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SnapshotsGetallParams() } @@ -142,17 +147,22 @@ func (a *Client) V1SnapshotsGetall(params *V1SnapshotsGetallParams, authInfo run for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SnapshotsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.snapshots.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -163,7 +173,7 @@ V1VolumeSnapshotsGet gets the detail of a volume snapshot View the usage of a snapshot. The snapshot may take time sync because the data is cached. */ func (a *Client) V1VolumeSnapshotsGet(params *V1VolumeSnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1VolumeSnapshotsGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1VolumeSnapshotsGetParams() } @@ -183,17 +193,22 @@ func (a *Client) V1VolumeSnapshotsGet(params *V1VolumeSnapshotsGetParams, authIn for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1VolumeSnapshotsGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.volume-snapshots.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -204,7 +219,7 @@ V1VolumeSnapshotsGetall gets the list of volume snapshots on a workspace View the usage of volume snapshots on the workspace. The volume snapshots may take time sync because the data is cached. */ func (a *Client) V1VolumeSnapshotsGetall(params *V1VolumeSnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1VolumeSnapshotsGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1VolumeSnapshotsGetallParams() } @@ -224,17 +239,22 @@ func (a *Client) V1VolumeSnapshotsGetall(params *V1VolumeSnapshotsGetallParams, for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1VolumeSnapshotsGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.volume-snapshots.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_get_responses.go index ebddf6146e..9940927eab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_get_responses.go @@ -7,6 +7,7 @@ package snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SnapshotsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SnapshotsGetOK() @@ -134,7 +135,7 @@ func (o *V1SnapshotsGetOK) readResponse(response runtime.ClientResponse, consume o.Payload = new(models.SnapshotV1) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1SnapshotsGetBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1SnapshotsGetUnauthorized) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1SnapshotsGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1SnapshotsGetNotFound) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1SnapshotsGetInternalServerError) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1SnapshotsGetServiceUnavailable) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_getall_responses.go index 5c4ebf06db..64b6ca76ba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_snapshots_getall_responses.go @@ -7,6 +7,7 @@ package snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SnapshotsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SnapshotsGetallOK() @@ -128,7 +129,7 @@ func (o *V1SnapshotsGetallOK) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.SnapshotList) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1SnapshotsGetallUnauthorized) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1SnapshotsGetallForbidden) readResponse(response runtime.ClientRespons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1SnapshotsGetallNotFound) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1SnapshotsGetallInternalServerError) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1SnapshotsGetallServiceUnavailable) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_get_responses.go index 4402d278b9..7974a666c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_get_responses.go @@ -7,6 +7,7 @@ package snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1VolumeSnapshotsGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1VolumeSnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1VolumeSnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1VolumeSnapshotsGetOK() @@ -134,7 +135,7 @@ func (o *V1VolumeSnapshotsGetOK) readResponse(response runtime.ClientResponse, c o.Payload = new(models.SnapshotV1) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1VolumeSnapshotsGetBadRequest) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1VolumeSnapshotsGetUnauthorized) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1VolumeSnapshotsGetForbidden) readResponse(response runtime.ClientResp o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1VolumeSnapshotsGetNotFound) readResponse(response runtime.ClientRespo o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1VolumeSnapshotsGetInternalServerError) readResponse(response runtime. o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1VolumeSnapshotsGetServiceUnavailable) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_getall_responses.go index 525835e816..624cb7d714 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/snapshots/v1_volume_snapshots_getall_responses.go @@ -7,6 +7,7 @@ package snapshots import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1VolumeSnapshotsGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1VolumeSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1VolumeSnapshotsGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1VolumeSnapshotsGetallOK() @@ -128,7 +129,7 @@ func (o *V1VolumeSnapshotsGetallOK) readResponse(response runtime.ClientResponse o.Payload = new(models.VolumeSnapshotList) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1VolumeSnapshotsGetallUnauthorized) readResponse(response runtime.Clie o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1VolumeSnapshotsGetallForbidden) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1VolumeSnapshotsGetallNotFound) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1VolumeSnapshotsGetallInternalServerError) readResponse(response runti o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1VolumeSnapshotsGetallServiceUnavailable) readResponse(response runtim o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/ssh_keys_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/ssh_keys_client.go index 66ac214626..9342dac07c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/ssh_keys_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/ssh_keys_client.go @@ -73,7 +73,7 @@ type ClientService interface { V1SshkeysDelete deletes ssh key */ func (a *Client) V1SshkeysDelete(params *V1SshkeysDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SshkeysDeleteOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SshkeysDeleteParams() } @@ -93,17 +93,22 @@ func (a *Client) V1SshkeysDelete(params *V1SshkeysDeleteParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SshkeysDeleteOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.sshkeys.delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -112,7 +117,7 @@ func (a *Client) V1SshkeysDelete(params *V1SshkeysDeleteParams, authInfo runtime V1SshkeysGet gets ssh key information */ func (a *Client) V1SshkeysGet(params *V1SshkeysGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SshkeysGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SshkeysGetParams() } @@ -132,17 +137,22 @@ func (a *Client) V1SshkeysGet(params *V1SshkeysGetParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SshkeysGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.sshkeys.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -151,7 +161,7 @@ func (a *Client) V1SshkeysGet(params *V1SshkeysGetParams, authInfo runtime.Clien V1SshkeysGetall lists SSH keys */ func (a *Client) V1SshkeysGetall(params *V1SshkeysGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SshkeysGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SshkeysGetallParams() } @@ -171,17 +181,22 @@ func (a *Client) V1SshkeysGetall(params *V1SshkeysGetallParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SshkeysGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.sshkeys.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -190,7 +205,7 @@ func (a *Client) V1SshkeysGetall(params *V1SshkeysGetallParams, authInfo runtime V1SshkeysPost adds a new SSH key */ func (a *Client) V1SshkeysPost(params *V1SshkeysPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SshkeysPostCreated, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SshkeysPostParams() } @@ -210,17 +225,22 @@ func (a *Client) V1SshkeysPost(params *V1SshkeysPostParams, authInfo runtime.Cli for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SshkeysPostCreated) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.sshkeys.post: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -229,7 +249,7 @@ func (a *Client) V1SshkeysPost(params *V1SshkeysPostParams, authInfo runtime.Cli V1SshkeysPut updates the ssh key */ func (a *Client) V1SshkeysPut(params *V1SshkeysPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1SshkeysPutOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1SshkeysPutParams() } @@ -249,17 +269,22 @@ func (a *Client) V1SshkeysPut(params *V1SshkeysPutParams, authInfo runtime.Clien for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1SshkeysPutOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.sshkeys.put: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_delete_responses.go index 6832171fe2..3225444f7c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_delete_responses.go @@ -7,6 +7,7 @@ package ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SshkeysDeleteReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SshkeysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SshkeysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SshkeysDeleteOK() @@ -132,7 +133,7 @@ func (o *V1SshkeysDeleteOK) GetPayload() models.Object { func (o *V1SshkeysDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *V1SshkeysDeleteBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *V1SshkeysDeleteUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *V1SshkeysDeleteForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *V1SshkeysDeleteNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *V1SshkeysDeleteGone) readResponse(response runtime.ClientResponse, cons o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *V1SshkeysDeleteInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_get_responses.go index ffa2ff52ee..826aa1fff1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_get_responses.go @@ -7,6 +7,7 @@ package ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SshkeysGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SshkeysGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SshkeysGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SshkeysGetOK() @@ -128,7 +129,7 @@ func (o *V1SshkeysGetOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.WorkspaceSSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1SshkeysGetBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1SshkeysGetUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1SshkeysGetForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1SshkeysGetNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1SshkeysGetInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_getall_responses.go index 17c0243a36..4005777caa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_getall_responses.go @@ -7,6 +7,7 @@ package ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SshkeysGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SshkeysGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SshkeysGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SshkeysGetallOK() @@ -128,7 +129,7 @@ func (o *V1SshkeysGetallOK) readResponse(response runtime.ClientResponse, consum o.Payload = new(models.WorkspaceSSHKeys) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -198,7 +199,7 @@ func (o *V1SshkeysGetallBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -268,7 +269,7 @@ func (o *V1SshkeysGetallUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -338,7 +339,7 @@ func (o *V1SshkeysGetallForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -408,7 +409,7 @@ func (o *V1SshkeysGetallNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -478,7 +479,7 @@ func (o *V1SshkeysGetallInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_post_responses.go index bb0ee95745..97ebfbef34 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_post_responses.go @@ -7,6 +7,7 @@ package ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SshkeysPostReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SshkeysPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SshkeysPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 201: result := NewV1SshkeysPostCreated() @@ -140,7 +141,7 @@ func (o *V1SshkeysPostCreated) readResponse(response runtime.ClientResponse, con o.Payload = new(models.WorkspaceSSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1SshkeysPostBadRequest) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1SshkeysPostUnauthorized) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1SshkeysPostForbidden) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1SshkeysPostNotFound) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1SshkeysPostConflict) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1SshkeysPostUnprocessableEntity) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1SshkeysPostInternalServerError) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_put_responses.go index 10a4c21c4a..eec32bcf6f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/ssh_keys/v1_sshkeys_put_responses.go @@ -7,6 +7,7 @@ package ssh_keys import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1SshkeysPutReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1SshkeysPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1SshkeysPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1SshkeysPutOK() @@ -140,7 +141,7 @@ func (o *V1SshkeysPutOK) readResponse(response runtime.ClientResponse, consumer o.Payload = new(models.WorkspaceSSHKey) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -210,7 +211,7 @@ func (o *V1SshkeysPutBadRequest) readResponse(response runtime.ClientResponse, c o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -280,7 +281,7 @@ func (o *V1SshkeysPutUnauthorized) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -350,7 +351,7 @@ func (o *V1SshkeysPutForbidden) readResponse(response runtime.ClientResponse, co o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -420,7 +421,7 @@ func (o *V1SshkeysPutNotFound) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -490,7 +491,7 @@ func (o *V1SshkeysPutConflict) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -560,7 +561,7 @@ func (o *V1SshkeysPutGone) readResponse(response runtime.ClientResponse, consume o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -630,7 +631,7 @@ func (o *V1SshkeysPutInternalServerError) readResponse(response runtime.ClientRe o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go index d8bd8f2df6..1d246c26f8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go @@ -7,6 +7,7 @@ package storage_types import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerStoragetypesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerStoragetypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerStoragetypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerStoragetypesGetOK() @@ -132,7 +133,7 @@ func (o *ServiceBrokerStoragetypesGetOK) GetPayload() models.StorageTypes { func (o *ServiceBrokerStoragetypesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -202,7 +203,7 @@ func (o *ServiceBrokerStoragetypesGetBadRequest) readResponse(response runtime.C o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -272,7 +273,7 @@ func (o *ServiceBrokerStoragetypesGetUnauthorized) readResponse(response runtime o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -342,7 +343,7 @@ func (o *ServiceBrokerStoragetypesGetForbidden) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -412,7 +413,7 @@ func (o *ServiceBrokerStoragetypesGetNotFound) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -482,7 +483,7 @@ func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -552,7 +553,7 @@ func (o *ServiceBrokerStoragetypesGetInternalServerError) readResponse(response o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go index 51bfe99368..8d0dc6fcef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go @@ -69,7 +69,7 @@ type ClientService interface { >*Note*: Support for this API will be available till 31st October 2023. */ func (a *Client) ServiceBrokerStoragetypesGet(params *ServiceBrokerStoragetypesGetParams, opts ...ClientOption) (*ServiceBrokerStoragetypesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerStoragetypesGetParams() } @@ -88,17 +88,22 @@ func (a *Client) ServiceBrokerStoragetypesGet(params *ServiceBrokerStoragetypesG for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerStoragetypesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.storagetypes.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go index d938fd2fcd..89697907fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go @@ -7,6 +7,7 @@ package swagger_spec import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type ServiceBrokerSwaggerspecReader struct { } // ReadResponse reads a server response into the received o. -func (o *ServiceBrokerSwaggerspecReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *ServiceBrokerSwaggerspecReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewServiceBrokerSwaggerspecOK() @@ -120,7 +121,7 @@ func (o *ServiceBrokerSwaggerspecOK) GetPayload() models.Object { func (o *ServiceBrokerSwaggerspecOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -190,7 +191,7 @@ func (o *ServiceBrokerSwaggerspecBadRequest) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -260,7 +261,7 @@ func (o *ServiceBrokerSwaggerspecUnauthorized) readResponse(response runtime.Cli o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -330,7 +331,7 @@ func (o *ServiceBrokerSwaggerspecForbidden) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -400,7 +401,7 @@ func (o *ServiceBrokerSwaggerspecNotFound) readResponse(response runtime.ClientR o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go index 6ac981083d..eb010206c2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go @@ -65,7 +65,7 @@ type ClientService interface { ServiceBrokerSwaggerspec gets swagger json spec */ func (a *Client) ServiceBrokerSwaggerspec(params *ServiceBrokerSwaggerspecParams, opts ...ClientOption) (*ServiceBrokerSwaggerspecOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewServiceBrokerSwaggerspecParams() } @@ -84,17 +84,22 @@ func (a *Client) ServiceBrokerSwaggerspec(params *ServiceBrokerSwaggerspecParams for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*ServiceBrokerSwaggerspecOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for serviceBroker.swaggerspec: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go index 9a44710f9a..824e7994c1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go @@ -7,6 +7,7 @@ package workspaces import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1WorkspacesGetReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1WorkspacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1WorkspacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1WorkspacesGetOK() @@ -134,7 +135,7 @@ func (o *V1WorkspacesGetOK) readResponse(response runtime.ClientResponse, consum o.Payload = new(models.Workspace) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -204,7 +205,7 @@ func (o *V1WorkspacesGetBadRequest) readResponse(response runtime.ClientResponse o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -274,7 +275,7 @@ func (o *V1WorkspacesGetUnauthorized) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -344,7 +345,7 @@ func (o *V1WorkspacesGetForbidden) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -414,7 +415,7 @@ func (o *V1WorkspacesGetNotFound) readResponse(response runtime.ClientResponse, o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -484,7 +485,7 @@ func (o *V1WorkspacesGetTooManyRequests) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -554,7 +555,7 @@ func (o *V1WorkspacesGetInternalServerError) readResponse(response runtime.Clien o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go index 7e777b8482..126c502f33 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewV1WorkspacesGetallParams creates a new V1WorkspacesGetallParams object, @@ -60,6 +61,13 @@ V1WorkspacesGetallParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type V1WorkspacesGetallParams struct { + + /* TgwByPassEnabled. + + Enable transit gateway bypass for the workspace list (default=false) + */ + TgwByPassEnabled *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -113,6 +121,17 @@ func (o *V1WorkspacesGetallParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithTgwByPassEnabled adds the tgwByPassEnabled to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) WithTgwByPassEnabled(tgwByPassEnabled *bool) *V1WorkspacesGetallParams { + o.SetTgwByPassEnabled(tgwByPassEnabled) + return o +} + +// SetTgwByPassEnabled adds the tgwByPassEnabled to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) SetTgwByPassEnabled(tgwByPassEnabled *bool) { + o.TgwByPassEnabled = tgwByPassEnabled +} + // WriteToRequest writes these params to a swagger request func (o *V1WorkspacesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -121,6 +140,23 @@ func (o *V1WorkspacesGetallParams) WriteToRequest(r runtime.ClientRequest, reg s } var res []error + if o.TgwByPassEnabled != nil { + + // query param tgwByPassEnabled + var qrTgwByPassEnabled bool + + if o.TgwByPassEnabled != nil { + qrTgwByPassEnabled = *o.TgwByPassEnabled + } + qTgwByPassEnabled := swag.FormatBool(qrTgwByPassEnabled) + if qTgwByPassEnabled != "" { + + if err := r.SetQueryParam("tgwByPassEnabled", qTgwByPassEnabled); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go index 1ab245fc29..2a08b56f7b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go @@ -7,6 +7,7 @@ package workspaces import ( "encoding/json" + stderrors "errors" "fmt" "io" @@ -22,7 +23,7 @@ type V1WorkspacesGetallReader struct { } // ReadResponse reads a server response into the received o. -func (o *V1WorkspacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *V1WorkspacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { switch response.Code() { case 200: result := NewV1WorkspacesGetallOK() @@ -122,7 +123,7 @@ func (o *V1WorkspacesGetallOK) readResponse(response runtime.ClientResponse, con o.Payload = new(models.Workspaces) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -192,7 +193,7 @@ func (o *V1WorkspacesGetallUnauthorized) readResponse(response runtime.ClientRes o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -262,7 +263,7 @@ func (o *V1WorkspacesGetallForbidden) readResponse(response runtime.ClientRespon o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -332,7 +333,7 @@ func (o *V1WorkspacesGetallTooManyRequests) readResponse(response runtime.Client o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } @@ -402,7 +403,7 @@ func (o *V1WorkspacesGetallInternalServerError) readResponse(response runtime.Cl o.Payload = new(models.Error) // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go index be7f3e6eed..d8eb73b97f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go @@ -67,7 +67,7 @@ type ClientService interface { V1WorkspacesGet gets a workspace s information and capabilities */ func (a *Client) V1WorkspacesGet(params *V1WorkspacesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1WorkspacesGetParams() } @@ -87,17 +87,22 @@ func (a *Client) V1WorkspacesGet(params *V1WorkspacesGetParams, authInfo runtime for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1WorkspacesGetOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.workspaces.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -106,7 +111,7 @@ func (a *Client) V1WorkspacesGet(params *V1WorkspacesGetParams, authInfo runtime V1WorkspacesGetall gets all workspaces information and capabilities for a tenant */ func (a *Client) V1WorkspacesGetall(params *V1WorkspacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetallOK, error) { - // TODO: Validate the params before sending + // NOTE: parameters are not validated before sending if params == nil { params = NewV1WorkspacesGetallParams() } @@ -126,17 +131,22 @@ func (a *Client) V1WorkspacesGetall(params *V1WorkspacesGetallParams, authInfo r for _, opt := range opts { opt(op) } - result, err := a.transport.Submit(op) if err != nil { return nil, err } + + // only one success response has to be checked success, ok := result.(*V1WorkspacesGetallOK) if ok { return success, nil } - // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + + // unexpected success response. + + // no default response is defined. + // + // safeguard: normally, in the absence of a default response, unknown success responses return an error above: so this is a codegen issue msg := fmt.Sprintf("unexpected success response for v1.workspaces.getall: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go index 1761bf0bb4..4493985fc8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go @@ -14,7 +14,7 @@ import ( "github.com/go-openapi/validate" ) -// AccessConfig (deprecated - replaced by network peer id) +// AccessConfig [DEPRECATED] // Network communication configuration (for satellite locations only) // - `internal-only` - network is only used for internal host communication // - `outbound-only` - network will be capable of egress traffic @@ -53,7 +53,7 @@ const ( ) // for schema -var accessConfigEnum []interface{} +var accessConfigEnum []any func init() { var res []AccessConfig diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go index 8b9f0224cc..acb6955ebc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -49,11 +50,15 @@ func (m *AccessRole) validatePermissions(formats strfmt.Registry) error { if m.Permissions != nil { if err := m.Permissions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("permissions") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("permissions") } + return err } } @@ -80,11 +85,15 @@ func (m *AccessRole) contextValidatePermissions(ctx context.Context, formats str if m.Permissions != nil { if err := m.Permissions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("permissions") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("permissions") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/add_host.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/add_host.go index b4220ea7f9..3820a95da5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/add_host.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/add_host.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -21,6 +22,9 @@ type AddHost struct { // Name of the host chosen by the user // Required: true + // Max Length: 32 + // Min Length: 2 + // Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9_-]{0,30}[A-Za-z0-9])?$ DisplayName *string `json:"displayName"` // System type @@ -59,6 +63,18 @@ func (m *AddHost) validateDisplayName(formats strfmt.Registry) error { return err } + if err := validate.MinLength("displayName", "body", *m.DisplayName, 2); err != nil { + return err + } + + if err := validate.MaxLength("displayName", "body", *m.DisplayName, 32); err != nil { + return err + } + + if err := validate.Pattern("displayName", "body", *m.DisplayName, `^[A-Za-z0-9](?:[A-Za-z0-9_-]{0,30}[A-Za-z0-9])?$`); err != nil { + return err + } + return nil } @@ -77,11 +93,15 @@ func (m *AddHost) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -105,11 +125,15 @@ func (m *AddHost) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *AddHost) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go index 0fd7612651..150691b45e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -60,11 +61,15 @@ func (m *AuxiliaryVolumesForOnboarding) validateAuxiliaryVolumes(formats strfmt. if m.AuxiliaryVolumes[i] != nil { if err := m.AuxiliaryVolumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("auxiliaryVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("auxiliaryVolumes" + "." + strconv.Itoa(i)) } + return err } } @@ -108,11 +113,15 @@ func (m *AuxiliaryVolumesForOnboarding) contextValidateAuxiliaryVolumes(ctx cont } if err := m.AuxiliaryVolumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("auxiliaryVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("auxiliaryVolumes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host.go index db8b23bae1..9110146957 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -49,11 +50,15 @@ func (m *AvailableHost) validateCapacity(formats strfmt.Registry) error { if m.Capacity != nil { if err := m.Capacity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } @@ -84,11 +89,15 @@ func (m *AvailableHost) contextValidateCapacity(ctx context.Context, formats str } if err := m.Capacity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_capacity.go index 0aed652d12..a070840989 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -50,11 +51,15 @@ func (m *AvailableHostCapacity) validateCores(formats strfmt.Registry) error { if m.Cores != nil { if err := m.Cores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -69,11 +74,15 @@ func (m *AvailableHostCapacity) validateMemory(formats strfmt.Registry) error { if m.Memory != nil { if err := m.Memory.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -108,11 +117,15 @@ func (m *AvailableHostCapacity) contextValidateCores(ctx context.Context, format } if err := m.Cores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -129,11 +142,15 @@ func (m *AvailableHostCapacity) contextValidateMemory(ctx context.Context, forma } if err := m.Memory.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_list.go index 17015104d6..0047fee256 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_host_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m AvailableHostList) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_stock_images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_stock_images.go index ba40ca2d33..eaaebc71eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_stock_images.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/available_stock_images.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m AvailableStockImages) Validate(formats strfmt.Registry) error { } if err := m[k].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } @@ -52,11 +57,15 @@ func (m AvailableStockImages) ContextValidate(ctx context.Context, formats strfm for k := range m { if err := m[k].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/capabilities_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/capabilities_details.go index 9f11c20455..099c607bdc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/capabilities_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/capabilities_details.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -54,11 +55,15 @@ func (m *CapabilitiesDetails) validateDisasterRecovery(formats strfmt.Registry) if m.DisasterRecovery != nil { if err := m.DisasterRecovery.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("disasterRecovery") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("disasterRecovery") } + return err } } @@ -74,11 +79,15 @@ func (m *CapabilitiesDetails) validateSupportedSystems(formats strfmt.Registry) if m.SupportedSystems != nil { if err := m.SupportedSystems.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("supportedSystems") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("supportedSystems") } + return err } } @@ -109,11 +118,15 @@ func (m *CapabilitiesDetails) contextValidateDisasterRecovery(ctx context.Contex if m.DisasterRecovery != nil { if err := m.DisasterRecovery.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("disasterRecovery") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("disasterRecovery") } + return err } } @@ -126,11 +139,15 @@ func (m *CapabilitiesDetails) contextValidateSupportedSystems(ctx context.Contex if m.SupportedSystems != nil { if err := m.SupportedSystems.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("supportedSystems") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("supportedSystems") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go index a5091d5ca3..5351d9fb98 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *Catalog) validateServices(formats strfmt.Registry) error { if m.Services[i] != nil { if err := m.Services[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("services" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *Catalog) contextValidateServices(ctx context.Context, formats strfmt.Re } if err := m.Services[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("services" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("services" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go index 1099b76a92..f1cccd7b48 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -71,11 +72,15 @@ func (m *CloneTaskStatus) validateClonedVolumes(formats strfmt.Registry) error { if m.ClonedVolumes[i] != nil { if err := m.ClonedVolumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) } + return err } } @@ -94,7 +99,7 @@ func (m *CloneTaskStatus) validatePercentComplete(formats strfmt.Registry) error return nil } -var cloneTaskStatusTypeStatusPropEnum []interface{} +var cloneTaskStatusTypeStatusPropEnum []any func init() { var res []string @@ -168,11 +173,15 @@ func (m *CloneTaskStatus) contextValidateClonedVolumes(ctx context.Context, form } if err := m.ClonedVolumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go index 0b241dc405..302b15e54b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -54,11 +55,15 @@ func (m *ClonedVolumeDetail) validateClone(formats strfmt.Registry) error { if m.Clone != nil { if err := m.Clone.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clone") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clone") } + return err } } @@ -74,11 +79,15 @@ func (m *ClonedVolumeDetail) validateSource(formats strfmt.Registry) error { if m.Source != nil { if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("source") } + return err } } @@ -109,11 +118,15 @@ func (m *ClonedVolumeDetail) contextValidateClone(ctx context.Context, formats s if m.Clone != nil { if err := m.Clone.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clone") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clone") } + return err } } @@ -126,11 +139,15 @@ func (m *ClonedVolumeDetail) contextValidateSource(ctx context.Context, formats if m.Source != nil { if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("source") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go index 3aa1bdd0d4..f263a74e44 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -143,11 +144,15 @@ func (m *CloudConnection) validateClassic(formats strfmt.Registry) error { if m.Classic != nil { if err := m.Classic.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -234,11 +239,15 @@ func (m *CloudConnection) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -282,11 +291,15 @@ func (m *CloudConnection) validateVpc(formats strfmt.Registry) error { if m.Vpc != nil { if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } @@ -325,11 +338,15 @@ func (m *CloudConnection) contextValidateClassic(ctx context.Context, formats st } if err := m.Classic.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -348,11 +365,15 @@ func (m *CloudConnection) contextValidateNetworks(ctx context.Context, formats s } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -371,11 +392,15 @@ func (m *CloudConnection) contextValidateVpc(ctx context.Context, formats strfmt } if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go index ccae9f01d4..90d6969b85 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -81,11 +82,15 @@ func (m *CloudConnectionCreate) validateClassic(formats strfmt.Registry) error { if m.Classic != nil { if err := m.Classic.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -102,7 +107,7 @@ func (m *CloudConnectionCreate) validateName(formats strfmt.Registry) error { return nil } -var cloudConnectionCreateTypeSpeedPropEnum []interface{} +var cloudConnectionCreateTypeSpeedPropEnum []any func init() { var res []int64 @@ -143,11 +148,15 @@ func (m *CloudConnectionCreate) validateVpc(formats strfmt.Registry) error { if m.Vpc != nil { if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } @@ -182,11 +191,15 @@ func (m *CloudConnectionCreate) contextValidateClassic(ctx context.Context, form } if err := m.Classic.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -203,11 +216,15 @@ func (m *CloudConnectionCreate) contextValidateVpc(ctx context.Context, formats } if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go index 4797f9a416..1125f3dfc1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -94,11 +95,15 @@ func (m *CloudConnectionCreateResponse) validateJobRef(formats strfmt.Registry) if m.JobRef != nil { if err := m.JobRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobRef") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobRef") } + return err } } @@ -134,11 +139,15 @@ func (m *CloudConnectionCreateResponse) contextValidateJobRef(ctx context.Contex } if err := m.JobRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobRef") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobRef") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go index 201be27e5b..579da3bdb3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -46,11 +47,15 @@ func (m *CloudConnectionEndpointClassic) validateGre(formats strfmt.Registry) er if m.Gre != nil { if err := m.Gre.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("gre") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("gre") } + return err } } @@ -81,11 +86,15 @@ func (m *CloudConnectionEndpointClassic) contextValidateGre(ctx context.Context, } if err := m.Gre.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("gre") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("gre") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go index bda835e0c3..6c1d3ca8b7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -46,11 +47,15 @@ func (m *CloudConnectionEndpointClassicUpdate) validateGre(formats strfmt.Regist if m.Gre != nil { if err := m.Gre.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("gre") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("gre") } + return err } } @@ -81,11 +86,15 @@ func (m *CloudConnectionEndpointClassicUpdate) contextValidateGre(ctx context.Co } if err := m.Gre.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("gre") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("gre") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go index c2b158c4ab..dfd82bab8b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *CloudConnectionEndpointVPC) validateVpcs(formats strfmt.Registry) error if m.Vpcs[i] != nil { if err := m.Vpcs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpcs" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *CloudConnectionEndpointVPC) contextValidateVpcs(ctx context.Context, fo } if err := m.Vpcs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpcs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpcs" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go index eedf1a7ac3..c634b5333e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -69,11 +70,15 @@ func (m *CloudConnectionUpdate) validateClassic(formats strfmt.Registry) error { if m.Classic != nil { if err := m.Classic.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -81,7 +86,7 @@ func (m *CloudConnectionUpdate) validateClassic(formats strfmt.Registry) error { return nil } -var cloudConnectionUpdateTypeSpeedPropEnum []interface{} +var cloudConnectionUpdateTypeSpeedPropEnum []any func init() { var res []int64 @@ -121,11 +126,15 @@ func (m *CloudConnectionUpdate) validateVpc(formats strfmt.Registry) error { if m.Vpc != nil { if err := m.Vpc.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } @@ -160,11 +169,15 @@ func (m *CloudConnectionUpdate) contextValidateClassic(ctx context.Context, form } if err := m.Classic.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("classic") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("classic") } + return err } } @@ -181,11 +194,15 @@ func (m *CloudConnectionUpdate) contextValidateVpc(ctx context.Context, formats } if err := m.Vpc.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpc") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpc") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go index 509dc9ce76..2e682afe4f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *CloudConnectionVirtualPrivateClouds) validateVirtualPrivateClouds(forma if m.VirtualPrivateClouds[i] != nil { if err := m.VirtualPrivateClouds[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualPrivateClouds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualPrivateClouds" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *CloudConnectionVirtualPrivateClouds) contextValidateVirtualPrivateCloud } if err := m.VirtualPrivateClouds[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualPrivateClouds" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualPrivateClouds" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go index 337c969024..1fe10cd3a6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *CloudConnections) validateCloudConnections(formats strfmt.Registry) err if m.CloudConnections[i] != nil { if err := m.CloudConnections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *CloudConnections) contextValidateCloudConnections(ctx context.Context, } if err := m.CloudConnections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go index 3bc111b2b5..5bdc82517c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go @@ -39,7 +39,7 @@ func (m *CloudInitialization) Validate(formats strfmt.Registry) error { return nil } -var cloudInitializationTypeVirtualOpticalDevicePropEnum []interface{} +var cloudInitializationTypeVirtualOpticalDevicePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go index 8a66d0a3f5..16f20a0fb2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -149,11 +150,15 @@ func (m *CloudInstance) validateLimits(formats strfmt.Registry) error { if m.Limits != nil { if err := m.Limits.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("limits") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("limits") } + return err } } @@ -192,11 +197,15 @@ func (m *CloudInstance) validatePvmInstances(formats strfmt.Registry) error { if m.PvmInstances[i] != nil { if err := m.PvmInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -232,11 +241,15 @@ func (m *CloudInstance) validateUsage(formats strfmt.Registry) error { if m.Usage != nil { if err := m.Usage.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("usage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("usage") } + return err } } @@ -271,11 +284,15 @@ func (m *CloudInstance) contextValidateLimits(ctx context.Context, formats strfm if m.Limits != nil { if err := m.Limits.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("limits") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("limits") } + return err } } @@ -294,11 +311,15 @@ func (m *CloudInstance) contextValidatePvmInstances(ctx context.Context, formats } if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -313,11 +334,15 @@ func (m *CloudInstance) contextValidateUsage(ctx context.Context, formats strfmt if m.Usage != nil { if err := m.Usage.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("usage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("usage") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go index c9129f3169..dfae399fb8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -133,11 +134,15 @@ func (m *CloudInstanceReference) validateLimits(formats strfmt.Registry) error { if m.Limits != nil { if err := m.Limits.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("limits") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("limits") } + return err } } @@ -182,11 +187,15 @@ func (m *CloudInstanceReference) contextValidateLimits(ctx context.Context, form if m.Limits != nil { if err := m.Limits.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("limits") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("limits") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_shared_images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_shared_images.go new file mode 100644 index 0000000000..d33f4b4932 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_shared_images.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CloudInstanceSharedImages cloud instance shared images +// +// swagger:model CloudInstanceSharedImages +type CloudInstanceSharedImages struct { + + // Allow images from this Cloud Instance to be shared + SharedImages bool `json:"sharedImages,omitempty"` +} + +// Validate validates this cloud instance shared images +func (m *CloudInstanceSharedImages) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this cloud instance shared images based on context it is used +func (m *CloudInstanceSharedImages) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CloudInstanceSharedImages) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CloudInstanceSharedImages) UnmarshalBinary(b []byte) error { + var res CloudInstanceSharedImages + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go index 414ad193d5..fb4a5ba763 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *ConsoleLanguages) validateConsoleLanguages(formats strfmt.Registry) err if m.ConsoleLanguages[i] != nil { if err := m.ConsoleLanguages[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguages" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *ConsoleLanguages) contextValidateConsoleLanguages(ctx context.Context, } if err := m.ConsoleLanguages[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguages" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguages" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/context.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/context.go index 85e1cd011d..fe61dc553e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/context.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/context.go @@ -8,4 +8,4 @@ package models // Context See [Context Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object) for more details. // // swagger:model Context -type Context interface{} +type Context any diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go index 9c83a7b53a..6f043d707b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -115,7 +116,7 @@ func (m *CreateCosImageImportJob) Validate(formats strfmt.Registry) error { return nil } -var createCosImageImportJobTypeBucketAccessPropEnum []interface{} +var createCosImageImportJobTypeBucketAccessPropEnum []any func init() { var res []string @@ -191,11 +192,15 @@ func (m *CreateCosImageImportJob) validateImportDetails(formats strfmt.Registry) if m.ImportDetails != nil { if err := m.ImportDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("importDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("importDetails") } + return err } } @@ -203,7 +208,7 @@ func (m *CreateCosImageImportJob) validateImportDetails(formats strfmt.Registry) return nil } -var createCosImageImportJobTypeOsTypePropEnum []interface{} +var createCosImageImportJobTypeOsTypePropEnum []any func init() { var res []string @@ -267,11 +272,15 @@ func (m *CreateCosImageImportJob) validateStorageAffinity(formats strfmt.Registr if m.StorageAffinity != nil { if err := m.StorageAffinity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -285,11 +294,15 @@ func (m *CreateCosImageImportJob) validateUserTags(formats strfmt.Registry) erro } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -327,11 +340,15 @@ func (m *CreateCosImageImportJob) contextValidateImportDetails(ctx context.Conte } if err := m.ImportDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("importDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("importDetails") } + return err } } @@ -348,11 +365,15 @@ func (m *CreateCosImageImportJob) contextValidateStorageAffinity(ctx context.Con } if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -363,11 +384,15 @@ func (m *CreateCosImageImportJob) contextValidateStorageAffinity(ctx context.Con func (m *CreateCosImageImportJob) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go index aa2aafc2e7..d5f14a2e6f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_data_volume.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -89,7 +90,7 @@ func (m *CreateDataVolume) Validate(formats strfmt.Registry) error { return nil } -var createDataVolumeTypeAffinityPolicyPropEnum []interface{} +var createDataVolumeTypeAffinityPolicyPropEnum []any func init() { var res []string @@ -155,11 +156,15 @@ func (m *CreateDataVolume) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -183,11 +188,15 @@ func (m *CreateDataVolume) ContextValidate(ctx context.Context, formats strfmt.R func (m *CreateDataVolume) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go index 6603970bd0..5863fe35c3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -94,7 +95,7 @@ func (m *CreateImage) Validate(formats strfmt.Registry) error { return nil } -var createImageTypeOsTypePropEnum []interface{} +var createImageTypeOsTypePropEnum []any func init() { var res []string @@ -142,7 +143,7 @@ func (m *CreateImage) validateOsType(formats strfmt.Registry) error { return nil } -var createImageTypeSourcePropEnum []interface{} +var createImageTypeSourcePropEnum []any func init() { var res []string @@ -192,11 +193,15 @@ func (m *CreateImage) validateStorageAffinity(formats strfmt.Registry) error { if m.StorageAffinity != nil { if err := m.StorageAffinity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -210,11 +215,15 @@ func (m *CreateImage) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -248,11 +257,15 @@ func (m *CreateImage) contextValidateStorageAffinity(ctx context.Context, format } if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -263,11 +276,15 @@ func (m *CreateImage) contextValidateStorageAffinity(ctx context.Context, format func (m *CreateImage) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_server_virtual_serial_number.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_server_virtual_serial_number.go index a69712d690..5bbfd42a8a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_server_virtual_serial_number.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_server_virtual_serial_number.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -63,11 +64,15 @@ func (m *CreateServerVirtualSerialNumber) validateSoftwareTier(formats strfmt.Re } if err := m.SoftwareTier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } @@ -95,11 +100,15 @@ func (m *CreateServerVirtualSerialNumber) contextValidateSoftwareTier(ctx contex } if err := m.SoftwareTier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_workspace_ssh_key.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_workspace_ssh_key.go index c717df6dbe..d4605d63fa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_workspace_ssh_key.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_workspace_ssh_key.go @@ -86,7 +86,7 @@ func (m *CreateWorkspaceSSHKey) validateSSHKey(formats strfmt.Registry) error { return nil } -var createWorkspaceSshKeyTypeVisibilityPropEnum []interface{} +var createWorkspaceSshKeyTypeVisibilityPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go index 9721c12b55..8a6a54be54 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -71,11 +72,15 @@ func (m *DHCPServer) validateNetwork(formats strfmt.Registry) error { if m.Network != nil { if err := m.Network.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("network") } + return err } } @@ -111,11 +116,15 @@ func (m *DHCPServer) contextValidateNetwork(ctx context.Context, formats strfmt. if m.Network != nil { if err := m.Network.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("network") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go index fac08ad210..57bd23cada 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -83,11 +84,15 @@ func (m *DHCPServerDetail) validateLeases(formats strfmt.Registry) error { if m.Leases[i] != nil { if err := m.Leases[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("leases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("leases" + "." + strconv.Itoa(i)) } + return err } } @@ -105,11 +110,15 @@ func (m *DHCPServerDetail) validateNetwork(formats strfmt.Registry) error { if m.Network != nil { if err := m.Network.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("network") } + return err } } @@ -155,11 +164,15 @@ func (m *DHCPServerDetail) contextValidateLeases(ctx context.Context, formats st } if err := m.Leases[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("leases" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("leases" + "." + strconv.Itoa(i)) } + return err } } @@ -174,11 +187,15 @@ func (m *DHCPServerDetail) contextValidateNetwork(ctx context.Context, formats s if m.Network != nil { if err := m.Network.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("network") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("network") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go index 4ebec2cc02..463c93405d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m DHCPServers) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m DHCPServers) ContextValidate(ctx context.Context, formats strfmt.Registr } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go index 4dae0a17ed..789286073f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -91,11 +92,15 @@ func (m *Datacenter) validateCapabilitiesDetails(formats strfmt.Registry) error if m.CapabilitiesDetails != nil { if err := m.CapabilitiesDetails.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilitiesDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilitiesDetails") } + return err } } @@ -111,11 +116,15 @@ func (m *Datacenter) validateLocation(formats strfmt.Registry) error { if m.Location != nil { if err := m.Location.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("location") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("location") } + return err } } @@ -123,7 +132,7 @@ func (m *Datacenter) validateLocation(formats strfmt.Registry) error { return nil } -var datacenterTypeStatusPropEnum []interface{} +var datacenterTypeStatusPropEnum []any func init() { var res []string @@ -169,7 +178,7 @@ func (m *Datacenter) validateStatus(formats strfmt.Registry) error { return nil } -var datacenterTypeTypePropEnum []interface{} +var datacenterTypeTypePropEnum []any func init() { var res []string @@ -239,11 +248,15 @@ func (m *Datacenter) contextValidateCapabilitiesDetails(ctx context.Context, for } if err := m.CapabilitiesDetails.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilitiesDetails") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilitiesDetails") } + return err } } @@ -256,11 +269,15 @@ func (m *Datacenter) contextValidateLocation(ctx context.Context, formats strfmt if m.Location != nil { if err := m.Location.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("location") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("location") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go index 9fd22e8fcb..d83da88072 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Datacenters) validateDatacenters(formats strfmt.Registry) error { if m.Datacenters[i] != nil { if err := m.Datacenters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("datacenters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("datacenters" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Datacenters) contextValidateDatacenters(ctx context.Context, formats st } if err := m.Datacenters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("datacenters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("datacenters" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/dead_peer_detection.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/dead_peer_detection.go index 5ec338a856..d1fa8aa204 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/dead_peer_detection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/dead_peer_detection.go @@ -62,7 +62,7 @@ func (m *DeadPeerDetection) Validate(formats strfmt.Registry) error { return nil } -var deadPeerDetectionTypeActionPropEnum []interface{} +var deadPeerDetectionTypeActionPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/deployment_target.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/deployment_target.go index baf2b292a0..65190f6f65 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/deployment_target.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/deployment_target.go @@ -57,7 +57,7 @@ func (m *DeploymentTarget) validateID(formats strfmt.Registry) error { return nil } -var deploymentTargetTypeTypePropEnum []interface{} +var deploymentTargetTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery.go index f3e56e0cc3..695f145728 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -53,11 +54,15 @@ func (m *DisasterRecovery) validateAsynchronousReplication(formats strfmt.Regist if m.AsynchronousReplication != nil { if err := m.AsynchronousReplication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("asynchronousReplication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("asynchronousReplication") } + return err } } @@ -72,11 +77,15 @@ func (m *DisasterRecovery) validateSynchronousReplication(formats strfmt.Registr if m.SynchronousReplication != nil { if err := m.SynchronousReplication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("synchronousReplication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("synchronousReplication") } + return err } } @@ -107,11 +116,15 @@ func (m *DisasterRecovery) contextValidateAsynchronousReplication(ctx context.Co if m.AsynchronousReplication != nil { if err := m.AsynchronousReplication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("asynchronousReplication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("asynchronousReplication") } + return err } } @@ -128,11 +141,15 @@ func (m *DisasterRecovery) contextValidateSynchronousReplication(ctx context.Con } if err := m.SynchronousReplication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("synchronousReplication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("synchronousReplication") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_location.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_location.go index a3e98f9b28..dcdfd1529e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_location.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_location.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -45,11 +46,15 @@ func (m *DisasterRecoveryLocation) validateReplicationSites(formats strfmt.Regis } if err := m.ReplicationSites.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("replicationSites") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("replicationSites") } + return err } @@ -73,11 +78,15 @@ func (m *DisasterRecoveryLocation) ContextValidate(ctx context.Context, formats func (m *DisasterRecoveryLocation) contextValidateReplicationSites(ctx context.Context, formats strfmt.Registry) error { if err := m.ReplicationSites.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("replicationSites") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("replicationSites") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go index ac7f31209d..58ce8fe11f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *DisasterRecoveryLocations) validateDisasterRecoveryLocations(formats st if m.DisasterRecoveryLocations[i] != nil { if err := m.DisasterRecoveryLocations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *DisasterRecoveryLocations) contextValidateDisasterRecoveryLocations(ctx } if err := m.DisasterRecoveryLocations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go index 79d6edec98..403f9aa90b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -38,7 +39,7 @@ type Event struct { Message *string `json:"message"` // Any metadata associated with the event - Metadata interface{} `json:"metadata,omitempty"` + Metadata any `json:"metadata,omitempty"` // Type of resource for this event // Required: true @@ -117,7 +118,7 @@ func (m *Event) validateEventID(formats strfmt.Registry) error { return nil } -var eventTypeLevelPropEnum []interface{} +var eventTypeLevelPropEnum []any func init() { var res []string @@ -213,11 +214,15 @@ func (m *Event) validateUser(formats strfmt.Registry) error { if m.User != nil { if err := m.User.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("user") } + return err } } @@ -248,11 +253,15 @@ func (m *Event) contextValidateUser(ctx context.Context, formats strfmt.Registry } if err := m.User.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("user") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("user") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go index 669909f722..ccb18dae48 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Events) validateEvents(formats strfmt.Registry) error { if m.Events[i] != nil { if err := m.Events[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("events" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Events) contextValidateEvents(ctx context.Context, formats strfmt.Regis } if err := m.Events[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("events" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("events" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go index 70242a7528..b7608ab981 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m FlashCopyMappings) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m FlashCopyMappings) ContextValidate(ctx context.Context, formats strfmt.R } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/get_server_virtual_serial_number.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/get_server_virtual_serial_number.go index 116a64543a..b5b5848880 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/get_server_virtual_serial_number.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/get_server_virtual_serial_number.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -77,11 +78,15 @@ func (m *GetServerVirtualSerialNumber) validateSoftwareTier(formats strfmt.Regis } if err := m.SoftwareTier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } @@ -109,11 +114,15 @@ func (m *GetServerVirtualSerialNumber) contextValidateSoftwareTier(ctx context.C } if err := m.SoftwareTier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go index 0f6592e263..cfd18bc35f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -67,11 +68,15 @@ func (m *HardwarePlatform) validateHostsResources(formats strfmt.Registry) error if m.HostsResources[i] != nil { if err := m.HostsResources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hostsResources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hostsResources" + "." + strconv.Itoa(i)) } + return err } } @@ -106,11 +111,15 @@ func (m *HardwarePlatform) contextValidateHostsResources(ctx context.Context, fo } if err := m.HostsResources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hostsResources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hostsResources" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platforms.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platforms.go index 8e98a5e08e..ea5d89d018 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platforms.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platforms.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m HardwarePlatforms) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_capacity.go index 506c43e5ed..4e2a707687 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -50,11 +51,15 @@ func (m *HostCapacity) validateCores(formats strfmt.Registry) error { if m.Cores != nil { if err := m.Cores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -69,11 +74,15 @@ func (m *HostCapacity) validateMemory(formats strfmt.Registry) error { if m.Memory != nil { if err := m.Memory.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -108,11 +117,15 @@ func (m *HostCapacity) contextValidateCores(ctx context.Context, formats strfmt. } if err := m.Cores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -129,11 +142,15 @@ func (m *HostCapacity) contextValidateMemory(ctx context.Context, formats strfmt } if err := m.Memory.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_create.go index 8c256de80c..aae5fbe124 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -69,11 +70,15 @@ func (m *HostCreate) validateHosts(formats strfmt.Registry) error { if m.Hosts[i] != nil { if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } @@ -108,11 +113,15 @@ func (m *HostCreate) contextValidateHosts(ctx context.Context, formats strfmt.Re } if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group.go index 2effa9326b..92947b1c58 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -27,7 +28,7 @@ type HostGroup struct { // List of hosts Hosts []HostHref `json:"hosts"` - // Host group ID + // Host Group ID ID string `json:"id,omitempty"` // Name of the host group @@ -78,11 +79,15 @@ func (m *HostGroup) validateHosts(formats strfmt.Registry) error { for i := 0; i < len(m.Hosts); i++ { if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } @@ -114,11 +119,15 @@ func (m *HostGroup) contextValidateHosts(ctx context.Context, formats strfmt.Reg } if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_create.go index 48f3e169d5..d11e7a619e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -67,11 +68,15 @@ func (m *HostGroupCreate) validateHosts(formats strfmt.Registry) error { if m.Hosts[i] != nil { if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } @@ -102,11 +107,15 @@ func (m *HostGroupCreate) validateSecondaries(formats strfmt.Registry) error { if m.Secondaries[i] != nil { if err := m.Secondaries[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("secondaries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("secondaries" + "." + strconv.Itoa(i)) } + return err } } @@ -145,11 +154,15 @@ func (m *HostGroupCreate) contextValidateHosts(ctx context.Context, formats strf } if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } @@ -170,11 +183,15 @@ func (m *HostGroupCreate) contextValidateSecondaries(ctx context.Context, format } if err := m.Secondaries[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("secondaries" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("secondaries" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_list.go index 617cb02d51..810dd6cd7b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m HostGroupList) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m HostGroupList) ContextValidate(ctx context.Context, formats strfmt.Regis } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_share_op.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_share_op.go index f90d9d17c3..5fe85ef5f5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_share_op.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_group_share_op.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *HostGroupShareOp) validateAdd(formats strfmt.Registry) error { if m.Add[i] != nil { if err := m.Add[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("add" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("add" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *HostGroupShareOp) contextValidateAdd(ctx context.Context, formats strfm } if err := m.Add[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("add" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("add" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go index 754ed4ad22..59485204d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -79,11 +80,15 @@ func (m *HostInfo) validateCores(formats strfmt.Registry) error { if m.Cores != nil { if err := m.Cores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -117,11 +122,15 @@ func (m *HostInfo) validateMemory(formats strfmt.Registry) error { if m.Memory != nil { if err := m.Memory.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -142,11 +151,15 @@ func (m *HostInfo) validatePvmInstances(formats strfmt.Registry) error { if m.PvmInstances[i] != nil { if err := m.PvmInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -183,11 +196,15 @@ func (m *HostInfo) contextValidateCores(ctx context.Context, formats strfmt.Regi if m.Cores != nil { if err := m.Cores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -200,11 +217,15 @@ func (m *HostInfo) contextValidateMemory(ctx context.Context, formats strfmt.Reg if m.Memory != nil { if err := m.Memory.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -223,11 +244,15 @@ func (m *HostInfo) contextValidatePvmInstances(ctx context.Context, formats strf } if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_list.go index 582de3fd91..fddb1a89c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m HostList) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m HostList) ContextValidate(ctx context.Context, formats strfmt.Registry) } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go index d6c024a612..364ae87554 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -95,11 +96,15 @@ func (m *HostPVMInstance) validateOwner(formats strfmt.Registry) error { if m.Owner != nil { if err := m.Owner.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("owner") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("owner") } + return err } } @@ -162,11 +167,15 @@ func (m *HostPVMInstance) contextValidateOwner(ctx context.Context, formats strf if m.Owner != nil { if err := m.Owner.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("owner") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("owner") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_put.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_put.go index ffb48fbb68..f90f31fb50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_put.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_put.go @@ -21,6 +21,9 @@ type HostPut struct { // Name of the host chosen by the user // Required: true + // Max Length: 32 + // Min Length: 2 + // Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9_-]{0,30}[A-Za-z0-9])?$ DisplayName *string `json:"displayName"` } @@ -44,6 +47,18 @@ func (m *HostPut) validateDisplayName(formats strfmt.Registry) error { return err } + if err := validate.MinLength("displayName", "body", *m.DisplayName, 2); err != nil { + return err + } + + if err := validate.MaxLength("displayName", "body", *m.DisplayName, 32); err != nil { + return err + } + + if err := validate.Pattern("displayName", "body", *m.DisplayName, `^[A-Za-z0-9](?:[A-Za-z0-9_-]{0,30}[A-Za-z0-9])?$`); err != nil { + return err + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go index d8d27199cc..646a4b98e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *IKEPolicies) validateIkePolicies(formats strfmt.Registry) error { if m.IkePolicies[i] != nil { if err := m.IkePolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ikePolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ikePolicies" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *IKEPolicies) contextValidateIkePolicies(ctx context.Context, formats st } if err := m.IkePolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ikePolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ikePolicies" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go index b1464ef19c..1c492e795f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -107,11 +108,15 @@ func (m *IKEPolicy) validateAuthentication(formats strfmt.Registry) error { if m.Authentication != nil { if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } } @@ -119,7 +124,7 @@ func (m *IKEPolicy) validateAuthentication(formats strfmt.Registry) error { return nil } -var iKEPolicyTypeDhGroupPropEnum []interface{} +var iKEPolicyTypeDhGroupPropEnum []any func init() { var res []int64 @@ -153,7 +158,7 @@ func (m *IKEPolicy) validateDhGroup(formats strfmt.Registry) error { return nil } -var iKEPolicyTypeEncryptionPropEnum []interface{} +var iKEPolicyTypeEncryptionPropEnum []any func init() { var res []string @@ -229,11 +234,15 @@ func (m *IKEPolicy) validateKeyLifetime(formats strfmt.Registry) error { if m.KeyLifetime != nil { if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } @@ -250,7 +259,7 @@ func (m *IKEPolicy) validateName(formats strfmt.Registry) error { return nil } -var iKEPolicyTypeVersionPropEnum []interface{} +var iKEPolicyTypeVersionPropEnum []any func init() { var res []int64 @@ -307,11 +316,15 @@ func (m *IKEPolicy) contextValidateAuthentication(ctx context.Context, formats s if m.Authentication != nil { if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } } @@ -324,11 +337,15 @@ func (m *IKEPolicy) contextValidateKeyLifetime(ctx context.Context, formats strf if m.KeyLifetime != nil { if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_authentication.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_authentication.go index 8cdd1e861f..fcbcfec16f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_authentication.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_authentication.go @@ -45,7 +45,7 @@ const ( ) // for schema -var iKEPolicyAuthenticationEnum []interface{} +var iKEPolicyAuthenticationEnum []any func init() { var res []IKEPolicyAuthentication diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go index 0f663cb59a..ab5d8245ef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -101,18 +102,22 @@ func (m *IKEPolicyCreate) validateAuthentication(formats strfmt.Registry) error } if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } return nil } -var iKEPolicyCreateTypeDhGroupPropEnum []interface{} +var iKEPolicyCreateTypeDhGroupPropEnum []any func init() { var res []int64 @@ -146,7 +151,7 @@ func (m *IKEPolicyCreate) validateDhGroup(formats strfmt.Registry) error { return nil } -var iKEPolicyCreateTypeEncryptionPropEnum []interface{} +var iKEPolicyCreateTypeEncryptionPropEnum []any func init() { var res []string @@ -213,11 +218,15 @@ func (m *IKEPolicyCreate) validateKeyLifetime(formats strfmt.Registry) error { if m.KeyLifetime != nil { if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } @@ -251,7 +260,7 @@ func (m *IKEPolicyCreate) validatePresharedKey(formats strfmt.Registry) error { return nil } -var iKEPolicyCreateTypeVersionPropEnum []interface{} +var iKEPolicyCreateTypeVersionPropEnum []any func init() { var res []int64 @@ -310,11 +319,15 @@ func (m *IKEPolicyCreate) contextValidateAuthentication(ctx context.Context, for } if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } @@ -326,11 +339,15 @@ func (m *IKEPolicyCreate) contextValidateKeyLifetime(ctx context.Context, format if m.KeyLifetime != nil { if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go index 2bb87db9cd..0385738cba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -53,7 +54,7 @@ type IKEPolicyUpdate struct { Version int64 `json:"version,omitempty"` // i k e policy update additional properties - IKEPolicyUpdateAdditionalProperties map[string]interface{} `json:"-"` + IKEPolicyUpdateAdditionalProperties map[string]any `json:"-"` } // UnmarshalJSON unmarshals this object with additional properties from JSON @@ -120,9 +121,9 @@ func (m *IKEPolicyUpdate) UnmarshalJSON(data []byte) error { delete(stage2, "version") // stage 3, add additional properties values if len(stage2) > 0 { - result := make(map[string]interface{}) + result := make(map[string]any) for k, v := range stage2 { - var toadd interface{} + var toadd any if err := json.Unmarshal(v, &toadd); err != nil { return err } @@ -263,18 +264,22 @@ func (m *IKEPolicyUpdate) validateAuthentication(formats strfmt.Registry) error } if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } return nil } -var iKEPolicyUpdateTypeDhGroupPropEnum []interface{} +var iKEPolicyUpdateTypeDhGroupPropEnum []any func init() { var res []int64 @@ -307,7 +312,7 @@ func (m *IKEPolicyUpdate) validateDhGroup(formats strfmt.Registry) error { return nil } -var iKEPolicyUpdateTypeEncryptionPropEnum []interface{} +var iKEPolicyUpdateTypeEncryptionPropEnum []any func init() { var res []string @@ -367,11 +372,15 @@ func (m *IKEPolicyUpdate) validateKeyLifetime(formats strfmt.Registry) error { } if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } @@ -394,7 +403,7 @@ func (m *IKEPolicyUpdate) validateName(formats strfmt.Registry) error { return nil } -var iKEPolicyUpdateTypeVersionPropEnum []interface{} +var iKEPolicyUpdateTypeVersionPropEnum []any func init() { var res []int64 @@ -452,11 +461,15 @@ func (m *IKEPolicyUpdate) contextValidateAuthentication(ctx context.Context, for } if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } @@ -470,11 +483,15 @@ func (m *IKEPolicyUpdate) contextValidateKeyLifetime(ctx context.Context, format } if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go index 20bc26d84a..4cd6c9b6ab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -160,11 +161,15 @@ func (m *Image) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -227,11 +232,15 @@ func (m *Image) validateSpecifications(formats strfmt.Registry) error { if m.Specifications != nil { if err := m.Specifications.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("specifications") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("specifications") } + return err } } @@ -264,11 +273,15 @@ func (m *Image) validateTaskref(formats strfmt.Registry) error { if m.Taskref != nil { if err := m.Taskref.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("taskref") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("taskref") } + return err } } @@ -282,11 +295,15 @@ func (m *Image) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -305,11 +322,15 @@ func (m *Image) validateVolumes(formats strfmt.Registry) error { if m.Volumes[i] != nil { if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) } + return err } } @@ -356,11 +377,15 @@ func (m *Image) contextValidateCrn(ctx context.Context, formats strfmt.Registry) } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -376,11 +401,15 @@ func (m *Image) contextValidateSpecifications(ctx context.Context, formats strfm } if err := m.Specifications.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("specifications") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("specifications") } + return err } } @@ -397,11 +426,15 @@ func (m *Image) contextValidateTaskref(ctx context.Context, formats strfmt.Regis } if err := m.Taskref.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("taskref") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("taskref") } + return err } } @@ -412,11 +445,15 @@ func (m *Image) contextValidateTaskref(ctx context.Context, formats strfmt.Regis func (m *Image) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -434,11 +471,15 @@ func (m *Image) contextValidateVolumes(ctx context.Context, formats strfmt.Regis } if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_import_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_import_details.go index 4fc18548a0..068ecc051a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_import_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_import_details.go @@ -58,7 +58,7 @@ func (m *ImageImportDetails) Validate(formats strfmt.Registry) error { return nil } -var imageImportDetailsTypeLicenseTypePropEnum []interface{} +var imageImportDetailsTypeLicenseTypePropEnum []any func init() { var res []string @@ -98,7 +98,7 @@ func (m *ImageImportDetails) validateLicenseType(formats strfmt.Registry) error return nil } -var imageImportDetailsTypeProductPropEnum []interface{} +var imageImportDetailsTypeProductPropEnum []any func init() { var res []string @@ -141,7 +141,7 @@ func (m *ImageImportDetails) validateProduct(formats strfmt.Registry) error { return nil } -var imageImportDetailsTypeVendorPropEnum []interface{} +var imageImportDetailsTypeVendorPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go index 02a984cb10..101e27a5fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -138,11 +139,15 @@ func (m *ImageReference) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -206,11 +211,15 @@ func (m *ImageReference) validateSpecifications(formats strfmt.Registry) error { if m.Specifications != nil { if err := m.Specifications.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("specifications") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("specifications") } + return err } } @@ -270,11 +279,15 @@ func (m *ImageReference) contextValidateCrn(ctx context.Context, formats strfmt. } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -286,11 +299,15 @@ func (m *ImageReference) contextValidateSpecifications(ctx context.Context, form if m.Specifications != nil { if err := m.Specifications.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("specifications") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("specifications") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_specifications.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_specifications.go index 70ec4210d8..4b1f8304b2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_specifications.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_specifications.go @@ -38,6 +38,9 @@ type ImageSpecifications struct { // Operating System OperatingSystem string `json:"operatingSystem,omitempty"` + // Shared Image + Shared *bool `json:"shared,omitempty"` + // Checksum of the source file (imported images only) SourceChecksum string `json:"sourceChecksum,omitempty"` } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go index 7ffa8a6320..579ec8d20e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Images) validateImages(formats strfmt.Registry) error { if m.Images[i] != nil { if err := m.Images[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("images" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("images" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Images) contextValidateImages(ctx context.Context, formats strfmt.Regis } if err := m.Images[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("images" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("images" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/instance_capabilities.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/instance_capabilities.go index 68534bfd42..c181c64a3a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/instance_capabilities.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/instance_capabilities.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -26,11 +27,15 @@ func (m InstanceCapabilities) Validate(formats strfmt.Registry) error { if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_request.go new file mode 100644 index 0000000000..db7a79eba3 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_request.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// InternalCapacityManagementRequest internal capacity management request +// +// swagger:model InternalCapacityManagementRequest +type InternalCapacityManagementRequest struct { + + // The target datacenter + // Required: true + Datacenter *string `json:"datacenter"` + + // Disabling or enabling system provisioning + // Required: true + // Enum: ["disabled","enabled"] + Operation *string `json:"operation"` + + // The system type to be enabled or disabled + // Required: true + SystemType *string `json:"systemType"` +} + +// Validate validates this internal capacity management request +func (m *InternalCapacityManagementRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatacenter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSystemType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InternalCapacityManagementRequest) validateDatacenter(formats strfmt.Registry) error { + + if err := validate.Required("datacenter", "body", m.Datacenter); err != nil { + return err + } + + return nil +} + +var internalCapacityManagementRequestTypeOperationPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["disabled","enabled"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + internalCapacityManagementRequestTypeOperationPropEnum = append(internalCapacityManagementRequestTypeOperationPropEnum, v) + } +} + +const ( + + // InternalCapacityManagementRequestOperationDisabled captures enum value "disabled" + InternalCapacityManagementRequestOperationDisabled string = "disabled" + + // InternalCapacityManagementRequestOperationEnabled captures enum value "enabled" + InternalCapacityManagementRequestOperationEnabled string = "enabled" +) + +// prop value enum +func (m *InternalCapacityManagementRequest) validateOperationEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, internalCapacityManagementRequestTypeOperationPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InternalCapacityManagementRequest) validateOperation(formats strfmt.Registry) error { + + if err := validate.Required("operation", "body", m.Operation); err != nil { + return err + } + + // value enum + if err := m.validateOperationEnum("operation", "body", *m.Operation); err != nil { + return err + } + + return nil +} + +func (m *InternalCapacityManagementRequest) validateSystemType(formats strfmt.Registry) error { + + if err := validate.Required("systemType", "body", m.SystemType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this internal capacity management request based on context it is used +func (m *InternalCapacityManagementRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InternalCapacityManagementRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InternalCapacityManagementRequest) UnmarshalBinary(b []byte) error { + var res InternalCapacityManagementRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_response.go new file mode 100644 index 0000000000..4bcb4b5bf0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_capacity_management_response.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// InternalCapacityManagementResponse internal capacity management response +// +// swagger:model InternalCapacityManagementResponse +type InternalCapacityManagementResponse struct { + + // The number of accounts in the whitelist + Accounts int64 `json:"accounts,omitempty"` + + // List of supported systems + // Required: true + SupportedSystems []string `json:"supportedSystems"` +} + +// Validate validates this internal capacity management response +func (m *InternalCapacityManagementResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSupportedSystems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InternalCapacityManagementResponse) validateSupportedSystems(formats strfmt.Registry) error { + + if err := validate.Required("supportedSystems", "body", m.SupportedSystems); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this internal capacity management response based on context it is used +func (m *InternalCapacityManagementResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InternalCapacityManagementResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InternalCapacityManagementResponse) UnmarshalBinary(b []byte) error { + var res InternalCapacityManagementResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_operations_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_operations_response.go index aec0534183..018905e0c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_operations_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/internal_operations_response.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,11 +43,15 @@ func (m *InternalOperationsResponse) validateCrn(formats strfmt.Registry) error } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -74,11 +79,15 @@ func (m *InternalOperationsResponse) contextValidateCrn(ctx context.Context, for } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_s_e_c_policy_authentication.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_s_e_c_policy_authentication.go index d3f704f02a..f165862a42 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_s_e_c_policy_authentication.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_s_e_c_policy_authentication.go @@ -42,7 +42,7 @@ const ( ) // for schema -var ipSECPolicyAuthenticationEnum []interface{} +var ipSECPolicyAuthenticationEnum []any func init() { var res []IPSECPolicyAuthentication diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go index 062ac0921e..45d138b60f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *IPSecPolicies) validateIPSecPolicies(formats strfmt.Registry) error { if m.IPSecPolicies[i] != nil { if err := m.IPSecPolicies[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipSecPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipSecPolicies" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *IPSecPolicies) contextValidateIPSecPolicies(ctx context.Context, format } if err := m.IPSecPolicies[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipSecPolicies" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipSecPolicies" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go index 67e87daa16..d5243a6d30 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -106,11 +107,15 @@ func (m *IPSecPolicy) validateAuthentication(formats strfmt.Registry) error { if m.Authentication != nil { if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } } @@ -118,7 +123,7 @@ func (m *IPSecPolicy) validateAuthentication(formats strfmt.Registry) error { return nil } -var ipSecPolicyTypeDhGroupPropEnum []interface{} +var ipSecPolicyTypeDhGroupPropEnum []any func init() { var res []int64 @@ -152,7 +157,7 @@ func (m *IPSecPolicy) validateDhGroup(formats strfmt.Registry) error { return nil } -var ipSecPolicyTypeEncryptionPropEnum []interface{} +var ipSecPolicyTypeEncryptionPropEnum []any func init() { var res []string @@ -231,11 +236,15 @@ func (m *IPSecPolicy) validateKeyLifetime(formats strfmt.Registry) error { if m.KeyLifetime != nil { if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } @@ -284,11 +293,15 @@ func (m *IPSecPolicy) contextValidateAuthentication(ctx context.Context, formats if m.Authentication != nil { if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } } @@ -301,11 +314,15 @@ func (m *IPSecPolicy) contextValidateKeyLifetime(ctx context.Context, formats st if m.KeyLifetime != nil { if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go index d64e5945d1..a892859673 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -92,18 +93,22 @@ func (m *IPSecPolicyCreate) validateAuthentication(formats strfmt.Registry) erro } if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } return nil } -var ipSecPolicyCreateTypeDhGroupPropEnum []interface{} +var ipSecPolicyCreateTypeDhGroupPropEnum []any func init() { var res []int64 @@ -137,7 +142,7 @@ func (m *IPSecPolicyCreate) validateDhGroup(formats strfmt.Registry) error { return nil } -var ipSecPolicyCreateTypeEncryptionPropEnum []interface{} +var ipSecPolicyCreateTypeEncryptionPropEnum []any func init() { var res []string @@ -207,11 +212,15 @@ func (m *IPSecPolicyCreate) validateKeyLifetime(formats strfmt.Registry) error { if m.KeyLifetime != nil { if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } @@ -270,11 +279,15 @@ func (m *IPSecPolicyCreate) contextValidateAuthentication(ctx context.Context, f } if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } @@ -286,11 +299,15 @@ func (m *IPSecPolicyCreate) contextValidateKeyLifetime(ctx context.Context, form if m.KeyLifetime != nil { if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go index b795c162c2..1fbc3e5d7e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -49,7 +50,7 @@ type IPSecPolicyUpdate struct { Pfs *bool `json:"pfs,omitempty"` // IP sec policy update additional properties - IPSecPolicyUpdateAdditionalProperties map[string]interface{} `json:"-"` + IPSecPolicyUpdateAdditionalProperties map[string]any `json:"-"` } // UnmarshalJSON unmarshals this object with additional properties from JSON @@ -110,9 +111,9 @@ func (m *IPSecPolicyUpdate) UnmarshalJSON(data []byte) error { delete(stage2, "pfs") // stage 3, add additional properties values if len(stage2) > 0 { - result := make(map[string]interface{}) + result := make(map[string]any) for k, v := range stage2 { - var toadd interface{} + var toadd any if err := json.Unmarshal(v, &toadd); err != nil { return err } @@ -244,18 +245,22 @@ func (m *IPSecPolicyUpdate) validateAuthentication(formats strfmt.Registry) erro } if err := m.Authentication.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } return nil } -var ipSecPolicyUpdateTypeDhGroupPropEnum []interface{} +var ipSecPolicyUpdateTypeDhGroupPropEnum []any func init() { var res []int64 @@ -288,7 +293,7 @@ func (m *IPSecPolicyUpdate) validateDhGroup(formats strfmt.Registry) error { return nil } -var ipSecPolicyUpdateTypeEncryptionPropEnum []interface{} +var ipSecPolicyUpdateTypeEncryptionPropEnum []any func init() { var res []string @@ -351,11 +356,15 @@ func (m *IPSecPolicyUpdate) validateKeyLifetime(formats strfmt.Registry) error { } if err := m.KeyLifetime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } @@ -403,11 +412,15 @@ func (m *IPSecPolicyUpdate) contextValidateAuthentication(ctx context.Context, f } if err := m.Authentication.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("authentication") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("authentication") } + return err } @@ -421,11 +434,15 @@ func (m *IPSecPolicyUpdate) contextValidateKeyLifetime(ctx context.Context, form } if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("keyLifetime") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("keyLifetime") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go index b9a5884115..894d7bc782 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -91,11 +92,15 @@ func (m *Job) validateOperation(formats strfmt.Registry) error { if m.Operation != nil { if err := m.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operation") } + return err } } @@ -111,11 +116,15 @@ func (m *Job) validateStatus(formats strfmt.Registry) error { if m.Status != nil { if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("status") } + return err } } @@ -146,11 +155,15 @@ func (m *Job) contextValidateOperation(ctx context.Context, formats strfmt.Regis if m.Operation != nil { if err := m.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operation") } + return err } } @@ -163,11 +176,15 @@ func (m *Job) contextValidateStatus(ctx context.Context, formats strfmt.Registry if m.Status != nil { if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("status") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go index 983b9d90a6..acb271bf24 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Jobs) validateJobs(formats strfmt.Registry) error { if m.Jobs[i] != nil { if err := m.Jobs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Jobs) contextValidateJobs(ctx context.Context, formats strfmt.Registry) } if err := m.Jobs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/json_schema_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/json_schema_object.go index 9fec438a57..f47965ae10 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/json_schema_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/json_schema_object.go @@ -8,4 +8,4 @@ package models // JSONSchemaObject JSON schema object // // swagger:model JSONSchemaObject -type JSONSchemaObject interface{} +type JSONSchemaObject any diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/last_operation_resource.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/last_operation_resource.go index 10f953b5d7..1bc87ae0cf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/last_operation_resource.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/last_operation_resource.go @@ -24,7 +24,7 @@ type LastOperationResource struct { Description string `json:"description,omitempty"` // extensions - Extensions interface{} `json:"extensions,omitempty"` + Extensions any `json:"extensions,omitempty"` // state // Required: true @@ -46,7 +46,7 @@ func (m *LastOperationResource) Validate(formats strfmt.Registry) error { return nil } -var lastOperationResourceTypeStatePropEnum []interface{} +var lastOperationResourceTypeStatePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/metadata.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/metadata.go index fcebea3ace..06a2e86631 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/metadata.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/metadata.go @@ -8,4 +8,4 @@ package models // Metadata See [Service Metadata Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#service-metadata) for more details. // // swagger:model Metadata -type Metadata interface{} +type Metadata any diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go index 61aaa4f4b0..445df8dbc6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/multi_volumes_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -92,7 +93,7 @@ func (m *MultiVolumesCreate) Validate(formats strfmt.Registry) error { return nil } -var multiVolumesCreateTypeAffinityPolicyPropEnum []interface{} +var multiVolumesCreateTypeAffinityPolicyPropEnum []any func init() { var res []string @@ -158,11 +159,15 @@ func (m *MultiVolumesCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -186,11 +191,15 @@ func (m *MultiVolumesCreate) ContextValidate(ctx context.Context, formats strfmt func (m *MultiVolumesCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go index 788d9681e4..9b1aa79c42 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -39,8 +40,8 @@ type Network struct { // (currently not available) cloud connections this network is attached CloudConnections []*NetworkCloudConnectionsItems0 `json:"cloudConnections,omitempty"` - // The CRN for this resource - Crn string `json:"crn,omitempty"` + // crn + Crn CRN `json:"crn,omitempty"` // DHCP Managed Network DhcpManaged bool `json:"dhcpManaged,omitempty"` @@ -79,7 +80,7 @@ type Network struct { // Required: true NetworkID *string `json:"networkID"` - // Network Peer ID + // [DEPRECATED] Network Peer ID PeerID string `json:"peerID,omitempty"` // Public IP Address Ranges (for pub-vlan networks) @@ -90,8 +91,8 @@ type Network struct { // Enum: ["vlan","pub-vlan","dhcp-vlan"] Type *string `json:"type"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` // VLAN ID // Required: true @@ -122,6 +123,10 @@ func (m *Network) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCrn(formats); err != nil { + res = append(res, err) + } + if err := m.validateDNSServers(formats); err != nil { res = append(res, err) } @@ -158,6 +163,10 @@ func (m *Network) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateVlanID(formats); err != nil { res = append(res, err) } @@ -174,18 +183,22 @@ func (m *Network) validateAccessConfig(formats strfmt.Registry) error { } if err := m.AccessConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("accessConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("accessConfig") } + return err } return nil } -var networkTypeAdvertisePropEnum []interface{} +var networkTypeAdvertisePropEnum []any func init() { var res []string @@ -227,7 +240,7 @@ func (m *Network) validateAdvertise(formats strfmt.Registry) error { return nil } -var networkTypeArpBroadcastPropEnum []interface{} +var networkTypeArpBroadcastPropEnum []any func init() { var res []string @@ -290,11 +303,15 @@ func (m *Network) validateCloudConnections(formats strfmt.Registry) error { if m.CloudConnections[i] != nil { if err := m.CloudConnections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) } + return err } } @@ -304,6 +321,27 @@ func (m *Network) validateCloudConnections(formats strfmt.Registry) error { return nil } +func (m *Network) validateCrn(formats strfmt.Registry) error { + if swag.IsZero(m.Crn) { // not required + return nil + } + + if err := m.Crn.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("crn") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("crn") + } + + return err + } + + return nil +} + func (m *Network) validateDNSServers(formats strfmt.Registry) error { if err := validate.Required("dnsServers", "body", m.DNSServers); err != nil { @@ -321,11 +359,15 @@ func (m *Network) validateIPAddressMetrics(formats strfmt.Registry) error { if m.IPAddressMetrics != nil { if err := m.IPAddressMetrics.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressMetrics") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressMetrics") } + return err } } @@ -346,11 +388,15 @@ func (m *Network) validateIPAddressRanges(formats strfmt.Registry) error { if m.IPAddressRanges[i] != nil { if err := m.IPAddressRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) } + return err } } @@ -392,11 +438,15 @@ func (m *Network) validateNetworkAddressTranslation(formats strfmt.Registry) err if m.NetworkAddressTranslation != nil { if err := m.NetworkAddressTranslation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressTranslation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressTranslation") } + return err } } @@ -425,11 +475,15 @@ func (m *Network) validatePublicIPAddressRanges(formats strfmt.Registry) error { if m.PublicIPAddressRanges[i] != nil { if err := m.PublicIPAddressRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("publicIPAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("publicIPAddressRanges" + "." + strconv.Itoa(i)) } + return err } } @@ -439,7 +493,7 @@ func (m *Network) validatePublicIPAddressRanges(formats strfmt.Registry) error { return nil } -var networkTypeTypePropEnum []interface{} +var networkTypeTypePropEnum []any func init() { var res []string @@ -485,6 +539,27 @@ func (m *Network) validateType(formats strfmt.Registry) error { return nil } +func (m *Network) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + func (m *Network) validateVlanID(formats strfmt.Registry) error { if err := validate.Required("vlanID", "body", m.VlanID); err != nil { @@ -506,6 +581,10 @@ func (m *Network) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateCrn(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateIPAddressMetrics(ctx, formats); err != nil { res = append(res, err) } @@ -522,6 +601,10 @@ func (m *Network) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -535,11 +618,15 @@ func (m *Network) contextValidateAccessConfig(ctx context.Context, formats strfm } if err := m.AccessConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("accessConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("accessConfig") } + return err } @@ -557,11 +644,15 @@ func (m *Network) contextValidateCloudConnections(ctx context.Context, formats s } if err := m.CloudConnections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) } + return err } } @@ -571,16 +662,42 @@ func (m *Network) contextValidateCloudConnections(ctx context.Context, formats s return nil } +func (m *Network) contextValidateCrn(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Crn) { // not required + return nil + } + + if err := m.Crn.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("crn") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("crn") + } + + return err + } + + return nil +} + func (m *Network) contextValidateIPAddressMetrics(ctx context.Context, formats strfmt.Registry) error { if m.IPAddressMetrics != nil { if err := m.IPAddressMetrics.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressMetrics") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressMetrics") } + return err } } @@ -599,11 +716,15 @@ func (m *Network) contextValidateIPAddressRanges(ctx context.Context, formats st } if err := m.IPAddressRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) } + return err } } @@ -622,11 +743,15 @@ func (m *Network) contextValidateNetworkAddressTranslation(ctx context.Context, } if err := m.NetworkAddressTranslation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressTranslation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressTranslation") } + return err } } @@ -645,11 +770,15 @@ func (m *Network) contextValidatePublicIPAddressRanges(ctx context.Context, form } if err := m.PublicIPAddressRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("publicIPAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("publicIPAddressRanges" + "." + strconv.Itoa(i)) } + return err } } @@ -659,6 +788,24 @@ func (m *Network) contextValidatePublicIPAddressRanges(ctx context.Context, form return nil } +func (m *Network) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *Network) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group.go index 6a7d2a9c9b..ab82816d89 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -35,8 +36,8 @@ type NetworkAddressGroup struct { // Required: true Name *string `json:"name"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` } // Validate validates this network address group @@ -59,6 +60,10 @@ func (m *NetworkAddressGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -95,11 +100,15 @@ func (m *NetworkAddressGroup) validateMembers(formats strfmt.Registry) error { if m.Members[i] != nil { if err := m.Members[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("members" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("members" + "." + strconv.Itoa(i)) } + return err } } @@ -118,6 +127,27 @@ func (m *NetworkAddressGroup) validateName(formats strfmt.Registry) error { return nil } +func (m *NetworkAddressGroup) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // ContextValidate validate this network address group based on the context it is used func (m *NetworkAddressGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -126,6 +156,10 @@ func (m *NetworkAddressGroup) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -143,11 +177,15 @@ func (m *NetworkAddressGroup) contextValidateMembers(ctx context.Context, format } if err := m.Members[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("members" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("members" + "." + strconv.Itoa(i)) } + return err } } @@ -157,6 +195,24 @@ func (m *NetworkAddressGroup) contextValidateMembers(ctx context.Context, format return nil } +func (m *NetworkAddressGroup) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *NetworkAddressGroup) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group_create.go index 24a83dfbce..b81edffc04 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_group_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -23,8 +24,8 @@ type NetworkAddressGroupCreate struct { // Required: true Name *string `json:"name"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` } // Validate validates this network address group create @@ -35,6 +36,10 @@ func (m *NetworkAddressGroupCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -50,8 +55,56 @@ func (m *NetworkAddressGroupCreate) validateName(formats strfmt.Registry) error return nil } -// ContextValidate validates this network address group create based on context it is used +func (m *NetworkAddressGroupCreate) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + +// ContextValidate validate this network address group create based on the context it is used func (m *NetworkAddressGroupCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NetworkAddressGroupCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_groups.go index 425077d8e6..8f8c76bc98 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_groups.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *NetworkAddressGroups) validateNetworkAddressGroups(formats strfmt.Regis if m.NetworkAddressGroups[i] != nil { if err := m.NetworkAddressGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *NetworkAddressGroups) contextValidateNetworkAddressGroups(ctx context.C } if err := m.NetworkAddressGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_translation.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_translation.go index cd7eaca7cc..160d19e420 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_translation.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_address_translation.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// NetworkAddressTranslation Contains the Network Address Translation Details +// NetworkAddressTranslation [DEPRECATED] Contains the Network Address Translation Details // // swagger:model NetworkAddressTranslation type NetworkAddressTranslation struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go index cbc689d5d4..8890aa40f1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go @@ -61,7 +61,7 @@ type NetworkCreate struct { // Network Peer information Peer *NetworkCreatePeer `json:"peer,omitempty"` - // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) + // Type of Network - 'vlan' (private network), 'pub-vlan' (public network), 'dhcp-vlan'[DEPRECATED] // Required: true // Enum: ["vlan","pub-vlan","dhcp-vlan"] Type *string `json:"type"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create_peer.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create_peer.go index 09c0e44399..9403bbf884 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create_peer.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create_peer.go @@ -7,21 +7,20 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) -// NetworkCreatePeer network create peer +// NetworkCreatePeer [DEPRECATED] // // swagger:model NetworkCreatePeer type NetworkCreatePeer struct { // ID of the network peer - // Required: true - ID *string `json:"id"` + ID string `json:"id,omitempty"` // network address translation NetworkAddressTranslation *NetworkAddressTranslation `json:"networkAddressTranslation,omitempty"` @@ -34,10 +33,6 @@ type NetworkCreatePeer struct { func (m *NetworkCreatePeer) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - if err := m.validateNetworkAddressTranslation(formats); err != nil { res = append(res, err) } @@ -52,15 +47,6 @@ func (m *NetworkCreatePeer) Validate(formats strfmt.Registry) error { return nil } -func (m *NetworkCreatePeer) validateID(formats strfmt.Registry) error { - - if err := validate.Required("id", "body", m.ID); err != nil { - return err - } - - return nil -} - func (m *NetworkCreatePeer) validateNetworkAddressTranslation(formats strfmt.Registry) error { if swag.IsZero(m.NetworkAddressTranslation) { // not required return nil @@ -68,11 +54,15 @@ func (m *NetworkCreatePeer) validateNetworkAddressTranslation(formats strfmt.Reg if m.NetworkAddressTranslation != nil { if err := m.NetworkAddressTranslation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressTranslation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressTranslation") } + return err } } @@ -86,11 +76,15 @@ func (m *NetworkCreatePeer) validateType(formats strfmt.Registry) error { } if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("type") } + return err } @@ -124,11 +118,15 @@ func (m *NetworkCreatePeer) contextValidateNetworkAddressTranslation(ctx context } if err := m.NetworkAddressTranslation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkAddressTranslation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkAddressTranslation") } + return err } } @@ -143,11 +141,15 @@ func (m *NetworkCreatePeer) contextValidateType(ctx context.Context, formats str } if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("type") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interface.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interface.go index a5bd05ac30..11e8cff298 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interface.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interface.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -52,8 +53,8 @@ type NetworkInterface struct { // Required: true Status *string `json:"status"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` } // Validate validates this network interface @@ -88,6 +89,10 @@ func (m *NetworkInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -119,11 +124,15 @@ func (m *NetworkInterface) validateInstance(formats strfmt.Registry) error { if m.Instance != nil { if err := m.Instance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("instance") } + return err } } @@ -167,6 +176,27 @@ func (m *NetworkInterface) validateStatus(formats strfmt.Registry) error { return nil } +func (m *NetworkInterface) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // ContextValidate validate this network interface based on the context it is used func (m *NetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -175,6 +205,10 @@ func (m *NetworkInterface) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -190,11 +224,15 @@ func (m *NetworkInterface) contextValidateInstance(ctx context.Context, formats } if err := m.Instance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("instance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("instance") } + return err } } @@ -202,6 +240,24 @@ func (m *NetworkInterface) contextValidateInstance(ctx context.Context, formats return nil } +func (m *NetworkInterface) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *NetworkInterface) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interfaces.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interfaces.go index a9ec76a71e..d0843cc3c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interfaces.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_interfaces.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *NetworkInterfaces) validateInterfaces(formats strfmt.Registry) error { if m.Interfaces[i] != nil { if err := m.Interfaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *NetworkInterfaces) contextValidateInterfaces(ctx context.Context, forma } if err := m.Interfaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("interfaces" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer.go index 2ecb668113..a7be4bdeaa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer.go @@ -7,6 +7,9 @@ package models import ( "context" + "encoding/json" + stderrors "errors" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -19,28 +22,136 @@ import ( // swagger:model NetworkPeer type NetworkPeer struct { - // Description of the network peer + // time stamp for create network peer // Required: true - Description *string `json:"description"` + CreationDate *string `json:"creationDate"` - // ID of the network peer + // ASN number at customer network side + // Example: 64512 + // Required: true + CustomerASN *int64 `json:"customerASN"` + + // IP address used for configuring customer network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.2/30 + // Required: true + CustomerCidr *string `json:"customerCidr"` + + // default action for export route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Required: true + // Enum: ["allow","deny"] + DefaultExportRouteFilter *string `json:"defaultExportRouteFilter"` + + // default action for import route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Required: true + // Enum: ["allow","deny"] + DefaultImportRouteFilter *string `json:"defaultImportRouteFilter"` + + // error description + // Required: true + Error *string `json:"error"` + + // List of export route filters + // Required: true + ExportRouteFilters []*RouteFilter `json:"exportRouteFilters"` + + // ASN number at IBM PowerVS side + // Example: 64512 + // Required: true + IbmASN *int64 `json:"ibmASN"` + + // IP address used for configuring IBM network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.1/30 + // Required: true + IbmCidr *string `json:"ibmCidr"` + + // network peer id + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 // Required: true ID *string `json:"id"` - // Name of the network peer + // List of import route filters + // Required: true + ImportRouteFilters []*RouteFilter `json:"importRouteFilters"` + + // user defined name + // Example: newPeerNetwork // Required: true Name *string `json:"name"` - // type + // peer interface id. use API '/v1/network-peers/interfaces' to get a list of valid peer interface id + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 // Required: true - Type *NetworkPeerType `json:"type"` + PeerInterfaceID *string `json:"peerInterfaceID"` + + // status of the network peer + // Example: active + // Required: true + // Enum: ["active","configuring","removing","error","updating"] + State *string `json:"state"` + + // type of the peer network + // * dcnetwork_bgp: broader gateway protocol is used to share routes between two autonomous network + // + // Example: dcnetwork_bgp + // Required: true + // Enum: ["dcnetwork_bgp"] + Type *string `json:"type"` + + // time stamp for update network peer + // Required: true + UpdatedDate *string `json:"updatedDate"` + + // A vlan configured at the customer network. + // Example: 2000 + // Required: true + Vlan *int64 `json:"vlan"` } // Validate validates this network peer func (m *NetworkPeer) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateDescription(formats); err != nil { + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCustomerASN(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCustomerCidr(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultExportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultImportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateError(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExportRouteFilters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIbmASN(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIbmCidr(formats); err != nil { res = append(res, err) } @@ -48,23 +159,205 @@ func (m *NetworkPeer) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateImportRouteFilters(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } + if err := m.validatePeerInterfaceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } + if err := m.validateUpdatedDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVlan(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } -func (m *NetworkPeer) validateDescription(formats strfmt.Registry) error { +func (m *NetworkPeer) validateCreationDate(formats strfmt.Registry) error { - if err := validate.Required("description", "body", m.Description); err != nil { + if err := validate.Required("creationDate", "body", m.CreationDate); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateCustomerASN(formats strfmt.Registry) error { + + if err := validate.Required("customerASN", "body", m.CustomerASN); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateCustomerCidr(formats strfmt.Registry) error { + + if err := validate.Required("customerCidr", "body", m.CustomerCidr); err != nil { + return err + } + + return nil +} + +var networkPeerTypeDefaultExportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerTypeDefaultExportRouteFilterPropEnum = append(networkPeerTypeDefaultExportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerDefaultExportRouteFilterAllow captures enum value "allow" + NetworkPeerDefaultExportRouteFilterAllow string = "allow" + + // NetworkPeerDefaultExportRouteFilterDeny captures enum value "deny" + NetworkPeerDefaultExportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeer) validateDefaultExportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerTypeDefaultExportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeer) validateDefaultExportRouteFilter(formats strfmt.Registry) error { + + if err := validate.Required("defaultExportRouteFilter", "body", m.DefaultExportRouteFilter); err != nil { + return err + } + + // value enum + if err := m.validateDefaultExportRouteFilterEnum("defaultExportRouteFilter", "body", *m.DefaultExportRouteFilter); err != nil { + return err + } + + return nil +} + +var networkPeerTypeDefaultImportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerTypeDefaultImportRouteFilterPropEnum = append(networkPeerTypeDefaultImportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerDefaultImportRouteFilterAllow captures enum value "allow" + NetworkPeerDefaultImportRouteFilterAllow string = "allow" + + // NetworkPeerDefaultImportRouteFilterDeny captures enum value "deny" + NetworkPeerDefaultImportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeer) validateDefaultImportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerTypeDefaultImportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeer) validateDefaultImportRouteFilter(formats strfmt.Registry) error { + + if err := validate.Required("defaultImportRouteFilter", "body", m.DefaultImportRouteFilter); err != nil { + return err + } + + // value enum + if err := m.validateDefaultImportRouteFilterEnum("defaultImportRouteFilter", "body", *m.DefaultImportRouteFilter); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateError(formats strfmt.Registry) error { + + if err := validate.Required("error", "body", m.Error); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateExportRouteFilters(formats strfmt.Registry) error { + + if err := validate.Required("exportRouteFilters", "body", m.ExportRouteFilters); err != nil { + return err + } + + for i := 0; i < len(m.ExportRouteFilters); i++ { + if swag.IsZero(m.ExportRouteFilters[i]) { // not required + continue + } + + if m.ExportRouteFilters[i] != nil { + if err := m.ExportRouteFilters[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("exportRouteFilters" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("exportRouteFilters" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *NetworkPeer) validateIbmASN(formats strfmt.Registry) error { + + if err := validate.Required("ibmASN", "body", m.IbmASN); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateIbmCidr(formats strfmt.Registry) error { + + if err := validate.Required("ibmCidr", "body", m.IbmCidr); err != nil { return err } @@ -80,6 +373,37 @@ func (m *NetworkPeer) validateID(formats strfmt.Registry) error { return nil } +func (m *NetworkPeer) validateImportRouteFilters(formats strfmt.Registry) error { + + if err := validate.Required("importRouteFilters", "body", m.ImportRouteFilters); err != nil { + return err + } + + for i := 0; i < len(m.ImportRouteFilters); i++ { + if swag.IsZero(m.ImportRouteFilters[i]) { // not required + continue + } + + if m.ImportRouteFilters[i] != nil { + if err := m.ImportRouteFilters[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("importRouteFilters" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("importRouteFilters" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + func (m *NetworkPeer) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -89,25 +413,120 @@ func (m *NetworkPeer) validateName(formats strfmt.Registry) error { return nil } +func (m *NetworkPeer) validatePeerInterfaceID(formats strfmt.Registry) error { + + if err := validate.Required("peerInterfaceID", "body", m.PeerInterfaceID); err != nil { + return err + } + + return nil +} + +var networkPeerTypeStatePropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","configuring","removing","error","updating"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerTypeStatePropEnum = append(networkPeerTypeStatePropEnum, v) + } +} + +const ( + + // NetworkPeerStateActive captures enum value "active" + NetworkPeerStateActive string = "active" + + // NetworkPeerStateConfiguring captures enum value "configuring" + NetworkPeerStateConfiguring string = "configuring" + + // NetworkPeerStateRemoving captures enum value "removing" + NetworkPeerStateRemoving string = "removing" + + // NetworkPeerStateError captures enum value "error" + NetworkPeerStateError string = "error" + + // NetworkPeerStateUpdating captures enum value "updating" + NetworkPeerStateUpdating string = "updating" +) + +// prop value enum +func (m *NetworkPeer) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeer) validateState(formats strfmt.Registry) error { + + if err := validate.Required("state", "body", m.State); err != nil { + return err + } + + // value enum + if err := m.validateStateEnum("state", "body", *m.State); err != nil { + return err + } + + return nil +} + +var networkPeerTypeTypePropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dcnetwork_bgp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerTypeTypePropEnum = append(networkPeerTypeTypePropEnum, v) + } +} + +const ( + + // NetworkPeerTypeDcnetworkBgp captures enum value "dcnetwork_bgp" + NetworkPeerTypeDcnetworkBgp string = "dcnetwork_bgp" +) + +// prop value enum +func (m *NetworkPeer) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + func (m *NetworkPeer) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { return err } - if err := validate.Required("type", "body", m.Type); err != nil { + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { return err } - if m.Type != nil { - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") - } - return err - } + return nil +} + +func (m *NetworkPeer) validateUpdatedDate(formats strfmt.Registry) error { + + if err := validate.Required("updatedDate", "body", m.UpdatedDate); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeer) validateVlan(formats strfmt.Registry) error { + + if err := validate.Required("vlan", "body", m.Vlan); err != nil { + return err } return nil @@ -117,7 +536,11 @@ func (m *NetworkPeer) validateType(formats strfmt.Registry) error { func (m *NetworkPeer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateType(ctx, formats); err != nil { + if err := m.contextValidateExportRouteFilters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateImportRouteFilters(ctx, formats); err != nil { res = append(res, err) } @@ -127,18 +550,59 @@ func (m *NetworkPeer) ContextValidate(ctx context.Context, formats strfmt.Regist return nil } -func (m *NetworkPeer) contextValidateType(ctx context.Context, formats strfmt.Registry) error { +func (m *NetworkPeer) contextValidateExportRouteFilters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ExportRouteFilters); i++ { + + if m.ExportRouteFilters[i] != nil { + + if swag.IsZero(m.ExportRouteFilters[i]) { // not required + return nil + } + + if err := m.ExportRouteFilters[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("exportRouteFilters" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("exportRouteFilters" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +func (m *NetworkPeer) contextValidateImportRouteFilters(ctx context.Context, formats strfmt.Registry) error { - if m.Type != nil { + for i := 0; i < len(m.ImportRouteFilters); i++ { - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("type") + if m.ImportRouteFilters[i] != nil { + + if swag.IsZero(m.ImportRouteFilters[i]) { // not required + return nil + } + + if err := m.ImportRouteFilters[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("importRouteFilters" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("importRouteFilters" + "." + strconv.Itoa(i)) + } + + return err } - return err } + } return nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_create.go new file mode 100644 index 0000000000..3e3b69a230 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_create.go @@ -0,0 +1,339 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NetworkPeerCreate network peer create parameters +// +// swagger:model NetworkPeerCreate +type NetworkPeerCreate struct { + + // ASN number at customer network side + // Example: 64512 + // Required: true + CustomerASN *int64 `json:"customerASN"` + + // IP address used for configuring customer network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.2/30 + // Required: true + CustomerCidr *string `json:"customerCidr"` + + // default action for export route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Enum: ["allow","deny"] + DefaultExportRouteFilter *string `json:"defaultExportRouteFilter,omitempty"` + + // default action for import route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Enum: ["allow","deny"] + DefaultImportRouteFilter *string `json:"defaultImportRouteFilter,omitempty"` + + // ASN number at IBM PowerVS side + // Example: 64512 + // Required: true + IbmASN *int64 `json:"ibmASN"` + + // IP address used for configuring IBM network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.1/30 + // Required: true + IbmCidr *string `json:"ibmCidr"` + + // user defined name + // Example: newPeerNetwork + // Required: true + Name *string `json:"name"` + + // peer interface id. use API '/v1/network-peers/interfaces' to get a list of valid peer interface id + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 + // Required: true + PeerInterfaceID *string `json:"peerInterfaceID"` + + // type of the peer network + // * dcnetwork_bgp: broader gateway protocol is used to share routes between two autonomous network + // + // Example: dcnetwork_bgp + // Enum: ["dcnetwork_bgp"] + Type *string `json:"type,omitempty"` + + // A vlan configured at the customer network. + // Example: 2000 + // Required: true + Vlan *int64 `json:"vlan"` +} + +// Validate validates this network peer create +func (m *NetworkPeerCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCustomerASN(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCustomerCidr(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultExportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultImportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIbmASN(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIbmCidr(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePeerInterfaceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVlan(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NetworkPeerCreate) validateCustomerASN(formats strfmt.Registry) error { + + if err := validate.Required("customerASN", "body", m.CustomerASN); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validateCustomerCidr(formats strfmt.Registry) error { + + if err := validate.Required("customerCidr", "body", m.CustomerCidr); err != nil { + return err + } + + return nil +} + +var networkPeerCreateTypeDefaultExportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerCreateTypeDefaultExportRouteFilterPropEnum = append(networkPeerCreateTypeDefaultExportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerCreateDefaultExportRouteFilterAllow captures enum value "allow" + NetworkPeerCreateDefaultExportRouteFilterAllow string = "allow" + + // NetworkPeerCreateDefaultExportRouteFilterDeny captures enum value "deny" + NetworkPeerCreateDefaultExportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeerCreate) validateDefaultExportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerCreateTypeDefaultExportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerCreate) validateDefaultExportRouteFilter(formats strfmt.Registry) error { + if swag.IsZero(m.DefaultExportRouteFilter) { // not required + return nil + } + + // value enum + if err := m.validateDefaultExportRouteFilterEnum("defaultExportRouteFilter", "body", *m.DefaultExportRouteFilter); err != nil { + return err + } + + return nil +} + +var networkPeerCreateTypeDefaultImportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerCreateTypeDefaultImportRouteFilterPropEnum = append(networkPeerCreateTypeDefaultImportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerCreateDefaultImportRouteFilterAllow captures enum value "allow" + NetworkPeerCreateDefaultImportRouteFilterAllow string = "allow" + + // NetworkPeerCreateDefaultImportRouteFilterDeny captures enum value "deny" + NetworkPeerCreateDefaultImportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeerCreate) validateDefaultImportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerCreateTypeDefaultImportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerCreate) validateDefaultImportRouteFilter(formats strfmt.Registry) error { + if swag.IsZero(m.DefaultImportRouteFilter) { // not required + return nil + } + + // value enum + if err := m.validateDefaultImportRouteFilterEnum("defaultImportRouteFilter", "body", *m.DefaultImportRouteFilter); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validateIbmASN(formats strfmt.Registry) error { + + if err := validate.Required("ibmASN", "body", m.IbmASN); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validateIbmCidr(formats strfmt.Registry) error { + + if err := validate.Required("ibmCidr", "body", m.IbmCidr); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validatePeerInterfaceID(formats strfmt.Registry) error { + + if err := validate.Required("peerInterfaceID", "body", m.PeerInterfaceID); err != nil { + return err + } + + return nil +} + +var networkPeerCreateTypeTypePropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dcnetwork_bgp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerCreateTypeTypePropEnum = append(networkPeerCreateTypeTypePropEnum, v) + } +} + +const ( + + // NetworkPeerCreateTypeDcnetworkBgp captures enum value "dcnetwork_bgp" + NetworkPeerCreateTypeDcnetworkBgp string = "dcnetwork_bgp" +) + +// prop value enum +func (m *NetworkPeerCreate) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerCreateTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerCreate) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +func (m *NetworkPeerCreate) validateVlan(formats strfmt.Registry) error { + + if err := validate.Required("vlan", "body", m.Vlan); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this network peer create based on context it is used +func (m *NetworkPeerCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NetworkPeerCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NetworkPeerCreate) UnmarshalBinary(b []byte) error { + var res NetworkPeerCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_type.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_type.go index d47fb443ea..0e16784b78 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_type.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_type.go @@ -41,7 +41,7 @@ const ( ) // for schema -var networkPeerTypeEnum []interface{} +var networkPeerTypeEnum []any func init() { var res []NetworkPeerType diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_update.go new file mode 100644 index 0000000000..3a476371fe --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peer_update.go @@ -0,0 +1,241 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NetworkPeerUpdate network peer update parameters +// +// swagger:model NetworkPeerUpdate +type NetworkPeerUpdate struct { + + // ASN number at customer network side + // Example: 64512 + CustomerASN *int64 `json:"customerASN,omitempty"` + + // IP address used for configuring customer network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.2/30 + CustomerCidr *string `json:"customerCidr,omitempty"` + + // default action for export route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Enum: ["allow","deny"] + DefaultExportRouteFilter *string `json:"defaultExportRouteFilter,omitempty"` + + // default action for import route filter + // * allow: allow + // * deny: deny + // + // Example: allow + // Enum: ["allow","deny"] + DefaultImportRouteFilter *string `json:"defaultImportRouteFilter,omitempty"` + + // ASN number at IBM PowerVS side + // Example: 64512 + IbmASN *int64 `json:"ibmASN,omitempty"` + + // IP address used for configuring IBM network interface with network subnet mask. customerCidr and ibmCidr must have matching network and subnet mask values. + // Example: 192.168.91.1/30 + IbmCidr *string `json:"ibmCidr,omitempty"` + + // user defined name + // Example: newPeerNetwork + Name *string `json:"name,omitempty"` + + // peer interface id. use API '/v1/network-peers/interfaces' to get a list of valid peer interface id + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 + PeerInterfaceID *string `json:"peerInterfaceID,omitempty"` + + // type of the peer network + // * dcnetwork_bgp: broader gateway protocol is used to share routes between two autonomous network + // + // Example: dcnetwork_bgp + // Enum: ["dcnetwork_bgp"] + Type *string `json:"type,omitempty"` + + // A vlan configured at the customer network. + // Example: 2000 + Vlan *int64 `json:"vlan,omitempty"` +} + +// Validate validates this network peer update +func (m *NetworkPeerUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDefaultExportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultImportRouteFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var networkPeerUpdateTypeDefaultExportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerUpdateTypeDefaultExportRouteFilterPropEnum = append(networkPeerUpdateTypeDefaultExportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerUpdateDefaultExportRouteFilterAllow captures enum value "allow" + NetworkPeerUpdateDefaultExportRouteFilterAllow string = "allow" + + // NetworkPeerUpdateDefaultExportRouteFilterDeny captures enum value "deny" + NetworkPeerUpdateDefaultExportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeerUpdate) validateDefaultExportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerUpdateTypeDefaultExportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerUpdate) validateDefaultExportRouteFilter(formats strfmt.Registry) error { + if swag.IsZero(m.DefaultExportRouteFilter) { // not required + return nil + } + + // value enum + if err := m.validateDefaultExportRouteFilterEnum("defaultExportRouteFilter", "body", *m.DefaultExportRouteFilter); err != nil { + return err + } + + return nil +} + +var networkPeerUpdateTypeDefaultImportRouteFilterPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerUpdateTypeDefaultImportRouteFilterPropEnum = append(networkPeerUpdateTypeDefaultImportRouteFilterPropEnum, v) + } +} + +const ( + + // NetworkPeerUpdateDefaultImportRouteFilterAllow captures enum value "allow" + NetworkPeerUpdateDefaultImportRouteFilterAllow string = "allow" + + // NetworkPeerUpdateDefaultImportRouteFilterDeny captures enum value "deny" + NetworkPeerUpdateDefaultImportRouteFilterDeny string = "deny" +) + +// prop value enum +func (m *NetworkPeerUpdate) validateDefaultImportRouteFilterEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerUpdateTypeDefaultImportRouteFilterPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerUpdate) validateDefaultImportRouteFilter(formats strfmt.Registry) error { + if swag.IsZero(m.DefaultImportRouteFilter) { // not required + return nil + } + + // value enum + if err := m.validateDefaultImportRouteFilterEnum("defaultImportRouteFilter", "body", *m.DefaultImportRouteFilter); err != nil { + return err + } + + return nil +} + +var networkPeerUpdateTypeTypePropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dcnetwork_bgp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + networkPeerUpdateTypeTypePropEnum = append(networkPeerUpdateTypeTypePropEnum, v) + } +} + +const ( + + // NetworkPeerUpdateTypeDcnetworkBgp captures enum value "dcnetwork_bgp" + NetworkPeerUpdateTypeDcnetworkBgp string = "dcnetwork_bgp" +) + +// prop value enum +func (m *NetworkPeerUpdate) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, networkPeerUpdateTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NetworkPeerUpdate) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this network peer update based on context it is used +func (m *NetworkPeerUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NetworkPeerUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NetworkPeerUpdate) UnmarshalBinary(b []byte) error { + var res NetworkPeerUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peers.go index 38a9e55627..49d6ebc910 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_peers.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *NetworkPeers) validateNetworkPeers(formats strfmt.Registry) error { if m.NetworkPeers[i] != nil { if err := m.NetworkPeers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkPeers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkPeers" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *NetworkPeers) contextValidateNetworkPeers(ctx context.Context, formats } if err := m.NetworkPeers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkPeers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkPeers" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go index 997c0cfab5..34060c26ba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -126,11 +127,15 @@ func (m *NetworkPort) validatePvmInstance(formats strfmt.Registry) error { if m.PvmInstance != nil { if err := m.PvmInstance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstance") } + return err } } @@ -170,11 +175,15 @@ func (m *NetworkPort) contextValidatePvmInstance(ctx context.Context, formats st } if err := m.PvmInstance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstance") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port_create.go index d3ebbb1be7..685f0531bf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -48,11 +49,15 @@ func (m *NetworkPortCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -76,11 +81,15 @@ func (m *NetworkPortCreate) ContextValidate(ctx context.Context, formats strfmt. func (m *NetworkPortCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go index 66ba99b648..424148ae13 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *NetworkPorts) validatePorts(formats strfmt.Registry) error { if m.Ports[i] != nil { if err := m.Ports[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ports" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *NetworkPorts) contextValidatePorts(ctx context.Context, formats strfmt. } if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ports" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go index 9b2482b61c..1d859eb033 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go @@ -57,7 +57,7 @@ type NetworkReference struct { // Required: true NetworkID *string `json:"networkID"` - // Network Peer ID + // [DEPRECATED] Network Peer ID PeerID string `json:"peerID,omitempty"` // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group.go index 581286a77b..0f8f82d889 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -41,8 +42,8 @@ type NetworkSecurityGroup struct { // The list of rules in the Network Security Group Rules []*NetworkSecurityGroupRule `json:"rules"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` } // Validate validates this network security group @@ -69,6 +70,10 @@ func (m *NetworkSecurityGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -105,11 +110,15 @@ func (m *NetworkSecurityGroup) validateMembers(formats strfmt.Registry) error { if m.Members[i] != nil { if err := m.Members[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("members" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("members" + "." + strconv.Itoa(i)) } + return err } } @@ -140,11 +149,15 @@ func (m *NetworkSecurityGroup) validateRules(formats strfmt.Registry) error { if m.Rules[i] != nil { if err := m.Rules[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("rules" + "." + strconv.Itoa(i)) } + return err } } @@ -154,6 +167,27 @@ func (m *NetworkSecurityGroup) validateRules(formats strfmt.Registry) error { return nil } +func (m *NetworkSecurityGroup) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // ContextValidate validate this network security group based on the context it is used func (m *NetworkSecurityGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -166,6 +200,10 @@ func (m *NetworkSecurityGroup) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -183,11 +221,15 @@ func (m *NetworkSecurityGroup) contextValidateMembers(ctx context.Context, forma } if err := m.Members[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("members" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("members" + "." + strconv.Itoa(i)) } + return err } } @@ -208,11 +250,15 @@ func (m *NetworkSecurityGroup) contextValidateRules(ctx context.Context, formats } if err := m.Rules[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("rules" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("rules" + "." + strconv.Itoa(i)) } + return err } } @@ -222,6 +268,24 @@ func (m *NetworkSecurityGroup) contextValidateRules(ctx context.Context, formats return nil } +func (m *NetworkSecurityGroup) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + // MarshalBinary interface implementation func (m *NetworkSecurityGroup) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_member.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_member.go index abb75b1bc2..2927472883 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_member.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_member.go @@ -57,7 +57,7 @@ func (m *NetworkSecurityGroupAddMember) validateTarget(formats strfmt.Registry) return nil } -var networkSecurityGroupAddMemberTypeTypePropEnum []interface{} +var networkSecurityGroupAddMemberTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_rule.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_rule.go index d57b3d7e40..4f518a6093 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_rule.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_add_rule.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -84,7 +85,7 @@ func (m *NetworkSecurityGroupAddRule) Validate(formats strfmt.Registry) error { return nil } -var networkSecurityGroupAddRuleTypeActionPropEnum []interface{} +var networkSecurityGroupAddRuleTypeActionPropEnum []any func init() { var res []string @@ -134,11 +135,15 @@ func (m *NetworkSecurityGroupAddRule) validateDestinationPort(formats strfmt.Reg if m.DestinationPort != nil { if err := m.DestinationPort.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPort") } + return err } } @@ -153,11 +158,15 @@ func (m *NetworkSecurityGroupAddRule) validateDestinationPorts(formats strfmt.Re if m.DestinationPorts != nil { if err := m.DestinationPorts.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPorts") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPorts") } + return err } } @@ -173,11 +182,15 @@ func (m *NetworkSecurityGroupAddRule) validateProtocol(formats strfmt.Registry) if m.Protocol != nil { if err := m.Protocol.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("protocol") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("protocol") } + return err } } @@ -193,11 +206,15 @@ func (m *NetworkSecurityGroupAddRule) validateRemote(formats strfmt.Registry) er if m.Remote != nil { if err := m.Remote.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remote") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remote") } + return err } } @@ -212,11 +229,15 @@ func (m *NetworkSecurityGroupAddRule) validateSourcePort(formats strfmt.Registry if m.SourcePort != nil { if err := m.SourcePort.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePort") } + return err } } @@ -231,11 +252,15 @@ func (m *NetworkSecurityGroupAddRule) validateSourcePorts(formats strfmt.Registr if m.SourcePorts != nil { if err := m.SourcePorts.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePorts") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePorts") } + return err } } @@ -286,11 +311,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateDestinationPort(ctx context } if err := m.DestinationPort.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPort") } + return err } } @@ -307,11 +336,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateDestinationPorts(ctx contex } if err := m.DestinationPorts.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPorts") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPorts") } + return err } } @@ -324,11 +357,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateProtocol(ctx context.Contex if m.Protocol != nil { if err := m.Protocol.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("protocol") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("protocol") } + return err } } @@ -341,11 +378,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateRemote(ctx context.Context, if m.Remote != nil { if err := m.Remote.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remote") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remote") } + return err } } @@ -362,11 +403,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateSourcePort(ctx context.Cont } if err := m.SourcePort.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePort") } + return err } } @@ -383,11 +428,15 @@ func (m *NetworkSecurityGroupAddRule) contextValidateSourcePorts(ctx context.Con } if err := m.SourcePorts.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePorts") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePorts") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_create.go index fdafaa4287..07c1c6e604 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -23,8 +24,8 @@ type NetworkSecurityGroupCreate struct { // Required: true Name *string `json:"name"` - // The user tags associated with this resource. - UserTags []string `json:"userTags,omitempty"` + // user tags + UserTags Tags `json:"userTags,omitempty"` } // Validate validates this network security group create @@ -35,6 +36,10 @@ func (m *NetworkSecurityGroupCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -50,8 +55,56 @@ func (m *NetworkSecurityGroupCreate) validateName(formats strfmt.Registry) error return nil } -// ContextValidate validates this network security group create based on context it is used +func (m *NetworkSecurityGroupCreate) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + +// ContextValidate validate this network security group create based on the context it is used func (m *NetworkSecurityGroupCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NetworkSecurityGroupCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_member.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_member.go index 38eb82f17a..27589a1d90 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_member.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_member.go @@ -80,7 +80,7 @@ func (m *NetworkSecurityGroupMember) validateTarget(formats strfmt.Registry) err return nil } -var networkSecurityGroupMemberTypeTypePropEnum []interface{} +var networkSecurityGroupMemberTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule.go index a1be84f99f..1561b2cfa7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -78,7 +79,7 @@ func (m *NetworkSecurityGroupRule) Validate(formats strfmt.Registry) error { return nil } -var networkSecurityGroupRuleTypeActionPropEnum []interface{} +var networkSecurityGroupRuleTypeActionPropEnum []any func init() { var res []string @@ -128,11 +129,15 @@ func (m *NetworkSecurityGroupRule) validateDestinationPort(formats strfmt.Regist if m.DestinationPort != nil { if err := m.DestinationPort.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPort") } + return err } } @@ -157,11 +162,15 @@ func (m *NetworkSecurityGroupRule) validateProtocol(formats strfmt.Registry) err if m.Protocol != nil { if err := m.Protocol.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("protocol") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("protocol") } + return err } } @@ -177,11 +186,15 @@ func (m *NetworkSecurityGroupRule) validateRemote(formats strfmt.Registry) error if m.Remote != nil { if err := m.Remote.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remote") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remote") } + return err } } @@ -196,11 +209,15 @@ func (m *NetworkSecurityGroupRule) validateSourcePort(formats strfmt.Registry) e if m.SourcePort != nil { if err := m.SourcePort.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePort") } + return err } } @@ -243,11 +260,15 @@ func (m *NetworkSecurityGroupRule) contextValidateDestinationPort(ctx context.Co } if err := m.DestinationPort.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("destinationPort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("destinationPort") } + return err } } @@ -260,11 +281,15 @@ func (m *NetworkSecurityGroupRule) contextValidateProtocol(ctx context.Context, if m.Protocol != nil { if err := m.Protocol.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("protocol") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("protocol") } + return err } } @@ -277,11 +302,15 @@ func (m *NetworkSecurityGroupRule) contextValidateRemote(ctx context.Context, fo if m.Remote != nil { if err := m.Remote.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remote") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remote") } + return err } } @@ -298,11 +327,15 @@ func (m *NetworkSecurityGroupRule) contextValidateSourcePort(ctx context.Context } if err := m.SourcePort.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sourcePort") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sourcePort") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol.go index 3cb7cd170b..6f4f14b3cc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -55,7 +56,7 @@ func (m *NetworkSecurityGroupRuleProtocol) Validate(formats strfmt.Registry) err return nil } -var networkSecurityGroupRuleProtocolTypeIcmpTypePropEnum []interface{} +var networkSecurityGroupRuleProtocolTypeIcmpTypePropEnum []any func init() { var res []string @@ -121,11 +122,15 @@ func (m *NetworkSecurityGroupRuleProtocol) validateTCPFlags(formats strfmt.Regis if m.TCPFlags[i] != nil { if err := m.TCPFlags[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tcpFlags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tcpFlags" + "." + strconv.Itoa(i)) } + return err } } @@ -135,7 +140,7 @@ func (m *NetworkSecurityGroupRuleProtocol) validateTCPFlags(formats strfmt.Regis return nil } -var networkSecurityGroupRuleProtocolTypeTypePropEnum []interface{} +var networkSecurityGroupRuleProtocolTypeTypePropEnum []any func init() { var res []string @@ -208,11 +213,15 @@ func (m *NetworkSecurityGroupRuleProtocol) contextValidateTCPFlags(ctx context.C } if err := m.TCPFlags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tcpFlags" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tcpFlags" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol_tcp_flag.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol_tcp_flag.go index 4340525e9c..dc49c3b4a1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol_tcp_flag.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_protocol_tcp_flag.go @@ -39,7 +39,7 @@ func (m *NetworkSecurityGroupRuleProtocolTCPFlag) Validate(formats strfmt.Regist return nil } -var networkSecurityGroupRuleProtocolTcpFlagTypeFlagPropEnum []interface{} +var networkSecurityGroupRuleProtocolTcpFlagTypeFlagPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_remote.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_remote.go index 4742669725..07932e1454 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_remote.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_group_rule_remote.go @@ -42,7 +42,7 @@ func (m *NetworkSecurityGroupRuleRemote) Validate(formats strfmt.Registry) error return nil } -var networkSecurityGroupRuleRemoteTypeTypePropEnum []interface{} +var networkSecurityGroupRuleRemoteTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups.go index 82d72f8737..e2f3419ecb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *NetworkSecurityGroups) validateNetworkSecurityGroups(formats strfmt.Reg if m.NetworkSecurityGroups[i] != nil { if err := m.NetworkSecurityGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *NetworkSecurityGroups) contextValidateNetworkSecurityGroups(ctx context } if err := m.NetworkSecurityGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkSecurityGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups_action.go index ad9b218a57..8b9e711c00 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_security_groups_action.go @@ -40,7 +40,7 @@ func (m *NetworkSecurityGroupsAction) Validate(formats strfmt.Registry) error { return nil } -var networkSecurityGroupsActionTypeActionPropEnum []interface{} +var networkSecurityGroupsActionTypeActionPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go index adfb8bea97..4e983d3aec 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -32,6 +33,9 @@ type NetworkUpdate struct { // Replaces the current DNS Servers DNSServers []string `json:"dnsServers"` + // network will support DHCP + EnableDHCP *bool `json:"enableDHCP,omitempty"` + // Replaces the current Gateway IP Address Gateway *string `json:"gateway,omitempty"` @@ -64,7 +68,7 @@ func (m *NetworkUpdate) Validate(formats strfmt.Registry) error { return nil } -var networkUpdateTypeAdvertisePropEnum []interface{} +var networkUpdateTypeAdvertisePropEnum []any func init() { var res []string @@ -106,7 +110,7 @@ func (m *NetworkUpdate) validateAdvertise(formats strfmt.Registry) error { return nil } -var networkUpdateTypeArpBroadcastPropEnum []interface{} +var networkUpdateTypeArpBroadcastPropEnum []any func init() { var res []string @@ -160,11 +164,15 @@ func (m *NetworkUpdate) validateIPAddressRanges(formats strfmt.Registry) error { if m.IPAddressRanges[i] != nil { if err := m.IPAddressRanges[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) } + return err } } @@ -199,11 +207,15 @@ func (m *NetworkUpdate) contextValidateIPAddressRanges(ctx context.Context, form } if err := m.IPAddressRanges[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go index 24e4160a05..ec7cb23410 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Networks) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Networks) contextValidateNetworks(ctx context.Context, formats strfmt.R } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/object.go index cf28d25ee3..0e35074f73 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/object.go @@ -8,4 +8,4 @@ package models // Object object // // swagger:model Object -type Object interface{} +type Object any diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go index 58b1e46136..68256b3813 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -60,11 +61,15 @@ func (m *OpenStackInfo) validateHosts(formats strfmt.Registry) error { if m.Hosts[i] != nil { if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } @@ -108,11 +113,15 @@ func (m *OpenStackInfo) contextValidateHosts(ctx context.Context, formats strfmt } if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go index bddbddfa73..e141aaee84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *OpenStacks) validateOpenStacks(formats strfmt.Registry) error { if m.OpenStacks[i] != nil { if err := m.OpenStacks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("openStacks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("openStacks" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *OpenStacks) contextValidateOpenStacks(ctx context.Context, formats strf } if err := m.OpenStacks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("openStacks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("openStacks" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/operations.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/operations.go index 66c44c0f84..6c97932cfd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/operations.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/operations.go @@ -29,7 +29,7 @@ type Operations struct { OperatingMode string `json:"operatingMode,omitempty"` // Name of the job task to execute - // Enum: ["dston","retrydump","consoleservice","iopreset","remotedstoff","remotedston","iopdump","dumprestart"] + // Enum: ["consoleservice","dston","dumprestart","iopdump","iopreset","remotedstoff","remotedston","retrydump"] Task string `json:"task,omitempty"` } @@ -55,7 +55,7 @@ func (m *Operations) Validate(formats strfmt.Registry) error { return nil } -var operationsTypeBootModePropEnum []interface{} +var operationsTypeBootModePropEnum []any func init() { var res []string @@ -103,7 +103,7 @@ func (m *Operations) validateBootMode(formats strfmt.Registry) error { return nil } -var operationsTypeOperatingModePropEnum []interface{} +var operationsTypeOperatingModePropEnum []any func init() { var res []string @@ -145,11 +145,11 @@ func (m *Operations) validateOperatingMode(formats strfmt.Registry) error { return nil } -var operationsTypeTaskPropEnum []interface{} +var operationsTypeTaskPropEnum []any func init() { var res []string - if err := json.Unmarshal([]byte(`["dston","retrydump","consoleservice","iopreset","remotedstoff","remotedston","iopdump","dumprestart"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["consoleservice","dston","dumprestart","iopdump","iopreset","remotedstoff","remotedston","retrydump"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -159,14 +159,17 @@ func init() { const ( + // OperationsTaskConsoleservice captures enum value "consoleservice" + OperationsTaskConsoleservice string = "consoleservice" + // OperationsTaskDston captures enum value "dston" OperationsTaskDston string = "dston" - // OperationsTaskRetrydump captures enum value "retrydump" - OperationsTaskRetrydump string = "retrydump" + // OperationsTaskDumprestart captures enum value "dumprestart" + OperationsTaskDumprestart string = "dumprestart" - // OperationsTaskConsoleservice captures enum value "consoleservice" - OperationsTaskConsoleservice string = "consoleservice" + // OperationsTaskIopdump captures enum value "iopdump" + OperationsTaskIopdump string = "iopdump" // OperationsTaskIopreset captures enum value "iopreset" OperationsTaskIopreset string = "iopreset" @@ -177,11 +180,8 @@ const ( // OperationsTaskRemotedston captures enum value "remotedston" OperationsTaskRemotedston string = "remotedston" - // OperationsTaskIopdump captures enum value "iopdump" - OperationsTaskIopdump string = "iopdump" - - // OperationsTaskDumprestart captures enum value "dumprestart" - OperationsTaskDumprestart string = "dumprestart" + // OperationsTaskRetrydump captures enum value "retrydump" + OperationsTaskRetrydump string = "retrydump" ) // prop value enum diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go index 6377b7f79a..e466d077de 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -165,11 +166,15 @@ func (m *OwnerInfo) validateSoftlayerSubscriptions(formats strfmt.Registry) erro if m.SoftlayerSubscriptions[i] != nil { if err := m.SoftlayerSubscriptions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) } + return err } } @@ -213,11 +218,15 @@ func (m *OwnerInfo) contextValidateSoftlayerSubscriptions(ctx context.Context, f } if err := m.SoftlayerSubscriptions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go index 698429226f..1d1e8be504 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -44,6 +45,9 @@ type PVMInstance struct { // Required: true DiskSize *float64 `json:"diskSize"` + // Effective processor compatibility mode + EffectiveProcessorCompatibilityMode string `json:"effectiveProcessorCompatibilityMode,omitempty"` + // fault Fault *PVMInstanceFault `json:"fault,omitempty"` @@ -99,6 +103,9 @@ type PVMInstance struct { // The placement group of the server PlacementGroup *string `json:"placementGroup,omitempty"` + // Preferred processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // Processor type (dedicated, shared, capped) // Required: true // Enum: ["dedicated","shared","capped",""] @@ -173,6 +180,9 @@ type PVMInstance struct { // List of volume IDs // Required: true VolumeIDs []string `json:"volumeIDs"` + + // List of vPMEM volumes attached to this PVM Instance + VpmemVolumes []*VPMemVolumeReference `json:"vpmemVolumes,omitempty"` } // Validate validates this p VM instance @@ -283,6 +293,10 @@ func (m *PVMInstance) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -301,11 +315,15 @@ func (m *PVMInstance) validateAddresses(formats strfmt.Registry) error { if m.Addresses[i] != nil { if err := m.Addresses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("addresses" + "." + strconv.Itoa(i)) } + return err } } @@ -322,11 +340,15 @@ func (m *PVMInstance) validateConsoleLanguage(formats strfmt.Registry) error { if m.ConsoleLanguage != nil { if err := m.ConsoleLanguage.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -352,11 +374,15 @@ func (m *PVMInstance) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -379,11 +405,15 @@ func (m *PVMInstance) validateFault(formats strfmt.Registry) error { if m.Fault != nil { if err := m.Fault.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("fault") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("fault") } + return err } } @@ -398,11 +428,15 @@ func (m *PVMInstance) validateHealth(formats strfmt.Registry) error { if m.Health != nil { if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -449,11 +483,15 @@ func (m *PVMInstance) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -472,7 +510,7 @@ func (m *PVMInstance) validateOsType(formats strfmt.Registry) error { return nil } -var pVmInstanceTypeProcTypePropEnum []interface{} +var pVmInstanceTypeProcTypePropEnum []any func init() { var res []string @@ -546,11 +584,15 @@ func (m *PVMInstance) validateSapProfile(formats strfmt.Registry) error { if m.SapProfile != nil { if err := m.SapProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -574,11 +616,15 @@ func (m *PVMInstance) validateSoftwareLicenses(formats strfmt.Registry) error { if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -600,11 +646,15 @@ func (m *PVMInstance) validateSrcs(formats strfmt.Registry) error { if m.Srcs[i][ii] != nil { if err := m.Srcs[i][ii].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } @@ -652,11 +702,15 @@ func (m *PVMInstance) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -670,11 +724,15 @@ func (m *PVMInstance) validateVirtualCores(formats strfmt.Registry) error { if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -689,11 +747,15 @@ func (m *PVMInstance) validateVirtualSerialNumber(formats strfmt.Registry) error if m.VirtualSerialNumber != nil { if err := m.VirtualSerialNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -710,6 +772,36 @@ func (m *PVMInstance) validateVolumeIDs(formats strfmt.Registry) error { return nil } +func (m *PVMInstance) validateVpmemVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolumes) { // not required + return nil + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this p VM instance based on the context it is used func (m *PVMInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -762,6 +854,10 @@ func (m *PVMInstance) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -779,11 +875,15 @@ func (m *PVMInstance) contextValidateAddresses(ctx context.Context, formats strf } if err := m.Addresses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("addresses" + "." + strconv.Itoa(i)) } + return err } } @@ -802,11 +902,15 @@ func (m *PVMInstance) contextValidateConsoleLanguage(ctx context.Context, format } if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -821,11 +925,15 @@ func (m *PVMInstance) contextValidateCrn(ctx context.Context, formats strfmt.Reg } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -841,11 +949,15 @@ func (m *PVMInstance) contextValidateFault(ctx context.Context, formats strfmt.R } if err := m.Fault.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("fault") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("fault") } + return err } } @@ -862,11 +974,15 @@ func (m *PVMInstance) contextValidateHealth(ctx context.Context, formats strfmt. } if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -885,11 +1001,15 @@ func (m *PVMInstance) contextValidateNetworks(ctx context.Context, formats strfm } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -908,11 +1028,15 @@ func (m *PVMInstance) contextValidateSapProfile(ctx context.Context, formats str } if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -929,11 +1053,15 @@ func (m *PVMInstance) contextValidateSoftwareLicenses(ctx context.Context, forma } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -954,11 +1082,15 @@ func (m *PVMInstance) contextValidateSrcs(ctx context.Context, formats strfmt.Re } if err := m.Srcs[i][ii].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } @@ -973,11 +1105,15 @@ func (m *PVMInstance) contextValidateSrcs(ctx context.Context, formats strfmt.Re func (m *PVMInstance) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -993,11 +1129,15 @@ func (m *PVMInstance) contextValidateVirtualCores(ctx context.Context, formats s } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -1014,11 +1154,15 @@ func (m *PVMInstance) contextValidateVirtualSerialNumber(ctx context.Context, fo } if err := m.VirtualSerialNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -1026,6 +1170,35 @@ func (m *PVMInstance) contextValidateVirtualSerialNumber(ctx context.Context, fo return nil } +func (m *PVMInstance) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstance) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_action.go index 582f52a512..0a76ca0f2f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_action.go @@ -20,9 +20,9 @@ import ( // swagger:model PVMInstanceAction type PVMInstanceAction struct { - // Name of the action to take; can be start, stop, hard-reboot, soft-reboot, immediate-shutdown, reset-state, dhcp-ip-sync (on-prem only) + // Name of the action to take; can be 'dhcp-ip-sync' (on-prem only), 'dumprestart', 'hard-reboot', 'immediate-shutdown', 'reset-state', 'soft-reboot', 'start', 'stop' // Required: true - // Enum: ["start","stop","immediate-shutdown","hard-reboot","soft-reboot","reset-state","dhcp-ip-sync"] + // Enum: ["dhcp-ip-sync","dumprestart","hard-reboot","immediate-shutdown","reset-state","soft-reboot","start","stop"] Action *string `json:"action"` } @@ -40,11 +40,11 @@ func (m *PVMInstanceAction) Validate(formats strfmt.Registry) error { return nil } -var pVmInstanceActionTypeActionPropEnum []interface{} +var pVmInstanceActionTypeActionPropEnum []any func init() { var res []string - if err := json.Unmarshal([]byte(`["start","stop","immediate-shutdown","hard-reboot","soft-reboot","reset-state","dhcp-ip-sync"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["dhcp-ip-sync","dumprestart","hard-reboot","immediate-shutdown","reset-state","soft-reboot","start","stop"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -54,26 +54,29 @@ func init() { const ( - // PVMInstanceActionActionStart captures enum value "start" - PVMInstanceActionActionStart string = "start" + // PVMInstanceActionActionDhcpDashIPDashSync captures enum value "dhcp-ip-sync" + PVMInstanceActionActionDhcpDashIPDashSync string = "dhcp-ip-sync" - // PVMInstanceActionActionStop captures enum value "stop" - PVMInstanceActionActionStop string = "stop" + // PVMInstanceActionActionDumprestart captures enum value "dumprestart" + PVMInstanceActionActionDumprestart string = "dumprestart" + + // PVMInstanceActionActionHardDashReboot captures enum value "hard-reboot" + PVMInstanceActionActionHardDashReboot string = "hard-reboot" // PVMInstanceActionActionImmediateDashShutdown captures enum value "immediate-shutdown" PVMInstanceActionActionImmediateDashShutdown string = "immediate-shutdown" - // PVMInstanceActionActionHardDashReboot captures enum value "hard-reboot" - PVMInstanceActionActionHardDashReboot string = "hard-reboot" + // PVMInstanceActionActionResetDashState captures enum value "reset-state" + PVMInstanceActionActionResetDashState string = "reset-state" // PVMInstanceActionActionSoftDashReboot captures enum value "soft-reboot" PVMInstanceActionActionSoftDashReboot string = "soft-reboot" - // PVMInstanceActionActionResetDashState captures enum value "reset-state" - PVMInstanceActionActionResetDashState string = "reset-state" + // PVMInstanceActionActionStart captures enum value "start" + PVMInstanceActionActionStart string = "start" - // PVMInstanceActionActionDhcpDashIPDashSync captures enum value "dhcp-ip-sync" - PVMInstanceActionActionDhcpDashIPDashSync string = "dhcp-ip-sync" + // PVMInstanceActionActionStop captures enum value "stop" + PVMInstanceActionActionStop string = "stop" ) // prop value enum diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_capture.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_capture.go index 1094909f25..b76095098b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_capture.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_capture.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -73,7 +74,7 @@ func (m *PVMInstanceCapture) Validate(formats strfmt.Registry) error { return nil } -var pVmInstanceCaptureTypeCaptureDestinationPropEnum []interface{} +var pVmInstanceCaptureTypeCaptureDestinationPropEnum []any func init() { var res []string @@ -134,11 +135,15 @@ func (m *PVMInstanceCapture) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -162,11 +167,15 @@ func (m *PVMInstanceCapture) ContextValidate(ctx context.Context, formats strfmt func (m *PVMInstanceCapture) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go index b1bbd983bd..0e72786c2c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -97,11 +98,15 @@ func (m *PVMInstanceClone) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -111,7 +116,7 @@ func (m *PVMInstanceClone) validateNetworks(formats strfmt.Registry) error { return nil } -var pVmInstanceCloneTypeProcTypePropEnum []interface{} +var pVmInstanceCloneTypeProcTypePropEnum []any func init() { var res []string @@ -163,11 +168,15 @@ func (m *PVMInstanceClone) validateSoftwareLicenses(formats strfmt.Registry) err if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -204,11 +213,15 @@ func (m *PVMInstanceClone) contextValidateNetworks(ctx context.Context, formats } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -227,11 +240,15 @@ func (m *PVMInstanceClone) contextValidateSoftwareLicenses(ctx context.Context, } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go index 10c13a146b..d911e790f9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -68,11 +69,15 @@ func (m *PVMInstanceConfiguration) validateConsoleLanguage(formats strfmt.Regist if m.ConsoleLanguage != nil { if err := m.ConsoleLanguage.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -87,11 +92,15 @@ func (m *PVMInstanceConfiguration) validateSapProfile(formats strfmt.Registry) e if m.SapProfile != nil { if err := m.SapProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -106,11 +115,15 @@ func (m *PVMInstanceConfiguration) validateSoftwareLicenses(formats strfmt.Regis if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -132,11 +145,15 @@ func (m *PVMInstanceConfiguration) validateSystemReferenceCodes(formats strfmt.R if m.SystemReferenceCodes[i][ii] != nil { if err := m.SystemReferenceCodes[i][ii].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } @@ -183,11 +200,15 @@ func (m *PVMInstanceConfiguration) contextValidateConsoleLanguage(ctx context.Co } if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -204,11 +225,15 @@ func (m *PVMInstanceConfiguration) contextValidateSapProfile(ctx context.Context } if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -225,11 +250,15 @@ func (m *PVMInstanceConfiguration) contextValidateSoftwareLicenses(ctx context.C } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -250,11 +279,15 @@ func (m *PVMInstanceConfiguration) contextValidateSystemReferenceCodes(ctx conte } if err := m.SystemReferenceCodes[i][ii].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go index a2b037d195..011ba8ca50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -59,6 +60,9 @@ type PVMInstanceCreate struct { // The placement group for the server PlacementGroup string `json:"placementGroup,omitempty"` + // processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // Processor type (dedicated, shared, capped) // Required: true // Enum: ["dedicated","shared","capped"] @@ -130,6 +134,9 @@ type PVMInstanceCreate struct { // List of volume IDs VolumeIDs []string `json:"volumeIDs"` + + // The vPMEM volumes information + VpmemVolumes []*VPMemVolumeCreate `json:"vpmemVolumes"` } // Validate validates this p VM instance create @@ -208,6 +215,10 @@ func (m *PVMInstanceCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -221,11 +232,15 @@ func (m *PVMInstanceCreate) validateDeploymentTarget(formats strfmt.Registry) er if m.DeploymentTarget != nil { if err := m.DeploymentTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deploymentTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deploymentTarget") } + return err } } @@ -263,11 +278,15 @@ func (m *PVMInstanceCreate) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -283,18 +302,22 @@ func (m *PVMInstanceCreate) validatePinPolicy(formats strfmt.Registry) error { } if err := m.PinPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } return nil } -var pVmInstanceCreateTypeProcTypePropEnum []interface{} +var pVmInstanceCreateTypeProcTypePropEnum []any func init() { var res []string @@ -349,7 +372,7 @@ func (m *PVMInstanceCreate) validateProcessors(formats strfmt.Registry) error { return nil } -var pVmInstanceCreateTypeReplicantAffinityPolicyPropEnum []interface{} +var pVmInstanceCreateTypeReplicantAffinityPolicyPropEnum []any func init() { var res []string @@ -394,7 +417,7 @@ func (m *PVMInstanceCreate) validateReplicantAffinityPolicy(formats strfmt.Regis return nil } -var pVmInstanceCreateTypeReplicantNamingSchemePropEnum []interface{} +var pVmInstanceCreateTypeReplicantNamingSchemePropEnum []any func init() { var res []string @@ -464,11 +487,15 @@ func (m *PVMInstanceCreate) validateSoftwareLicenses(formats strfmt.Registry) er if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -483,11 +510,15 @@ func (m *PVMInstanceCreate) validateStorageAffinity(formats strfmt.Registry) err if m.StorageAffinity != nil { if err := m.StorageAffinity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -495,7 +526,7 @@ func (m *PVMInstanceCreate) validateStorageAffinity(formats strfmt.Registry) err return nil } -var pVmInstanceCreateTypeStorageConnectionPropEnum []interface{} +var pVmInstanceCreateTypeStorageConnectionPropEnum []any func init() { var res []string @@ -537,7 +568,7 @@ func (m *PVMInstanceCreate) validateStorageConnection(formats strfmt.Registry) e return nil } -var pVmInstanceCreateTypeStorageConnectionV2PropEnum []interface{} +var pVmInstanceCreateTypeStorageConnectionV2PropEnum []any func init() { var res []string @@ -585,11 +616,15 @@ func (m *PVMInstanceCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -603,11 +638,15 @@ func (m *PVMInstanceCreate) validateVirtualCores(formats strfmt.Registry) error if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -622,11 +661,15 @@ func (m *PVMInstanceCreate) validateVirtualSerialNumber(formats strfmt.Registry) if m.VirtualSerialNumber != nil { if err := m.VirtualSerialNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -634,6 +677,36 @@ func (m *PVMInstanceCreate) validateVirtualSerialNumber(formats strfmt.Registry) return nil } +func (m *PVMInstanceCreate) validateVpmemVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolumes) { // not required + return nil + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this p VM instance create based on the context it is used func (m *PVMInstanceCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -670,6 +743,10 @@ func (m *PVMInstanceCreate) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -685,11 +762,15 @@ func (m *PVMInstanceCreate) contextValidateDeploymentTarget(ctx context.Context, } if err := m.DeploymentTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deploymentTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deploymentTarget") } + return err } } @@ -708,11 +789,15 @@ func (m *PVMInstanceCreate) contextValidateNetworks(ctx context.Context, formats } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -729,11 +814,15 @@ func (m *PVMInstanceCreate) contextValidatePinPolicy(ctx context.Context, format } if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } @@ -749,11 +838,15 @@ func (m *PVMInstanceCreate) contextValidateSoftwareLicenses(ctx context.Context, } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -770,11 +863,15 @@ func (m *PVMInstanceCreate) contextValidateStorageAffinity(ctx context.Context, } if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -785,11 +882,15 @@ func (m *PVMInstanceCreate) contextValidateStorageAffinity(ctx context.Context, func (m *PVMInstanceCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -805,11 +906,15 @@ func (m *PVMInstanceCreate) contextValidateVirtualCores(ctx context.Context, for } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -826,11 +931,15 @@ func (m *PVMInstanceCreate) contextValidateVirtualSerialNumber(ctx context.Conte } if err := m.VirtualSerialNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -838,6 +947,35 @@ func (m *PVMInstanceCreate) contextValidateVirtualSerialNumber(ctx context.Conte return nil } +func (m *PVMInstanceCreate) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstanceCreate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go index 531cb4b870..30f63b167d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m PVMInstanceList) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m PVMInstanceList) ContextValidate(ctx context.Context, formats strfmt.Reg } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_multi_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_multi_create.go index 7df1b2e667..85e9fd6ddc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_multi_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_multi_create.go @@ -50,7 +50,7 @@ func (m *PVMInstanceMultiCreate) Validate(formats strfmt.Registry) error { return nil } -var pVmInstanceMultiCreateTypeAffinityPolicyPropEnum []interface{} +var pVmInstanceMultiCreateTypeAffinityPolicyPropEnum []any func init() { var res []string @@ -95,7 +95,7 @@ func (m *PVMInstanceMultiCreate) validateAffinityPolicy(formats strfmt.Registry) return nil } -var pVmInstanceMultiCreateTypeNumericalPropEnum []interface{} +var pVmInstanceMultiCreateTypeNumericalPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go index dab3b20833..3eeee0c63c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PVMInstanceNetworks) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PVMInstanceNetworks) contextValidateNetworks(ctx context.Context, forma } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go index 88a38dfbb8..5450336cd3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -56,11 +57,15 @@ func (m *PVMInstanceOperation) validateOperation(formats strfmt.Registry) error if m.Operation != nil { if err := m.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operation") } + return err } } @@ -68,7 +73,7 @@ func (m *PVMInstanceOperation) validateOperation(formats strfmt.Registry) error return nil } -var pVmInstanceOperationTypeOperationTypePropEnum []interface{} +var pVmInstanceOperationTypeOperationTypePropEnum []any func init() { var res []string @@ -130,11 +135,15 @@ func (m *PVMInstanceOperation) contextValidateOperation(ctx context.Context, for if m.Operation != nil { if err := m.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operation") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go index be890f3ab9..97fba5d298 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -41,6 +42,9 @@ type PVMInstanceReference struct { // Required: true DiskSize *float64 `json:"diskSize"` + // Effective processor compatibility mode + EffectiveProcessorCompatibilityMode string `json:"effectiveProcessorCompatibilityMode,omitempty"` + // fault Fault *PVMInstanceFault `json:"fault,omitempty"` @@ -93,6 +97,9 @@ type PVMInstanceReference struct { // The placement group of the server PlacementGroup *string `json:"placementGroup,omitempty"` + // Preferred processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // Processor type (dedicated, shared, capped) // Required: true // Enum: ["dedicated","shared","capped"] @@ -159,6 +166,9 @@ type PVMInstanceReference struct { // Information about Virtual Serial Number assigned to the PVM Instance VirtualSerialNumber *GetServerVirtualSerialNumber `json:"virtualSerialNumber,omitempty"` + + // List of vPMEM volumes attached to this PVM Instance + VpmemVolumes []*VPMemVolumeReference `json:"vpmemVolumes,omitempty"` } // Validate validates this p VM instance reference @@ -257,6 +267,10 @@ func (m *PVMInstanceReference) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -275,11 +289,15 @@ func (m *PVMInstanceReference) validateAddresses(formats strfmt.Registry) error if m.Addresses[i] != nil { if err := m.Addresses[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("addresses" + "." + strconv.Itoa(i)) } + return err } } @@ -296,11 +314,15 @@ func (m *PVMInstanceReference) validateConsoleLanguage(formats strfmt.Registry) if m.ConsoleLanguage != nil { if err := m.ConsoleLanguage.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -326,11 +348,15 @@ func (m *PVMInstanceReference) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -353,11 +379,15 @@ func (m *PVMInstanceReference) validateFault(formats strfmt.Registry) error { if m.Fault != nil { if err := m.Fault.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("fault") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("fault") } + return err } } @@ -372,11 +402,15 @@ func (m *PVMInstanceReference) validateHealth(formats strfmt.Registry) error { if m.Health != nil { if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -423,11 +457,15 @@ func (m *PVMInstanceReference) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -446,7 +484,7 @@ func (m *PVMInstanceReference) validateOsType(formats strfmt.Registry) error { return nil } -var pVmInstanceReferenceTypeProcTypePropEnum []interface{} +var pVmInstanceReferenceTypeProcTypePropEnum []any func init() { var res []string @@ -517,11 +555,15 @@ func (m *PVMInstanceReference) validateSapProfile(formats strfmt.Registry) error if m.SapProfile != nil { if err := m.SapProfile.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -545,11 +587,15 @@ func (m *PVMInstanceReference) validateSoftwareLicenses(formats strfmt.Registry) if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -571,11 +617,15 @@ func (m *PVMInstanceReference) validateSrcs(formats strfmt.Registry) error { if m.Srcs[i][ii] != nil { if err := m.Srcs[i][ii].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } @@ -615,11 +665,15 @@ func (m *PVMInstanceReference) validateVirtualCores(formats strfmt.Registry) err if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -634,11 +688,15 @@ func (m *PVMInstanceReference) validateVirtualSerialNumber(formats strfmt.Regist if m.VirtualSerialNumber != nil { if err := m.VirtualSerialNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -646,6 +704,36 @@ func (m *PVMInstanceReference) validateVirtualSerialNumber(formats strfmt.Regist return nil } +func (m *PVMInstanceReference) validateVpmemVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolumes) { // not required + return nil + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this p VM instance reference based on the context it is used func (m *PVMInstanceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -694,6 +782,10 @@ func (m *PVMInstanceReference) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -711,11 +803,15 @@ func (m *PVMInstanceReference) contextValidateAddresses(ctx context.Context, for } if err := m.Addresses[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("addresses" + "." + strconv.Itoa(i)) } + return err } } @@ -734,11 +830,15 @@ func (m *PVMInstanceReference) contextValidateConsoleLanguage(ctx context.Contex } if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("consoleLanguage") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("consoleLanguage") } + return err } } @@ -753,11 +853,15 @@ func (m *PVMInstanceReference) contextValidateCrn(ctx context.Context, formats s } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -773,11 +877,15 @@ func (m *PVMInstanceReference) contextValidateFault(ctx context.Context, formats } if err := m.Fault.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("fault") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("fault") } + return err } } @@ -794,11 +902,15 @@ func (m *PVMInstanceReference) contextValidateHealth(ctx context.Context, format } if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -817,11 +929,15 @@ func (m *PVMInstanceReference) contextValidateNetworks(ctx context.Context, form } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -840,11 +956,15 @@ func (m *PVMInstanceReference) contextValidateSapProfile(ctx context.Context, fo } if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sapProfile") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sapProfile") } + return err } } @@ -861,11 +981,15 @@ func (m *PVMInstanceReference) contextValidateSoftwareLicenses(ctx context.Conte } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -886,11 +1010,15 @@ func (m *PVMInstanceReference) contextValidateSrcs(ctx context.Context, formats } if err := m.Srcs[i][ii].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) } + return err } } @@ -911,11 +1039,15 @@ func (m *PVMInstanceReference) contextValidateVirtualCores(ctx context.Context, } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -932,11 +1064,15 @@ func (m *PVMInstanceReference) contextValidateVirtualSerialNumber(ctx context.Co } if err := m.VirtualSerialNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -944,6 +1080,35 @@ func (m *PVMInstanceReference) contextValidateVirtualSerialNumber(ctx context.Co return nil } +func (m *PVMInstanceReference) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstanceReference) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go index 57fd301fab..587dfdb76a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -80,6 +81,9 @@ type PVMInstanceReferenceV2 struct { // Information about Virtual Serial Number assigned to the PVM Instance VirtualSerialNumber *GetServerVirtualSerialNumber `json:"virtualSerialNumber,omitempty"` + + // List of vPMEM volumes attached to this PVM Instance + VpmemVolumes []*VPMemVolumeReference `json:"vpmemVolumes,omitempty"` } // Validate validates this p VM instance reference v2 @@ -154,6 +158,10 @@ func (m *PVMInstanceReferenceV2) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -167,11 +175,15 @@ func (m *PVMInstanceReferenceV2) validateConfiguration(formats strfmt.Registry) if m.Configuration != nil { if err := m.Configuration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("configuration") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("configuration") } + return err } } @@ -187,11 +199,15 @@ func (m *PVMInstanceReferenceV2) validateCores(formats strfmt.Registry) error { if m.Cores != nil { if err := m.Cores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -217,11 +233,15 @@ func (m *PVMInstanceReferenceV2) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -236,11 +256,15 @@ func (m *PVMInstanceReferenceV2) validateDeployment(formats strfmt.Registry) err if m.Deployment != nil { if err := m.Deployment.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deployment") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deployment") } + return err } } @@ -255,11 +279,15 @@ func (m *PVMInstanceReferenceV2) validateHealth(formats strfmt.Registry) error { if m.Health != nil { if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -274,11 +302,15 @@ func (m *PVMInstanceReferenceV2) validateHost(formats strfmt.Registry) error { if m.Host != nil { if err := m.Host.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("host") } + return err } } @@ -312,11 +344,15 @@ func (m *PVMInstanceReferenceV2) validateMemory(formats strfmt.Registry) error { if m.Memory != nil { if err := m.Memory.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -346,11 +382,15 @@ func (m *PVMInstanceReferenceV2) validateNetworkPorts(formats strfmt.Registry) e if m.NetworkPorts[i] != nil { if err := m.NetworkPorts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkPorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkPorts" + "." + strconv.Itoa(i)) } + return err } } @@ -368,11 +408,15 @@ func (m *PVMInstanceReferenceV2) validateOperatingSystem(formats strfmt.Registry if m.OperatingSystem != nil { if err := m.OperatingSystem.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operatingSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operatingSystem") } + return err } } @@ -387,11 +431,15 @@ func (m *PVMInstanceReferenceV2) validatePlacementGroup(formats strfmt.Registry) if m.PlacementGroup != nil { if err := m.PlacementGroup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("placementGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("placementGroup") } + return err } } @@ -415,11 +463,15 @@ func (m *PVMInstanceReferenceV2) validateVirtualCores(formats strfmt.Registry) e if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -434,11 +486,15 @@ func (m *PVMInstanceReferenceV2) validateVirtualSerialNumber(formats strfmt.Regi if m.VirtualSerialNumber != nil { if err := m.VirtualSerialNumber.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -446,6 +502,36 @@ func (m *PVMInstanceReferenceV2) validateVirtualSerialNumber(formats strfmt.Regi return nil } +func (m *PVMInstanceReferenceV2) validateVpmemVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolumes) { // not required + return nil + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this p VM instance reference v2 based on the context it is used func (m *PVMInstanceReferenceV2) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -498,6 +584,10 @@ func (m *PVMInstanceReferenceV2) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -513,11 +603,15 @@ func (m *PVMInstanceReferenceV2) contextValidateConfiguration(ctx context.Contex } if err := m.Configuration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("configuration") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("configuration") } + return err } } @@ -530,11 +624,15 @@ func (m *PVMInstanceReferenceV2) contextValidateCores(ctx context.Context, forma if m.Cores != nil { if err := m.Cores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cores") } + return err } } @@ -549,11 +647,15 @@ func (m *PVMInstanceReferenceV2) contextValidateCrn(ctx context.Context, formats } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -565,11 +667,15 @@ func (m *PVMInstanceReferenceV2) contextValidateDeployment(ctx context.Context, if m.Deployment != nil { if err := m.Deployment.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deployment") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deployment") } + return err } } @@ -586,11 +692,15 @@ func (m *PVMInstanceReferenceV2) contextValidateHealth(ctx context.Context, form } if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("health") } + return err } } @@ -607,11 +717,15 @@ func (m *PVMInstanceReferenceV2) contextValidateHost(ctx context.Context, format } if err := m.Host.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("host") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("host") } + return err } } @@ -624,11 +738,15 @@ func (m *PVMInstanceReferenceV2) contextValidateMemory(ctx context.Context, form if m.Memory != nil { if err := m.Memory.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("memory") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("memory") } + return err } } @@ -647,11 +765,15 @@ func (m *PVMInstanceReferenceV2) contextValidateNetworkPorts(ctx context.Context } if err := m.NetworkPorts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkPorts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkPorts" + "." + strconv.Itoa(i)) } + return err } } @@ -666,11 +788,15 @@ func (m *PVMInstanceReferenceV2) contextValidateOperatingSystem(ctx context.Cont if m.OperatingSystem != nil { if err := m.OperatingSystem.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("operatingSystem") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("operatingSystem") } + return err } } @@ -687,11 +813,15 @@ func (m *PVMInstanceReferenceV2) contextValidatePlacementGroup(ctx context.Conte } if err := m.PlacementGroup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("placementGroup") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("placementGroup") } + return err } } @@ -708,11 +838,15 @@ func (m *PVMInstanceReferenceV2) contextValidateVirtualCores(ctx context.Context } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -729,11 +863,15 @@ func (m *PVMInstanceReferenceV2) contextValidateVirtualSerialNumber(ctx context. } if err := m.VirtualSerialNumber.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualSerialNumber") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualSerialNumber") } + return err } } @@ -741,6 +879,35 @@ func (m *PVMInstanceReferenceV2) contextValidateVirtualSerialNumber(ctx context. return nil } +func (m *PVMInstanceReferenceV2) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *PVMInstanceReferenceV2) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go index 56e06295da..00331d7eb4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -35,6 +36,9 @@ type PVMInstanceUpdate struct { // pin policy PinPolicy PinPolicy `json:"pinPolicy,omitempty"` + // Preferred processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // Processor type (dedicated, shared, capped) // Enum: ["dedicated","shared","capped"] ProcType string `json:"procType,omitempty"` @@ -95,11 +99,15 @@ func (m *PVMInstanceUpdate) validateCloudInitialization(formats strfmt.Registry) if m.CloudInitialization != nil { if err := m.CloudInitialization.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudInitialization") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudInitialization") } + return err } } @@ -113,18 +121,22 @@ func (m *PVMInstanceUpdate) validatePinPolicy(formats strfmt.Registry) error { } if err := m.PinPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } return nil } -var pVmInstanceUpdateTypeProcTypePropEnum []interface{} +var pVmInstanceUpdateTypeProcTypePropEnum []any func init() { var res []string @@ -176,11 +188,15 @@ func (m *PVMInstanceUpdate) validateSoftwareLicenses(formats strfmt.Registry) er if m.SoftwareLicenses != nil { if err := m.SoftwareLicenses.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -195,11 +211,15 @@ func (m *PVMInstanceUpdate) validateVirtualCores(formats strfmt.Registry) error if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -242,11 +262,15 @@ func (m *PVMInstanceUpdate) contextValidateCloudInitialization(ctx context.Conte } if err := m.CloudInitialization.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudInitialization") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudInitialization") } + return err } } @@ -261,11 +285,15 @@ func (m *PVMInstanceUpdate) contextValidatePinPolicy(ctx context.Context, format } if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } @@ -281,11 +309,15 @@ func (m *PVMInstanceUpdate) contextValidateSoftwareLicenses(ctx context.Context, } if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareLicenses") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareLicenses") } + return err } } @@ -302,11 +334,15 @@ func (m *PVMInstanceUpdate) contextValidateVirtualCores(ctx context.Context, for } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go index 4a373de247..bc13974767 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,6 +30,9 @@ type PVMInstanceUpdateResponse struct { // pin policy PinPolicy PinPolicy `json:"pinPolicy,omitempty"` + // Preferred processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // Processor type (dedicated, shared, capped) // Enum: ["dedicated","shared","capped"] ProcType string `json:"procType,omitempty"` @@ -77,18 +81,22 @@ func (m *PVMInstanceUpdateResponse) validatePinPolicy(formats strfmt.Registry) e } if err := m.PinPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } return nil } -var pVmInstanceUpdateResponseTypeProcTypePropEnum []interface{} +var pVmInstanceUpdateResponseTypeProcTypePropEnum []any func init() { var res []string @@ -140,11 +148,15 @@ func (m *PVMInstanceUpdateResponse) validateVirtualCores(formats strfmt.Registry if m.VirtualCores != nil { if err := m.VirtualCores.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } @@ -177,11 +189,15 @@ func (m *PVMInstanceUpdateResponse) contextValidatePinPolicy(ctx context.Context } if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } @@ -197,11 +213,15 @@ func (m *PVMInstanceUpdateResponse) contextValidateVirtualCores(ctx context.Cont } if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("virtualCores") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("virtualCores") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go index 840f0d507c..4051e03b26 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go @@ -56,7 +56,7 @@ func (m *PVMInstanceV2NetworkPort) Validate(formats strfmt.Registry) error { return nil } -var pVmInstanceV2NetworkPortTypeIPProtocolPropEnum []interface{} +var pVmInstanceV2NetworkPortTypeIPProtocolPropEnum []any func init() { var res []string @@ -98,7 +98,7 @@ func (m *PVMInstanceV2NetworkPort) validateIPProtocol(formats strfmt.Registry) e return nil } -var pVmInstanceV2NetworkPortTypeTypePropEnum []interface{} +var pVmInstanceV2NetworkPortTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go index 1d0f5513a7..abdc1eb6a3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PVMInstances) validatePvmInstances(formats strfmt.Registry) error { if m.PvmInstances[i] != nil { if err := m.PvmInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PVMInstances) contextValidatePvmInstances(ctx context.Context, formats } if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go index 84e3e29958..fd9a3809fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PVMInstancesV2) validatePvmInstances(formats strfmt.Registry) error { if m.PvmInstances[i] != nil { if err := m.PvmInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PVMInstancesV2) contextValidatePvmInstances(ctx context.Context, format } if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interface.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interface.go new file mode 100644 index 0000000000..62ac7d09bd --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interface.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PeerInterface peer interface +// +// swagger:model PeerInterface +type PeerInterface struct { + + // device ID of the peer interface + // Example: switch1 + // Required: true + DeviceID *string `json:"deviceID"` + + // peer interface name + // Example: Peer121 + // Required: true + Name *string `json:"name"` + + // peer interface ID + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 + // Required: true + PeerInterfaceID *string `json:"peerInterfaceID"` + + // type of peer interface + // Example: interface + // Required: true + // Enum: ["interface","lag"] + PeerType *string `json:"peerType"` + + // port ID of the peer interface + // Example: po10 + // Required: true + PortID *string `json:"portID"` +} + +// Validate validates this peer interface +func (m *PeerInterface) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeviceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePeerInterfaceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePeerType(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePortID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PeerInterface) validateDeviceID(formats strfmt.Registry) error { + + if err := validate.Required("deviceID", "body", m.DeviceID); err != nil { + return err + } + + return nil +} + +func (m *PeerInterface) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *PeerInterface) validatePeerInterfaceID(formats strfmt.Registry) error { + + if err := validate.Required("peerInterfaceID", "body", m.PeerInterfaceID); err != nil { + return err + } + + return nil +} + +var peerInterfaceTypePeerTypePropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["interface","lag"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + peerInterfaceTypePeerTypePropEnum = append(peerInterfaceTypePeerTypePropEnum, v) + } +} + +const ( + + // PeerInterfacePeerTypeInterface captures enum value "interface" + PeerInterfacePeerTypeInterface string = "interface" + + // PeerInterfacePeerTypeLag captures enum value "lag" + PeerInterfacePeerTypeLag string = "lag" +) + +// prop value enum +func (m *PeerInterface) validatePeerTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, peerInterfaceTypePeerTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *PeerInterface) validatePeerType(formats strfmt.Registry) error { + + if err := validate.Required("peerType", "body", m.PeerType); err != nil { + return err + } + + // value enum + if err := m.validatePeerTypeEnum("peerType", "body", *m.PeerType); err != nil { + return err + } + + return nil +} + +func (m *PeerInterface) validatePortID(formats strfmt.Registry) error { + + if err := validate.Required("portID", "body", m.PortID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this peer interface based on context it is used +func (m *PeerInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PeerInterface) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PeerInterface) UnmarshalBinary(b []byte) error { + var res PeerInterface + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interfaces.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interfaces.go new file mode 100644 index 0000000000..fe60ada66d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/peer_interfaces.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PeerInterfaces peer interfaces +// +// swagger:model PeerInterfaces +type PeerInterfaces []*PeerInterface + +// Validate validates this peer interfaces +func (m PeerInterfaces) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName(strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName(strconv.Itoa(i)) + } + + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this peer interfaces based on the context it is used +func (m PeerInterfaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + + if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + + if err := m[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName(strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName(strconv.Itoa(i)) + } + + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pin_policy.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pin_policy.go index 9a1f4e4526..79df523251 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pin_policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pin_policy.go @@ -41,7 +41,7 @@ const ( ) // for schema -var pinPolicyEnum []interface{} +var pinPolicyEnum []any func init() { var res []PinPolicy diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go index cf51a31d40..0aad4e09c3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -84,11 +85,15 @@ func (m *PlacementGroup) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -122,7 +127,7 @@ func (m *PlacementGroup) validateName(formats strfmt.Registry) error { return nil } -var placementGroupTypePolicyPropEnum []interface{} +var placementGroupTypePolicyPropEnum []any func init() { var res []string @@ -171,11 +176,15 @@ func (m *PlacementGroup) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -207,11 +216,15 @@ func (m *PlacementGroup) contextValidateCrn(ctx context.Context, formats strfmt. } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -221,11 +234,15 @@ func (m *PlacementGroup) contextValidateCrn(ctx context.Context, formats strfmt. func (m *PlacementGroup) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go index d12ec8c044..a7b4a0e77a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_group_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -64,7 +65,7 @@ func (m *PlacementGroupCreate) validateName(formats strfmt.Registry) error { return nil } -var placementGroupCreateTypePolicyPropEnum []interface{} +var placementGroupCreateTypePolicyPropEnum []any func init() { var res []string @@ -113,11 +114,15 @@ func (m *PlacementGroupCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -141,11 +146,15 @@ func (m *PlacementGroupCreate) ContextValidate(ctx context.Context, formats strf func (m *PlacementGroupCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go index f0912c9b2e..0411838172 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PlacementGroups) validatePlacementGroups(formats strfmt.Registry) error if m.PlacementGroups[i] != nil { if err := m.PlacementGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("placementGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("placementGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PlacementGroups) contextValidatePlacementGroups(ctx context.Context, fo } if err := m.PlacementGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("placementGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("placementGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go index c74c46fb94..bb5c7247bd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -104,11 +105,15 @@ func (m *Plan) validateSchemas(formats strfmt.Registry) error { if m.Schemas != nil { if err := m.Schemas.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("schemas") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("schemas") } + return err } } @@ -139,11 +144,15 @@ func (m *Plan) contextValidateSchemas(ctx context.Context, formats strfmt.Regist } if err := m.Schemas.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("schemas") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("schemas") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go index c0a4e2a32a..82f39c8129 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -57,11 +58,15 @@ func (m *PodCapacity) validatePodData(formats strfmt.Registry) error { if m.PodData != nil { if err := m.PodData.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("PodData") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("PodData") } + return err } } @@ -76,11 +81,15 @@ func (m *PodCapacity) validateStorageControllers(formats strfmt.Registry) error if m.StorageControllers != nil { if err := m.StorageControllers.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("StorageControllers") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("StorageControllers") } + return err } } @@ -95,11 +104,15 @@ func (m *PodCapacity) validateSystemPools(formats strfmt.Registry) error { if m.SystemPools != nil { if err := m.SystemPools.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("SystemPools") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("SystemPools") } + return err } } @@ -138,11 +151,15 @@ func (m *PodCapacity) contextValidatePodData(ctx context.Context, formats strfmt } if err := m.PodData.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("PodData") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("PodData") } + return err } } @@ -157,11 +174,15 @@ func (m *PodCapacity) contextValidateStorageControllers(ctx context.Context, for } if err := m.StorageControllers.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("StorageControllers") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("StorageControllers") } + return err } @@ -175,11 +196,15 @@ func (m *PodCapacity) contextValidateSystemPools(ctx context.Context, formats st } if err := m.SystemPools.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("SystemPools") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("SystemPools") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_edge_router_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_edge_router_action.go index 428c4ef426..a22ea5abef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_edge_router_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_edge_router_action.go @@ -40,7 +40,7 @@ func (m *PowerEdgeRouterAction) Validate(formats strfmt.Registry) error { return nil } -var powerEdgeRouterActionTypeActionPropEnum []interface{} +var powerEdgeRouterActionTypeActionPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instance.go index c8c8617507..15aeee62ba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instance.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -131,11 +132,15 @@ func (m *PowerVSInstance) validateCapabilities(formats strfmt.Registry) error { if m.Capabilities != nil { if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } } @@ -241,11 +246,15 @@ func (m *PowerVSInstance) ContextValidate(ctx context.Context, formats strfmt.Re func (m *PowerVSInstance) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go index e881a1cfc4..4d5e409db6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *PowerVSInstances) validatePowerVsInstances(formats strfmt.Registry) err if m.PowerVsInstances[i] != nil { if err := m.PowerVsInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *PowerVSInstances) contextValidatePowerVsInstances(ctx context.Context, } if err := m.PowerVsInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go index 24a3856892..1d60ff929f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go @@ -49,7 +49,7 @@ func (m *PvmInstanceDeployment) Validate(formats strfmt.Registry) error { return nil } -var pvmInstanceDeploymentTypeProcessorModePropEnum []interface{} +var pvmInstanceDeploymentTypeProcessorModePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go index 3635ac973a..a1abae8a60 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m RegionStorageTiers) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m RegionStorageTiers) ContextValidate(ctx context.Context, formats strfmt. } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go index 3498cc66c8..ef2a560ab8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m RegionStorageTypes) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m RegionStorageTypes) ContextValidate(ctx context.Context, formats strfmt. } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_service.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_service.go index c16beb90d0..2826cf4eb1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_service.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_service.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -69,11 +70,15 @@ func (m *ReplicationService) validateTargetLocations(formats strfmt.Registry) er if m.TargetLocations[i] != nil { if err := m.TargetLocations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("targetLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("targetLocations" + "." + strconv.Itoa(i)) } + return err } } @@ -108,11 +113,15 @@ func (m *ReplicationService) contextValidateTargetLocations(ctx context.Context, } if err := m.TargetLocations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("targetLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("targetLocations" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go index c3b25fe875..8d63d06a5e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m ReplicationSites) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m ReplicationSites) ContextValidate(ctx context.Context, formats strfmt.Re } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_target_location.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_target_location.go index 453edf4881..689b638a9c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_target_location.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_target_location.go @@ -42,7 +42,7 @@ func (m *ReplicationTargetLocation) Validate(formats strfmt.Registry) error { return nil } -var replicationTargetLocationTypeStatusPropEnum []interface{} +var replicationTargetLocationTypeStatusPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/resource_access.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/resource_access.go index b1130aa017..e8acb37346 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/resource_access.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/resource_access.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m ResourceAccess) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route.go index 2d2b107d45..7c9db9b253 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -128,7 +129,7 @@ func (m *Route) Validate(formats strfmt.Registry) error { return nil } -var routeTypeActionPropEnum []interface{} +var routeTypeActionPropEnum []any func init() { var res []string @@ -168,7 +169,7 @@ func (m *Route) validateAction(formats strfmt.Registry) error { return nil } -var routeTypeAdvertisePropEnum []interface{} +var routeTypeAdvertisePropEnum []any func init() { var res []string @@ -229,7 +230,7 @@ func (m *Route) validateDestination(formats strfmt.Registry) error { return nil } -var routeTypeDestinationTypePropEnum []interface{} +var routeTypeDestinationTypePropEnum []any func init() { var res []string @@ -304,7 +305,7 @@ func (m *Route) validateNextHop(formats strfmt.Registry) error { return nil } -var routeTypeNextHopTypePropEnum []interface{} +var routeTypeNextHopTypePropEnum []any func init() { var res []string @@ -344,7 +345,7 @@ func (m *Route) validateNextHopType(formats strfmt.Registry) error { return nil } -var routeTypeStatePropEnum []interface{} +var routeTypeStatePropEnum []any func init() { var res []string @@ -396,11 +397,15 @@ func (m *Route) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -424,11 +429,15 @@ func (m *Route) ContextValidate(ctx context.Context, formats strfmt.Registry) er func (m *Route) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_create.go index 6513fe3383..95804a94ec 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -99,7 +100,7 @@ func (m *RouteCreate) Validate(formats strfmt.Registry) error { return nil } -var routeCreateTypeActionPropEnum []interface{} +var routeCreateTypeActionPropEnum []any func init() { var res []string @@ -138,7 +139,7 @@ func (m *RouteCreate) validateAction(formats strfmt.Registry) error { return nil } -var routeCreateTypeAdvertisePropEnum []interface{} +var routeCreateTypeAdvertisePropEnum []any func init() { var res []string @@ -189,7 +190,7 @@ func (m *RouteCreate) validateDestination(formats strfmt.Registry) error { return nil } -var routeCreateTypeDestinationTypePropEnum []interface{} +var routeCreateTypeDestinationTypePropEnum []any func init() { var res []string @@ -254,7 +255,7 @@ func (m *RouteCreate) validateNextHop(formats strfmt.Registry) error { return nil } -var routeCreateTypeNextHopTypePropEnum []interface{} +var routeCreateTypeNextHopTypePropEnum []any func init() { var res []string @@ -299,11 +300,15 @@ func (m *RouteCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -327,11 +332,15 @@ func (m *RouteCreate) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *RouteCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter.go new file mode 100644 index 0000000000..c96ecb6020 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter.go @@ -0,0 +1,367 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RouteFilter route filter +// +// swagger:model RouteFilter +type RouteFilter struct { + + // The minimum matching length of the prefix-set(1 ≤ value ≤ 32 value ≤ GE) + // Example: 25 + // Maximum: 32 + // Minimum: 1 + GE *int64 `json:"GE,omitempty"` + + // The maximum matching length of the prefix-set( 1 ≤ value ≤ 32 value >= GE) + // Example: 30 + // Maximum: 32 + // Minimum: 1 + LE *int64 `json:"LE,omitempty"` + + // action of the filter + // * allow: allow + // * deny: deny + // + // Required: true + // Enum: ["allow","deny"] + Action *string `json:"action"` + + // time stamp for create route filter + // Required: true + CreationDate *string `json:"creationDate"` + + // direction of the filter + // * import - import the routes + // * export - export the routes + // + // Required: true + // Enum: ["import","export"] + Direction *string `json:"direction"` + + // error description + // Required: true + Error *string `json:"error"` + + // priority or order of the filter + // Example: 10 + // Required: true + Index *int64 `json:"index"` + + // IP prefix representing an address and mask length of the prefix-set + // Example: 192.168.91.0/24 + // Required: true + Prefix *string `json:"prefix"` + + // route filter ID + // Example: 031ab7da-bca6-493f-ac55-1a2a26f19160 + // Required: true + RouteFilterID *string `json:"routeFilterID"` + + // status of the route filter + // Example: active + // Required: true + // Enum: ["active","configuring","removing","error","updating"] + State *string `json:"state"` +} + +// Validate validates this route filter +func (m *RouteFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGE(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLE(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDirection(formats); err != nil { + res = append(res, err) + } + + if err := m.validateError(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIndex(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrefix(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteFilterID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RouteFilter) validateGE(formats strfmt.Registry) error { + if swag.IsZero(m.GE) { // not required + return nil + } + + if err := validate.MinimumInt("GE", "body", *m.GE, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("GE", "body", *m.GE, 32, false); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validateLE(formats strfmt.Registry) error { + if swag.IsZero(m.LE) { // not required + return nil + } + + if err := validate.MinimumInt("LE", "body", *m.LE, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("LE", "body", *m.LE, 32, false); err != nil { + return err + } + + return nil +} + +var routeFilterTypeActionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routeFilterTypeActionPropEnum = append(routeFilterTypeActionPropEnum, v) + } +} + +const ( + + // RouteFilterActionAllow captures enum value "allow" + RouteFilterActionAllow string = "allow" + + // RouteFilterActionDeny captures enum value "deny" + RouteFilterActionDeny string = "deny" +) + +// prop value enum +func (m *RouteFilter) validateActionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routeFilterTypeActionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *RouteFilter) validateAction(formats strfmt.Registry) error { + + if err := validate.Required("action", "body", m.Action); err != nil { + return err + } + + // value enum + if err := m.validateActionEnum("action", "body", *m.Action); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validateCreationDate(formats strfmt.Registry) error { + + if err := validate.Required("creationDate", "body", m.CreationDate); err != nil { + return err + } + + return nil +} + +var routeFilterTypeDirectionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["import","export"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routeFilterTypeDirectionPropEnum = append(routeFilterTypeDirectionPropEnum, v) + } +} + +const ( + + // RouteFilterDirectionImport captures enum value "import" + RouteFilterDirectionImport string = "import" + + // RouteFilterDirectionExport captures enum value "export" + RouteFilterDirectionExport string = "export" +) + +// prop value enum +func (m *RouteFilter) validateDirectionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routeFilterTypeDirectionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *RouteFilter) validateDirection(formats strfmt.Registry) error { + + if err := validate.Required("direction", "body", m.Direction); err != nil { + return err + } + + // value enum + if err := m.validateDirectionEnum("direction", "body", *m.Direction); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validateError(formats strfmt.Registry) error { + + if err := validate.Required("error", "body", m.Error); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validateIndex(formats strfmt.Registry) error { + + if err := validate.Required("index", "body", m.Index); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validatePrefix(formats strfmt.Registry) error { + + if err := validate.Required("prefix", "body", m.Prefix); err != nil { + return err + } + + return nil +} + +func (m *RouteFilter) validateRouteFilterID(formats strfmt.Registry) error { + + if err := validate.Required("routeFilterID", "body", m.RouteFilterID); err != nil { + return err + } + + return nil +} + +var routeFilterTypeStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","configuring","removing","error","updating"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routeFilterTypeStatePropEnum = append(routeFilterTypeStatePropEnum, v) + } +} + +const ( + + // RouteFilterStateActive captures enum value "active" + RouteFilterStateActive string = "active" + + // RouteFilterStateConfiguring captures enum value "configuring" + RouteFilterStateConfiguring string = "configuring" + + // RouteFilterStateRemoving captures enum value "removing" + RouteFilterStateRemoving string = "removing" + + // RouteFilterStateError captures enum value "error" + RouteFilterStateError string = "error" + + // RouteFilterStateUpdating captures enum value "updating" + RouteFilterStateUpdating string = "updating" +) + +// prop value enum +func (m *RouteFilter) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routeFilterTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *RouteFilter) validateState(formats strfmt.Registry) error { + + if err := validate.Required("state", "body", m.State); err != nil { + return err + } + + // value enum + if err := m.validateStateEnum("state", "body", *m.State); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this route filter based on context it is used +func (m *RouteFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RouteFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RouteFilter) UnmarshalBinary(b []byte) error { + var res RouteFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter_create.go new file mode 100644 index 0000000000..6c7aea4fa7 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_filter_create.go @@ -0,0 +1,261 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RouteFilterCreate route filter create +// +// swagger:model RouteFilterCreate +type RouteFilterCreate struct { + + // The minimum matching length of the prefix-set(1 ≤ value ≤ 32 & value ≤ LE) + // Example: 25 + // Maximum: 32 + // Minimum: 1 + GE int64 `json:"GE,omitempty"` + + // The maximum matching length of the prefix-set( 1 ≤ value ≤ 32 & value >= GE) + // Example: 30 + // Maximum: 32 + // Minimum: 1 + LE int64 `json:"LE,omitempty"` + + // action of the filter + // * allow: allow + // * deny: deny + // + // Enum: ["allow","deny"] + Action *string `json:"action,omitempty"` + + // direction of the filter + // * import - import the routes + // * export - export the routes + // + // Required: true + // Enum: ["import","export"] + Direction *string `json:"direction"` + + // priority or order of the filter + // Example: 10 + // Required: true + // Maximum: 1e+07 + // Minimum: 1 + Index *int64 `json:"index"` + + // IP prefix representing an address and mask length of the prefix-set + // Example: 192.168.91.0/24 + // Required: true + Prefix *string `json:"prefix"` +} + +// Validate validates this route filter create +func (m *RouteFilterCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGE(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLE(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDirection(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIndex(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrefix(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RouteFilterCreate) validateGE(formats strfmt.Registry) error { + if swag.IsZero(m.GE) { // not required + return nil + } + + if err := validate.MinimumInt("GE", "body", m.GE, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("GE", "body", m.GE, 32, false); err != nil { + return err + } + + return nil +} + +func (m *RouteFilterCreate) validateLE(formats strfmt.Registry) error { + if swag.IsZero(m.LE) { // not required + return nil + } + + if err := validate.MinimumInt("LE", "body", m.LE, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("LE", "body", m.LE, 32, false); err != nil { + return err + } + + return nil +} + +var routeFilterCreateTypeActionPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["allow","deny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routeFilterCreateTypeActionPropEnum = append(routeFilterCreateTypeActionPropEnum, v) + } +} + +const ( + + // RouteFilterCreateActionAllow captures enum value "allow" + RouteFilterCreateActionAllow string = "allow" + + // RouteFilterCreateActionDeny captures enum value "deny" + RouteFilterCreateActionDeny string = "deny" +) + +// prop value enum +func (m *RouteFilterCreate) validateActionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routeFilterCreateTypeActionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *RouteFilterCreate) validateAction(formats strfmt.Registry) error { + if swag.IsZero(m.Action) { // not required + return nil + } + + // value enum + if err := m.validateActionEnum("action", "body", *m.Action); err != nil { + return err + } + + return nil +} + +var routeFilterCreateTypeDirectionPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["import","export"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + routeFilterCreateTypeDirectionPropEnum = append(routeFilterCreateTypeDirectionPropEnum, v) + } +} + +const ( + + // RouteFilterCreateDirectionImport captures enum value "import" + RouteFilterCreateDirectionImport string = "import" + + // RouteFilterCreateDirectionExport captures enum value "export" + RouteFilterCreateDirectionExport string = "export" +) + +// prop value enum +func (m *RouteFilterCreate) validateDirectionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, routeFilterCreateTypeDirectionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *RouteFilterCreate) validateDirection(formats strfmt.Registry) error { + + if err := validate.Required("direction", "body", m.Direction); err != nil { + return err + } + + // value enum + if err := m.validateDirectionEnum("direction", "body", *m.Direction); err != nil { + return err + } + + return nil +} + +func (m *RouteFilterCreate) validateIndex(formats strfmt.Registry) error { + + if err := validate.Required("index", "body", m.Index); err != nil { + return err + } + + if err := validate.MinimumInt("index", "body", *m.Index, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("index", "body", *m.Index, 1e+07, false); err != nil { + return err + } + + return nil +} + +func (m *RouteFilterCreate) validatePrefix(formats strfmt.Registry) error { + + if err := validate.Required("prefix", "body", m.Prefix); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this route filter create based on context it is used +func (m *RouteFilterCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RouteFilterCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RouteFilterCreate) UnmarshalBinary(b []byte) error { + var res RouteFilterCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report.go index 7d21b2c3be..0c706a9366 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *RouteReport) validateRoutes(formats strfmt.Registry) error { if m.Routes[i] != nil { if err := m.Routes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("routes" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *RouteReport) contextValidateRoutes(ctx context.Context, formats strfmt. } if err := m.Routes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("routes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report_route.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report_route.go index 0f1f870923..b0e772fa9c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report_route.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/route_report_route.go @@ -57,7 +57,7 @@ func (m *RouteReportRoute) validateDestination(formats strfmt.Registry) error { return nil } -var routeReportRouteTypeTypePropEnum []interface{} +var routeReportRouteTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/routes.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/routes.go index 1f5cd27773..37f5f411da 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/routes.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/routes.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Routes) validateRoutes(formats strfmt.Registry) error { if m.Routes[i] != nil { if err := m.Routes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("routes" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Routes) contextValidateRoutes(ctx context.Context, formats strfmt.Regis } if err := m.Routes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("routes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("routes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go index 1659a9292e..3d5caa1e85 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -50,6 +51,9 @@ type SAPCreate struct { // The placement group for the server PlacementGroup string `json:"placementGroup,omitempty"` + // Preferred processor compatibility mode + PreferredProcessorCompatibilityMode string `json:"preferredProcessorCompatibilityMode,omitempty"` + // SAP Profile ID for the amount of cores and memory // Required: true // Pattern: ^[\s]*[A-Za-z][A-Za-z0-9\-]{3,}$ @@ -73,7 +77,7 @@ type SAPCreate struct { // Storage type for server deployment; if storageType is not provided the storage type will default to 'tier3'. StorageType string `json:"storageType,omitempty"` - // System type used to host the instance. Only e880, e980, e1080 are supported + // System type used to host the instance. Only e980, s1022, e1050, e1080, s1122, e1150, and e1180 are supported SysType string `json:"sysType,omitempty"` // Cloud init user defined data; For FLS, only cloud-config user-data is supported and data must not be compressed or exceed 63K @@ -84,6 +88,9 @@ type SAPCreate struct { // List of Volume IDs to attach to the pvm-instance on creation VolumeIDs []string `json:"volumeIDs"` + + // The vPMEM volumes information. Only one volume is supported at this time. + VpmemVolumes []*VPMemVolumeCreate `json:"vpmemVolumes"` } // Validate validates this s a p create @@ -126,6 +133,10 @@ func (m *SAPCreate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -139,11 +150,15 @@ func (m *SAPCreate) validateDeploymentTarget(formats strfmt.Registry) error { if m.DeploymentTarget != nil { if err := m.DeploymentTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deploymentTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deploymentTarget") } + return err } } @@ -167,11 +182,15 @@ func (m *SAPCreate) validateInstances(formats strfmt.Registry) error { if m.Instances != nil { if err := m.Instances.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("instances") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("instances") } + return err } } @@ -201,11 +220,15 @@ func (m *SAPCreate) validateNetworks(formats strfmt.Registry) error { if m.Networks[i] != nil { if err := m.Networks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -221,11 +244,15 @@ func (m *SAPCreate) validatePinPolicy(formats strfmt.Registry) error { } if err := m.PinPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } @@ -252,11 +279,15 @@ func (m *SAPCreate) validateStorageAffinity(formats strfmt.Registry) error { if m.StorageAffinity != nil { if err := m.StorageAffinity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -270,17 +301,51 @@ func (m *SAPCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } return nil } +func (m *SAPCreate) validateVpmemVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolumes) { // not required + return nil + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this s a p create based on the context it is used func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -309,6 +374,10 @@ func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -324,11 +393,15 @@ func (m *SAPCreate) contextValidateDeploymentTarget(ctx context.Context, formats } if err := m.DeploymentTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deploymentTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deploymentTarget") } + return err } } @@ -345,11 +418,15 @@ func (m *SAPCreate) contextValidateInstances(ctx context.Context, formats strfmt } if err := m.Instances.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("instances") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("instances") } + return err } } @@ -368,11 +445,15 @@ func (m *SAPCreate) contextValidateNetworks(ctx context.Context, formats strfmt. } if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networks" + "." + strconv.Itoa(i)) } + return err } } @@ -389,11 +470,15 @@ func (m *SAPCreate) contextValidatePinPolicy(ctx context.Context, formats strfmt } if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pinPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pinPolicy") } + return err } @@ -409,11 +494,15 @@ func (m *SAPCreate) contextValidateStorageAffinity(ctx context.Context, formats } if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageAffinity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageAffinity") } + return err } } @@ -424,17 +513,50 @@ func (m *SAPCreate) contextValidateStorageAffinity(ctx context.Context, formats func (m *SAPCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } return nil } +func (m *SAPCreate) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *SAPCreate) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profile.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profile.go index 0ae04109bd..9cc93084f5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profile.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profile.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -57,6 +58,9 @@ type SAPProfile struct { // Enum: ["balanced","compute","memory","ultra-memory","small","sap-rise","sap-rise-app"] Type *string `json:"type"` + // vpmem volume + VpmemVolume *SAPProfileVpmemVolume `json:"vpmemVolume,omitempty"` + // List of supported workload types WorkloadTypes []string `json:"workloadTypes"` } @@ -89,6 +93,10 @@ func (m *SAPProfile) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVpmemVolume(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -131,7 +139,7 @@ func (m *SAPProfile) validateProfileID(formats strfmt.Registry) error { return nil } -var sAPProfileTypeSmtModePropEnum []interface{} +var sAPProfileTypeSmtModePropEnum []any func init() { var res []int64 @@ -164,7 +172,7 @@ func (m *SAPProfile) validateSmtMode(formats strfmt.Registry) error { return nil } -var sAPProfileTypeTypePropEnum []interface{} +var sAPProfileTypeTypePropEnum []any func init() { var res []string @@ -222,8 +230,65 @@ func (m *SAPProfile) validateType(formats strfmt.Registry) error { return nil } -// ContextValidate validates this s a p profile based on context it is used +func (m *SAPProfile) validateVpmemVolume(formats strfmt.Registry) error { + if swag.IsZero(m.VpmemVolume) { // not required + return nil + } + + if m.VpmemVolume != nil { + if err := m.VpmemVolume.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolume") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolume") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this s a p profile based on the context it is used func (m *SAPProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVpmemVolume(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SAPProfile) contextValidateVpmemVolume(ctx context.Context, formats strfmt.Registry) error { + + if m.VpmemVolume != nil { + + if swag.IsZero(m.VpmemVolume) { // not required + return nil + } + + if err := m.VpmemVolume.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolume") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolume") + } + + return err + } + } + return nil } @@ -244,3 +309,43 @@ func (m *SAPProfile) UnmarshalBinary(b []byte) error { *m = res return nil } + +// SAPProfileVpmemVolume vPMEM volume details for the profile +// +// swagger:model SAPProfileVpmemVolume +type SAPProfileVpmemVolume struct { + + // Maximum percent of memory to be assigned for carved out vPMEM volume + MaxPercent int64 `json:"maxPercent,omitempty"` + + // Minimum percent of memory to be assigned for carved out vPMEM volume + MinPercent int64 `json:"minPercent,omitempty"` +} + +// Validate validates this s a p profile vpmem volume +func (m *SAPProfileVpmemVolume) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this s a p profile vpmem volume based on context it is used +func (m *SAPProfileVpmemVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SAPProfileVpmemVolume) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SAPProfileVpmemVolume) UnmarshalBinary(b []byte) error { + var res SAPProfileVpmemVolume + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go index f094b2b213..33582e0163 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *SAPProfiles) validateProfiles(formats strfmt.Registry) error { if m.Profiles[i] != nil { if err := m.Profiles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *SAPProfiles) contextValidateProfiles(ctx context.Context, formats strfm } if err := m.Profiles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("profiles" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group.go index d85567fc33..037b2a0acc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -77,11 +78,15 @@ func (m *SPPPlacementGroup) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -121,11 +126,15 @@ func (m *SPPPlacementGroup) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -157,11 +166,15 @@ func (m *SPPPlacementGroup) contextValidateCrn(ctx context.Context, formats strf } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -171,11 +184,15 @@ func (m *SPPPlacementGroup) contextValidateCrn(ctx context.Context, formats strf func (m *SPPPlacementGroup) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group_create.go index a69cbbb19d..4817fa8e52 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_group_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -79,7 +80,7 @@ func (m *SPPPlacementGroupCreate) validateName(formats strfmt.Registry) error { return nil } -var sPPPlacementGroupCreateTypePolicyPropEnum []interface{} +var sPPPlacementGroupCreateTypePolicyPropEnum []any func init() { var res []string @@ -128,11 +129,15 @@ func (m *SPPPlacementGroupCreate) validateUserTags(formats strfmt.Registry) erro } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -156,11 +161,15 @@ func (m *SPPPlacementGroupCreate) ContextValidate(ctx context.Context, formats s func (m *SPPPlacementGroupCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go index 82d9be42da..023c0d951d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *SPPPlacementGroups) validateSppPlacementGroups(formats strfmt.Registry) if m.SppPlacementGroups[i] != nil { if err := m.SppPlacementGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sppPlacementGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sppPlacementGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *SPPPlacementGroups) contextValidateSppPlacementGroups(ctx context.Conte } if err := m.SppPlacementGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sppPlacementGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sppPlacementGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go index f4ba396b35..c5c45188af 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -50,11 +51,15 @@ func (m *SchemasObject) validateServiceBinding(formats strfmt.Registry) error { if m.ServiceBinding != nil { if err := m.ServiceBinding.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("service_binding") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("service_binding") } + return err } } @@ -69,11 +74,15 @@ func (m *SchemasObject) validateServiceInstance(formats strfmt.Registry) error { if m.ServiceInstance != nil { if err := m.ServiceInstance.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("service_instance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("service_instance") } + return err } } @@ -108,11 +117,15 @@ func (m *SchemasObject) contextValidateServiceBinding(ctx context.Context, forma } if err := m.ServiceBinding.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("service_binding") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("service_binding") } + return err } } @@ -129,11 +142,15 @@ func (m *SchemasObject) contextValidateServiceInstance(ctx context.Context, form } if err := m.ServiceInstance.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("service_instance") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("service_instance") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go index 3e2344dff6..ffef46bde7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -123,11 +124,15 @@ func (m *Service) validateDashboardClient(formats strfmt.Registry) error { if m.DashboardClient != nil { if err := m.DashboardClient.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("dashboard_client") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("dashboard_client") } + return err } } @@ -175,11 +180,15 @@ func (m *Service) validatePlans(formats strfmt.Registry) error { if m.Plans[i] != nil { if err := m.Plans[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("plans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("plans" + "." + strconv.Itoa(i)) } + return err } } @@ -189,7 +198,7 @@ func (m *Service) validatePlans(formats strfmt.Registry) error { return nil } -var serviceRequiresItemsEnum []interface{} +var serviceRequiresItemsEnum []any func init() { var res []string @@ -252,11 +261,15 @@ func (m *Service) contextValidateDashboardClient(ctx context.Context, formats st } if err := m.DashboardClient.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("dashboard_client") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("dashboard_client") } + return err } } @@ -275,11 +288,15 @@ func (m *Service) contextValidatePlans(ctx context.Context, formats strfmt.Regis } if err := m.Plans[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("plans" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("plans" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go index 475324bc27..02d92850ef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -68,11 +69,15 @@ func (m *ServiceAuthenticationInfo) validateCapabilities(formats strfmt.Registry if m.Capabilities != nil { if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } } @@ -106,11 +111,15 @@ func (m *ServiceAuthenticationInfo) validateToken(formats strfmt.Registry) error if m.Token != nil { if err := m.Token.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } @@ -143,11 +152,15 @@ func (m *ServiceAuthenticationInfo) contextValidateCapabilities(ctx context.Cont } if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } @@ -159,11 +172,15 @@ func (m *ServiceAuthenticationInfo) contextValidateToken(ctx context.Context, fo if m.Token != nil { if err := m.Token.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go index fbbc7f645d..558369e83f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -58,11 +59,15 @@ func (m *ServiceBinding) validateVolumeMounts(formats strfmt.Registry) error { if m.VolumeMounts[i] != nil { if err := m.VolumeMounts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) } + return err } } @@ -97,11 +102,15 @@ func (m *ServiceBinding) contextValidateVolumeMounts(ctx context.Context, format } if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go index 8c304bb1ba..be37c8ceba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -69,11 +70,15 @@ func (m *ServiceBindingRequest) validateBindResource(formats strfmt.Registry) er if m.BindResource != nil { if err := m.BindResource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("bind_resource") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("bind_resource") } + return err } } @@ -122,11 +127,15 @@ func (m *ServiceBindingRequest) contextValidateBindResource(ctx context.Context, } if err := m.BindResource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("bind_resource") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("bind_resource") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go index dfe72c6650..eb7135fafd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -61,11 +62,15 @@ func (m *ServiceBindingResource) validateVolumeMounts(formats strfmt.Registry) e if m.VolumeMounts[i] != nil { if err := m.VolumeMounts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) } + return err } } @@ -100,11 +105,15 @@ func (m *ServiceBindingResource) contextValidateVolumeMounts(ctx context.Context } if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go index 92f2865c8d..fb20ec2d08 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -43,11 +44,15 @@ func (m *ServiceBindingSchemaObject) validateCreate(formats strfmt.Registry) err if m.Create != nil { if err := m.Create.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("create") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("create") } + return err } } @@ -78,11 +83,15 @@ func (m *ServiceBindingSchemaObject) contextValidateCreate(ctx context.Context, } if err := m.Create.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("create") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("create") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go index e95edd18a0..839ef77c09 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -90,11 +91,15 @@ func (m *ServiceBindingVolumeMount) validateDevice(formats strfmt.Registry) erro if m.Device != nil { if err := m.Device.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("device") } + return err } } @@ -102,7 +107,7 @@ func (m *ServiceBindingVolumeMount) validateDevice(formats strfmt.Registry) erro return nil } -var serviceBindingVolumeMountTypeDeviceTypePropEnum []interface{} +var serviceBindingVolumeMountTypeDeviceTypePropEnum []any func init() { var res []string @@ -151,7 +156,7 @@ func (m *ServiceBindingVolumeMount) validateDriver(formats strfmt.Registry) erro return nil } -var serviceBindingVolumeMountTypeModePropEnum []interface{} +var serviceBindingVolumeMountTypeModePropEnum []any func init() { var res []string @@ -213,11 +218,15 @@ func (m *ServiceBindingVolumeMount) contextValidateDevice(ctx context.Context, f if m.Device != nil { if err := m.Device.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("device") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("device") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_async_operation.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_async_operation.go index 5658b00cf4..4ff2a8a3b1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_async_operation.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_async_operation.go @@ -21,7 +21,7 @@ type ServiceInstanceAsyncOperation struct { DashboardURL string `json:"dashboard_url,omitempty"` // extensions - Extensions interface{} `json:"extensions,omitempty"` + Extensions any `json:"extensions,omitempty"` // operation Operation string `json:"operation,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go index 76b3fc1355..b7c72a13c1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -50,11 +51,15 @@ func (m *ServiceInstanceSchemaObject) validateCreate(formats strfmt.Registry) er if m.Create != nil { if err := m.Create.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("create") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("create") } + return err } } @@ -69,11 +74,15 @@ func (m *ServiceInstanceSchemaObject) validateUpdate(formats strfmt.Registry) er if m.Update != nil { if err := m.Update.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("update") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("update") } + return err } } @@ -108,11 +117,15 @@ func (m *ServiceInstanceSchemaObject) contextValidateCreate(ctx context.Context, } if err := m.Create.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("create") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("create") } + return err } } @@ -129,11 +142,15 @@ func (m *ServiceInstanceSchemaObject) contextValidateUpdate(ctx context.Context, } if err := m.Update.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("update") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("update") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update.go index eeac73f208..6f25f2f36c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update.go @@ -21,7 +21,7 @@ type ServiceInstanceUpdate struct { DashboardURL string `json:"dashboard_url,omitempty"` // extensions - Extensions interface{} `json:"extensions,omitempty"` + Extensions any `json:"extensions,omitempty"` } // Validate validates this service instance update diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go index 506864ca69..6ee07abeb9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -61,11 +62,15 @@ func (m *ServiceInstanceUpdateRequest) validatePreviousValues(formats strfmt.Reg if m.PreviousValues != nil { if err := m.PreviousValues.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("previous_values") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("previous_values") } + return err } } @@ -105,11 +110,15 @@ func (m *ServiceInstanceUpdateRequest) contextValidatePreviousValues(ctx context } if err := m.PreviousValues.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("previous_values") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("previous_values") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go index 263b357a86..0d6eff1396 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go @@ -28,6 +28,10 @@ type SharedProcessorPool struct { // Required: true AvailableCores *float64 `json:"availableCores"` + // The creation time of the Shared Processor Pool + // Format: date-time + CreationDate *strfmt.DateTime `json:"creationDate,omitempty"` + // crn Crn CRN `json:"crn,omitempty"` @@ -77,6 +81,10 @@ func (m *SharedProcessorPool) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateCrn(formats); err != nil { res = append(res, err) } @@ -125,6 +133,18 @@ func (m *SharedProcessorPool) validateAvailableCores(formats strfmt.Registry) er return nil } +func (m *SharedProcessorPool) validateCreationDate(formats strfmt.Registry) error { + if swag.IsZero(m.CreationDate) { // not required + return nil + } + + if err := validate.FormatOf("creationDate", "body", "date-time", m.CreationDate.String(), formats); err != nil { + return err + } + + return nil +} + func (m *SharedProcessorPool) validateCrn(formats strfmt.Registry) error { if swag.IsZero(m.Crn) { // not required return nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_create.go index 95eaf671b4..3873c63556 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -100,11 +101,15 @@ func (m *SharedProcessorPoolCreate) validateUserTags(formats strfmt.Registry) er } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -128,11 +133,15 @@ func (m *SharedProcessorPoolCreate) ContextValidate(ctx context.Context, formats func (m *SharedProcessorPoolCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go index b58e967dfb..1cb8ac633a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -60,11 +61,15 @@ func (m *SharedProcessorPoolDetail) validateServers(formats strfmt.Registry) err if m.Servers[i] != nil { if err := m.Servers[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("servers" + "." + strconv.Itoa(i)) } + return err } } @@ -82,11 +87,15 @@ func (m *SharedProcessorPoolDetail) validateSharedProcessorPool(formats strfmt.R if m.SharedProcessorPool != nil { if err := m.SharedProcessorPool.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedProcessorPool") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedProcessorPool") } + return err } } @@ -123,11 +132,15 @@ func (m *SharedProcessorPoolDetail) contextValidateServers(ctx context.Context, } if err := m.Servers[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("servers" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("servers" + "." + strconv.Itoa(i)) } + return err } } @@ -142,11 +155,15 @@ func (m *SharedProcessorPoolDetail) contextValidateSharedProcessorPool(ctx conte if m.SharedProcessorPool != nil { if err := m.SharedProcessorPool.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedProcessorPool") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedProcessorPool") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go index b48639706e..4dd9707427 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *SharedProcessorPools) validateSharedProcessorPools(formats strfmt.Regis if m.SharedProcessorPools[i] != nil { if err := m.SharedProcessorPools[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedProcessorPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedProcessorPools" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *SharedProcessorPools) contextValidateSharedProcessorPools(ctx context.C } if err := m.SharedProcessorPools[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedProcessorPools" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedProcessorPools" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/site.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/site.go index 2a9caa29e6..39afd5daae 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/site.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/site.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -55,11 +56,15 @@ func (m *Site) validateReplicationPoolMap(formats strfmt.Registry) error { if m.ReplicationPoolMap[i] != nil { if err := m.ReplicationPoolMap[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) } + return err } } @@ -94,11 +99,15 @@ func (m *Site) contextValidateReplicationPoolMap(ctx context.Context, formats st } if err := m.ReplicationPoolMap[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ReplicationPoolMap" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot.go index 59a91324b7..cfa55531fa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,7 +30,7 @@ type Snapshot struct { // crn Crn CRN `json:"crn,omitempty"` - // Description of the PVM instance snapshot + // Description of the PVM instance snapshot with a maximum of 255 characters allowed. Description string `json:"description,omitempty"` // Last Update Date @@ -118,11 +119,15 @@ func (m *Snapshot) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -198,11 +203,15 @@ func (m *Snapshot) contextValidateCrn(ctx context.Context, formats strfmt.Regist } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create.go index dbd12da8c9..b34c868e3d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -20,6 +21,7 @@ import ( type SnapshotCreate struct { // Description of the PVM instance snapshot + // Max Length: 255 Description string `json:"description,omitempty"` // Name of the PVM instance snapshot to create @@ -39,6 +41,10 @@ type SnapshotCreate struct { func (m *SnapshotCreate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -53,6 +59,18 @@ func (m *SnapshotCreate) Validate(formats strfmt.Registry) error { return nil } +func (m *SnapshotCreate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 255); err != nil { + return err + } + + return nil +} + func (m *SnapshotCreate) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -76,11 +94,15 @@ func (m *SnapshotCreate) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -104,11 +126,15 @@ func (m *SnapshotCreate) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *SnapshotCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create_response.go index eda2822b3d..e0a04d6a9a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_create_response.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -58,11 +59,15 @@ func (m *SnapshotCreateResponse) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -84,11 +89,15 @@ func (m *SnapshotCreateResponse) validateUserTags(formats strfmt.Registry) error } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -120,11 +129,15 @@ func (m *SnapshotCreateResponse) contextValidateCrn(ctx context.Context, formats } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -134,11 +147,15 @@ func (m *SnapshotCreateResponse) contextValidateCrn(ctx context.Context, formats func (m *SnapshotCreateResponse) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_list.go index ee6a7d7b97..c0069e95ea 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *SnapshotList) validateSnapshots(formats strfmt.Registry) error { if m.Snapshots[i] != nil { if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *SnapshotList) contextValidateSnapshots(ctx context.Context, formats str } if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_update.go index e924ad1160..1ade1de4f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_update.go @@ -19,19 +19,24 @@ import ( // swagger:model SnapshotUpdate type SnapshotUpdate struct { - // Description of the PVM instance snapshot - Description string `json:"description,omitempty"` + // Description of the PVM instance snapshot with a maximum of 255 characters allowed. + // Max Length: 255 + Description *string `json:"description,omitempty"` // Name of the PVM instance snapshot // Max Length: 120 // Pattern: ^[a-zA-Z0-9_.-]+$ - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` } // Validate validates this snapshot update func (m *SnapshotUpdate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -42,16 +47,28 @@ func (m *SnapshotUpdate) Validate(formats strfmt.Registry) error { return nil } +func (m *SnapshotUpdate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", *m.Description, 255); err != nil { + return err + } + + return nil +} + func (m *SnapshotUpdate) validateName(formats strfmt.Registry) error { if swag.IsZero(m.Name) { // not required return nil } - if err := validate.MaxLength("name", "body", m.Name, 120); err != nil { + if err := validate.MaxLength("name", "body", *m.Name, 120); err != nil { return err } - if err := validate.Pattern("name", "body", m.Name, `^[a-zA-Z0-9_.-]+$`); err != nil { + if err := validate.Pattern("name", "body", *m.Name, `^[a-zA-Z0-9_.-]+$`); err != nil { return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_v1.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_v1.go index 570c3a4fa9..fb5f0de653 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_v1.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshot_v1.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -111,11 +112,15 @@ func (m *SnapshotV1) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -200,11 +205,15 @@ func (m *SnapshotV1) contextValidateCrn(ctx context.Context, formats strfmt.Regi } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go index 46928ccef8..331409f9a2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Snapshots) validateSnapshots(formats strfmt.Registry) error { if m.Snapshots[i] != nil { if err := m.Snapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Snapshots) contextValidateSnapshots(ctx context.Context, formats strfmt } if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("snapshots" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/software_tier.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/software_tier.go index 3f471c59c8..b0229a89d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/software_tier.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/software_tier.go @@ -44,7 +44,7 @@ const ( ) // for schema -var softwareTierEnum []interface{} +var softwareTierEnum []any func init() { var res []SoftwareTier diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go index 786d1ce5d8..a7e58bdf9d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *SSHKeys) validateSSHKeys(formats strfmt.Registry) error { if m.SSHKeys[i] != nil { if err := m.SSHKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *SSHKeys) contextValidateSSHKeys(ctx context.Context, formats strfmt.Reg } if err := m.SSHKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go index 5f913ccd20..7119b134c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *StatusDescription) validateErrors(formats strfmt.Registry) error { if m.Errors[i] != nil { if err := m.Errors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("errors" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *StatusDescription) contextValidateErrors(ctx context.Context, formats s } if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("errors" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go index cf5ab313de..9777ed262f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m StockImages) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m StockImages) ContextValidate(ctx context.Context, formats strfmt.Registr } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go index 49ea8ed6c1..d307dadd45 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_affinity.go @@ -51,7 +51,7 @@ func (m *StorageAffinity) Validate(formats strfmt.Registry) error { return nil } -var storageAffinityTypeAffinityPolicyPropEnum []interface{} +var storageAffinityTypeAffinityPolicyPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go index 3c967f4426..6efa720a38 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -119,11 +120,15 @@ func (m *StorageController) validatePools(formats strfmt.Registry) error { } if val, ok := m.Pools[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("pools" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("pools" + "." + k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go index 05d8863187..b6a637fba6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m StorageControllers) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go index 3f70d6a398..e94dc02f41 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -113,11 +114,15 @@ func (m *StoragePool) validateOverrideThresholds(formats strfmt.Registry) error if m.OverrideThresholds != nil { if err := m.OverrideThresholds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overrideThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overrideThresholds") } + return err } } @@ -125,7 +130,7 @@ func (m *StoragePool) validateOverrideThresholds(formats strfmt.Registry) error return nil } -var storagePoolTypeStatePropEnum []interface{} +var storagePoolTypeStatePropEnum []any func init() { var res []string @@ -200,11 +205,15 @@ func (m *StoragePool) contextValidateOverrideThresholds(ctx context.Context, for } if err := m.OverrideThresholds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overrideThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overrideThresholds") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go index fc5b533e41..20d40d8247 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m StoragePools) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m StoragePools) ContextValidate(ctx context.Context, formats strfmt.Regist } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go index 7f5e3aafbc..958e5611b0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -51,11 +52,15 @@ func (m *StoragePoolsCapacity) validateMaximumStorageAllocation(formats strfmt.R if m.MaximumStorageAllocation != nil { if err := m.MaximumStorageAllocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -75,11 +80,15 @@ func (m *StoragePoolsCapacity) validateStoragePoolsCapacity(formats strfmt.Regis if m.StoragePoolsCapacity[i] != nil { if err := m.StoragePoolsCapacity[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) } + return err } } @@ -116,11 +125,15 @@ func (m *StoragePoolsCapacity) contextValidateMaximumStorageAllocation(ctx conte } if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -139,11 +152,15 @@ func (m *StoragePoolsCapacity) contextValidateStoragePoolsCapacity(ctx context.C } if err := m.StoragePoolsCapacity[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go index 16531848ae..bb090d3ccb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go @@ -45,7 +45,7 @@ func (m *StorageTier) Validate(formats strfmt.Registry) error { return nil } -var storageTierTypeStatePropEnum []interface{} +var storageTierTypeStatePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type.go index 79b41647c1..525cb744fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type.go @@ -48,7 +48,7 @@ func (m *StorageType) Validate(formats strfmt.Registry) error { return nil } -var storageTypeTypeStatePropEnum []interface{} +var storageTypeTypeStatePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go index 30fd85e2c1..14dd2fcb2e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -54,11 +55,15 @@ func (m *StorageTypeCapacity) validateMaximumStorageAllocation(formats strfmt.Re if m.MaximumStorageAllocation != nil { if err := m.MaximumStorageAllocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -78,11 +83,15 @@ func (m *StorageTypeCapacity) validateStoragePoolsCapacity(formats strfmt.Regist if m.StoragePoolsCapacity[i] != nil { if err := m.StoragePoolsCapacity[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) } + return err } } @@ -119,11 +128,15 @@ func (m *StorageTypeCapacity) contextValidateMaximumStorageAllocation(ctx contex } if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -142,11 +155,15 @@ func (m *StorageTypeCapacity) contextValidateStoragePoolsCapacity(ctx context.Co } if err := m.StoragePoolsCapacity[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types.go index d00c9cd4e4..7ee6a5e7ee 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m StorageTypes) Validate(formats strfmt.Registry) error { } if err := m[k].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } @@ -52,11 +57,15 @@ func (m StorageTypes) ContextValidate(ctx context.Context, formats strfmt.Regist for k := range m { if err := m[k].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go index a0fee64b52..f47a8604c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -51,11 +52,15 @@ func (m *StorageTypesCapacity) validateMaximumStorageAllocation(formats strfmt.R if m.MaximumStorageAllocation != nil { if err := m.MaximumStorageAllocation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -75,11 +80,15 @@ func (m *StorageTypesCapacity) validateStorageTypesCapacity(formats strfmt.Regis if m.StorageTypesCapacity[i] != nil { if err := m.StorageTypesCapacity[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageTypesCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageTypesCapacity" + "." + strconv.Itoa(i)) } + return err } } @@ -116,11 +125,15 @@ func (m *StorageTypesCapacity) contextValidateMaximumStorageAllocation(ctx conte } if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maximumStorageAllocation") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maximumStorageAllocation") } + return err } } @@ -139,11 +152,15 @@ func (m *StorageTypesCapacity) contextValidateStorageTypesCapacity(ctx context.C } if err := m.StorageTypesCapacity[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("storageTypesCapacity" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("storageTypesCapacity" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier.go index dce5eedf97..2ec4f4924e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -45,11 +46,15 @@ func (m *SupportedSoftwareTier) validateTier(formats strfmt.Registry) error { } if err := m.Tier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tier") } + return err } @@ -77,11 +82,15 @@ func (m *SupportedSoftwareTier) contextValidateTier(ctx context.Context, formats } if err := m.Tier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("tier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("tier") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier_list.go index de22fd67eb..d96b756b28 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/supported_software_tier_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m SupportedSoftwareTierList) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m SupportedSoftwareTierList) ContextValidate(ctx context.Context, formats } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go index 42d0c35069..f024228e80 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -88,11 +89,15 @@ func (m *SystemPool) validateCapacity(formats strfmt.Registry) error { if m.Capacity != nil { if err := m.Capacity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } @@ -107,11 +112,15 @@ func (m *SystemPool) validateMaxAvailable(formats strfmt.Registry) error { if m.MaxAvailable != nil { if err := m.MaxAvailable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxAvailable") } + return err } } @@ -126,11 +135,15 @@ func (m *SystemPool) validateMaxCoresAvailable(formats strfmt.Registry) error { if m.MaxCoresAvailable != nil { if err := m.MaxCoresAvailable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxCoresAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxCoresAvailable") } + return err } } @@ -145,11 +158,15 @@ func (m *SystemPool) validateMaxMemoryAvailable(formats strfmt.Registry) error { if m.MaxMemoryAvailable != nil { if err := m.MaxMemoryAvailable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxMemoryAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxMemoryAvailable") } + return err } } @@ -164,11 +181,15 @@ func (m *SystemPool) validateSharedCoreRatio(formats strfmt.Registry) error { if m.SharedCoreRatio != nil { if err := m.SharedCoreRatio.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedCoreRatio") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedCoreRatio") } + return err } } @@ -188,11 +209,15 @@ func (m *SystemPool) validateSystems(formats strfmt.Registry) error { if m.Systems[i] != nil { if err := m.Systems[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systems" + "." + strconv.Itoa(i)) } + return err } } @@ -245,11 +270,15 @@ func (m *SystemPool) contextValidateCapacity(ctx context.Context, formats strfmt } if err := m.Capacity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } @@ -266,11 +295,15 @@ func (m *SystemPool) contextValidateMaxAvailable(ctx context.Context, formats st } if err := m.MaxAvailable.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxAvailable") } + return err } } @@ -287,11 +320,15 @@ func (m *SystemPool) contextValidateMaxCoresAvailable(ctx context.Context, forma } if err := m.MaxCoresAvailable.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxCoresAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxCoresAvailable") } + return err } } @@ -308,11 +345,15 @@ func (m *SystemPool) contextValidateMaxMemoryAvailable(ctx context.Context, form } if err := m.MaxMemoryAvailable.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("maxMemoryAvailable") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("maxMemoryAvailable") } + return err } } @@ -329,11 +370,15 @@ func (m *SystemPool) contextValidateSharedCoreRatio(ctx context.Context, formats } if err := m.SharedCoreRatio.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sharedCoreRatio") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sharedCoreRatio") } + return err } } @@ -352,11 +397,15 @@ func (m *SystemPool) contextValidateSystems(ctx context.Context, formats strfmt. } if err := m.Systems[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systems" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go index 592b1b0b9c..916fafac1b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -116,11 +117,15 @@ func (m *SystemPoolCapacity) validateSystems(formats strfmt.Registry) error { if m.Systems[i] != nil { if err := m.Systems[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systems" + "." + strconv.Itoa(i)) } + return err } } @@ -191,11 +196,15 @@ func (m *SystemPoolCapacity) contextValidateSystems(ctx context.Context, formats } if err := m.Systems[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("systems" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("systems" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools.go index afae9a2f15..bd926c8bbf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m SystemPools) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go index b2c015c2dd..bab3a924d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -29,11 +30,15 @@ func (m SystemPoolsCapacity) Validate(formats strfmt.Registry) error { } if val, ok := m[k]; ok { if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(k) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(k) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go index fc0c7ca672..16b338cea0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -94,11 +95,15 @@ func (m *Tenant) validateCloudInstances(formats strfmt.Registry) error { if m.CloudInstances[i] != nil { if err := m.CloudInstances[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -142,11 +147,15 @@ func (m *Tenant) validatePeeringNetworks(formats strfmt.Registry) error { if m.PeeringNetworks[i] != nil { if err := m.PeeringNetworks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) } + return err } } @@ -168,11 +177,15 @@ func (m *Tenant) validateSSHKeys(formats strfmt.Registry) error { if m.SSHKeys[i] != nil { if err := m.SSHKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } @@ -224,11 +237,15 @@ func (m *Tenant) contextValidateCloudInstances(ctx context.Context, formats strf } if err := m.CloudInstances[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("cloudInstances" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("cloudInstances" + "." + strconv.Itoa(i)) } + return err } } @@ -249,11 +266,15 @@ func (m *Tenant) contextValidatePeeringNetworks(ctx context.Context, formats str } if err := m.PeeringNetworks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) } + return err } } @@ -274,11 +295,15 @@ func (m *Tenant) contextValidateSSHKeys(ctx context.Context, formats strfmt.Regi } if err := m.SSHKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go index b45551007f..e2122365c8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *TenantUpdate) validatePeeringNetworks(formats strfmt.Registry) error { if m.PeeringNetworks[i] != nil { if err := m.PeeringNetworks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *TenantUpdate) contextValidatePeeringNetworks(ctx context.Context, forma } if err := m.PeeringNetworks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go index 575e383044..809e23f787 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -71,11 +72,15 @@ func (m *Thresholds) validateCapacity(formats strfmt.Registry) error { if m.Capacity != nil { if err := m.Capacity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } @@ -90,11 +95,15 @@ func (m *Thresholds) validateOvercommit(formats strfmt.Registry) error { if m.Overcommit != nil { if err := m.Overcommit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overcommit") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overcommit") } + return err } } @@ -109,11 +118,15 @@ func (m *Thresholds) validatePhysicalCapacity(formats strfmt.Registry) error { if m.PhysicalCapacity != nil { if err := m.PhysicalCapacity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("physicalCapacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("physicalCapacity") } + return err } } @@ -128,11 +141,15 @@ func (m *Thresholds) validateVdiskCapacity(formats strfmt.Registry) error { if m.VdiskCapacity != nil { if err := m.VdiskCapacity.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vdiskCapacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vdiskCapacity") } + return err } } @@ -147,11 +164,15 @@ func (m *Thresholds) validateVdiskLimit(formats strfmt.Registry) error { if m.VdiskLimit != nil { if err := m.VdiskLimit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vdiskLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vdiskLimit") } + return err } } @@ -198,11 +219,15 @@ func (m *Thresholds) contextValidateCapacity(ctx context.Context, formats strfmt } if err := m.Capacity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capacity") } + return err } } @@ -219,11 +244,15 @@ func (m *Thresholds) contextValidateOvercommit(ctx context.Context, formats strf } if err := m.Overcommit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overcommit") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overcommit") } + return err } } @@ -240,11 +269,15 @@ func (m *Thresholds) contextValidatePhysicalCapacity(ctx context.Context, format } if err := m.PhysicalCapacity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("physicalCapacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("physicalCapacity") } + return err } } @@ -261,11 +294,15 @@ func (m *Thresholds) contextValidateVdiskCapacity(ctx context.Context, formats s } if err := m.VdiskCapacity.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vdiskCapacity") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vdiskCapacity") } + return err } } @@ -282,11 +319,15 @@ func (m *Thresholds) contextValidateVdiskLimit(ctx context.Context, formats strf } if err := m.VdiskLimit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vdiskLimit") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vdiskLimit") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go index c3687773d2..960754930b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -93,11 +94,15 @@ func (m *TokenExtra) validateToken(formats strfmt.Registry) error { if m.Token != nil { if err := m.Token.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } @@ -133,11 +138,15 @@ func (m *TokenExtra) contextValidateToken(ctx context.Context, formats strfmt.Re if m.Token != nil { if err := m.Token.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_request.go index a6801a13f8..dc1b7e948b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_request.go @@ -57,7 +57,7 @@ func (m *TokenRequest) validateRefreshToken(formats strfmt.Registry) error { return nil } -var tokenRequestTypeSourcePropEnum []interface{} +var tokenRequestTypeSourcePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go index 4e9138eeff..cbb14d6822 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -78,11 +79,15 @@ func (m *TransitConnectionErrorItem) validateTarget(formats strfmt.Registry) err if m.Target != nil { if err := m.Target.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("target") } + return err } } @@ -113,11 +118,15 @@ func (m *TransitConnectionErrorItem) contextValidateTarget(ctx context.Context, } if err := m.Target.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("target") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go index 9a4db4c815..6c3f6432d8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -72,11 +73,15 @@ func (m *TransitGatewayInstance) validateErrors(formats strfmt.Registry) error { if m.Errors[i] != nil { if err := m.Errors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("errors" + "." + strconv.Itoa(i)) } + return err } } @@ -111,11 +116,15 @@ func (m *TransitGatewayInstance) contextValidateErrors(ctx context.Context, form } if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("errors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("errors" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_location.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_location.go index 766183b66e..c5e7fff678 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_location.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_location.go @@ -68,7 +68,7 @@ func (m *TransitGatewayLocation) validateLocation(formats strfmt.Registry) error return nil } -var transitGatewayLocationTypeLocationTypePropEnum []interface{} +var transitGatewayLocationTypeLocationTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go index b1e4cccbbb..a49d9fead5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *TransitGatewayLocations) validateTransitGatewayLocations(formats strfmt if m.TransitGatewayLocations[i] != nil { if err := m.TransitGatewayLocations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *TransitGatewayLocations) contextValidateTransitGatewayLocations(ctx con } if err := m.TransitGatewayLocations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_server_virtual_serial_number.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_server_virtual_serial_number.go index c1dbba537e..7faf869f89 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_server_virtual_serial_number.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_server_virtual_serial_number.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -45,11 +46,15 @@ func (m *UpdateServerVirtualSerialNumber) validateSoftwareTier(formats strfmt.Re } if err := m.SoftwareTier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } @@ -77,11 +82,15 @@ func (m *UpdateServerVirtualSerialNumber) contextValidateSoftwareTier(ctx contex } if err := m.SoftwareTier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go index cdb59e49ee..2a32de2fc4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -59,11 +60,15 @@ func (m *UpdateStoragePool) validateOverrideThresholds(formats strfmt.Registry) if m.OverrideThresholds != nil { if err := m.OverrideThresholds.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overrideThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overrideThresholds") } + return err } } @@ -71,7 +76,7 @@ func (m *UpdateStoragePool) validateOverrideThresholds(formats strfmt.Registry) return nil } -var updateStoragePoolTypeStatePropEnum []interface{} +var updateStoragePoolTypeStatePropEnum []any func init() { var res []string @@ -136,11 +141,15 @@ func (m *UpdateStoragePool) contextValidateOverrideThresholds(ctx context.Contex } if err := m.OverrideThresholds.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("overrideThresholds") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("overrideThresholds") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_workspace_ssh_key.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_workspace_ssh_key.go index d923a9a09e..b1386d8945 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_workspace_ssh_key.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_workspace_ssh_key.go @@ -70,7 +70,7 @@ func (m *UpdateWorkspaceSSHKey) validateName(formats strfmt.Registry) error { return nil } -var updateWorkspaceSshKeyTypeVisibilityPropEnum []interface{} +var updateWorkspaceSshKeyTypeVisibilityPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go index 83e1f944b2..1e2d88df93 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -106,11 +107,15 @@ func (m *UserAuthenticationInfo) validateCapabilities(formats strfmt.Registry) e if m.Capabilities != nil { if err := m.Capabilities.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } } @@ -125,11 +130,15 @@ func (m *UserAuthenticationInfo) validateCrnAccess(formats strfmt.Registry) erro if m.CrnAccess != nil { if err := m.CrnAccess.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crnAccess") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crnAccess") } + return err } } @@ -172,11 +181,15 @@ func (m *UserAuthenticationInfo) validateToken(formats strfmt.Registry) error { if m.Token != nil { if err := m.Token.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } @@ -213,11 +226,15 @@ func (m *UserAuthenticationInfo) contextValidateCapabilities(ctx context.Context } if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("capabilities") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("capabilities") } + return err } @@ -231,11 +248,15 @@ func (m *UserAuthenticationInfo) contextValidateCrnAccess(ctx context.Context, f } if err := m.CrnAccess.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crnAccess") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crnAccess") } + return err } @@ -247,11 +268,15 @@ func (m *UserAuthenticationInfo) contextValidateToken(ctx context.Context, forma if m.Token != nil { if err := m.Token.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("token") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("token") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_attach.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_attach.go new file mode 100644 index 0000000000..d1e5110e50 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_attach.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VPMemVolumeAttach v p mem volume attach +// +// swagger:model VPMemVolumeAttach +type VPMemVolumeAttach struct { + + // user tags + UserTags Tags `json:"userTags,omitempty"` + + // Description of volumes to create + // Required: true + VpmemVolumes []*VPMemVolumeCreate `json:"vpmemVolumes"` +} + +// Validate validates this v p mem volume attach +func (m *VPMemVolumeAttach) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUserTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpmemVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumeAttach) validateUserTags(formats strfmt.Registry) error { + if swag.IsZero(m.UserTags) { // not required + return nil + } + + if err := m.UserTags.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + +func (m *VPMemVolumeAttach) validateVpmemVolumes(formats strfmt.Registry) error { + + if err := validate.Required("vpmemVolumes", "body", m.VpmemVolumes); err != nil { + return err + } + + for i := 0; i < len(m.VpmemVolumes); i++ { + if swag.IsZero(m.VpmemVolumes[i]) { // not required + continue + } + + if m.VpmemVolumes[i] != nil { + if err := m.VpmemVolumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v p mem volume attach based on the context it is used +func (m *VPMemVolumeAttach) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateUserTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVpmemVolumes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumeAttach) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { + + if err := m.UserTags.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("userTags") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("userTags") + } + + return err + } + + return nil +} + +func (m *VPMemVolumeAttach) contextValidateVpmemVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VpmemVolumes); i++ { + + if m.VpmemVolumes[i] != nil { + + if swag.IsZero(m.VpmemVolumes[i]) { // not required + return nil + } + + if err := m.VpmemVolumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("vpmemVolumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VPMemVolumeAttach) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VPMemVolumeAttach) UnmarshalBinary(b []byte) error { + var res VPMemVolumeAttach + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_create.go new file mode 100644 index 0000000000..44bd7466f6 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_create.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VPMemVolumeCreate v p mem volume create +// +// swagger:model VPMemVolumeCreate +type VPMemVolumeCreate struct { + + // Volume base name + // Required: true + // Max Length: 20 + // Min Length: 1 + // Pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_]*$ + Name *string `json:"name"` + + // Volume size (GB) + // Required: true + // Minimum: 1 + Size *int64 `json:"size"` +} + +// Validate validates this v p mem volume create +func (m *VPMemVolumeCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumeCreate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 20); err != nil { + return err + } + + if err := validate.Pattern("name", "body", *m.Name, `^[a-zA-Z0-9][a-zA-Z0-9-_]*$`); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeCreate) validateSize(formats strfmt.Registry) error { + + if err := validate.Required("size", "body", m.Size); err != nil { + return err + } + + if err := validate.MinimumInt("size", "body", *m.Size, 1, false); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v p mem volume create based on context it is used +func (m *VPMemVolumeCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VPMemVolumeCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VPMemVolumeCreate) UnmarshalBinary(b []byte) error { + var res VPMemVolumeCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_reference.go new file mode 100644 index 0000000000..5d40afa996 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volume_reference.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VPMemVolumeReference v p mem volume reference +// +// swagger:model VPMemVolumeReference +type VPMemVolumeReference struct { + + // The date and time when the volume was created + // Required: true + // Format: date-time + CreationDate *strfmt.DateTime `json:"creationDate"` + + // crn + Crn CRN `json:"crn,omitempty"` + + // Error code for the vPMEM volume + ErrorCode string `json:"errorCode,omitempty"` + + // Link to vPMEM volume resource + // Required: true + Href *string `json:"href"` + + // Volume Name + // Required: true + Name *string `json:"name"` + + // PVM Instance ID which the volume is attached to + // Required: true + PvmInstanceID *string `json:"pvmInstanceID"` + + // Reason for error + Reason string `json:"reason,omitempty"` + + // Volume Size (GB) + // Required: true + Size *float64 `json:"size"` + + // Status of the volume + // Required: true + Status *string `json:"status"` + + // The date and time when the volume was updated + // Format: date-time + UpdatedDate *strfmt.DateTime `json:"updatedDate,omitempty"` + + // Volume ID + // Required: true + UUID *string `json:"uuid"` +} + +// Validate validates this v p mem volume reference +func (m *VPMemVolumeReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCrn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHref(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePvmInstanceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdatedDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumeReference) validateCreationDate(formats strfmt.Registry) error { + + if err := validate.Required("creationDate", "body", m.CreationDate); err != nil { + return err + } + + if err := validate.FormatOf("creationDate", "body", "date-time", m.CreationDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateCrn(formats strfmt.Registry) error { + if swag.IsZero(m.Crn) { // not required + return nil + } + + if err := m.Crn.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("crn") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("crn") + } + + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateHref(formats strfmt.Registry) error { + + if err := validate.Required("href", "body", m.Href); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validatePvmInstanceID(formats strfmt.Registry) error { + + if err := validate.Required("pvmInstanceID", "body", m.PvmInstanceID); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateSize(formats strfmt.Registry) error { + + if err := validate.Required("size", "body", m.Size); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateUpdatedDate(formats strfmt.Registry) error { + if swag.IsZero(m.UpdatedDate) { // not required + return nil + } + + if err := validate.FormatOf("updatedDate", "body", "date-time", m.UpdatedDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *VPMemVolumeReference) validateUUID(formats strfmt.Registry) error { + + if err := validate.Required("uuid", "body", m.UUID); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this v p mem volume reference based on the context it is used +func (m *VPMemVolumeReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCrn(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumeReference) contextValidateCrn(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.Crn) { // not required + return nil + } + + if err := m.Crn.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("crn") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("crn") + } + + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VPMemVolumeReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VPMemVolumeReference) UnmarshalBinary(b []byte) error { + var res VPMemVolumeReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volumes.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volumes.go new file mode 100644 index 0000000000..f18c3642bc --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_mem_volumes.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + stderrors "errors" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// VPMemVolumes v p mem volumes +// +// swagger:model VPMemVolumes +type VPMemVolumes struct { + + // List of vPMEM volumes + // Required: true + Volumes []*VPMemVolumeReference `json:"volumes"` +} + +// Validate validates this v p mem volumes +func (m *VPMemVolumes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumes) validateVolumes(formats strfmt.Registry) error { + + if err := validate.Required("volumes", "body", m.Volumes); err != nil { + return err + } + + for i := 0; i < len(m.Volumes); i++ { + if swag.IsZero(m.Volumes[i]) { // not required + continue + } + + if m.Volumes[i] != nil { + if err := m.Volumes[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v p mem volumes based on the context it is used +func (m *VPMemVolumes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVolumes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VPMemVolumes) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Volumes); i++ { + + if m.Volumes[i] != nil { + + if swag.IsZero(m.Volumes[i]) { // not required + return nil + } + + if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VPMemVolumes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VPMemVolumes) UnmarshalBinary(b []byte) error { + var res VPMemVolumes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go index cafa659109..c374e1660c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -144,11 +145,15 @@ func (m *VPNConnection) validateDeadPeerDetection(formats strfmt.Registry) error if m.DeadPeerDetection != nil { if err := m.DeadPeerDetection.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deadPeerDetection") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deadPeerDetection") } + return err } } @@ -173,11 +178,15 @@ func (m *VPNConnection) validateIkePolicy(formats strfmt.Registry) error { if m.IkePolicy != nil { if err := m.IkePolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ikePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ikePolicy") } + return err } } @@ -193,11 +202,15 @@ func (m *VPNConnection) validateIPSecPolicy(formats strfmt.Registry) error { if m.IPSecPolicy != nil { if err := m.IPSecPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipSecPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipSecPolicy") } + return err } } @@ -214,7 +227,7 @@ func (m *VPNConnection) validateLocalGatewayAddress(formats strfmt.Registry) err return nil } -var vPNConnectionTypeModePropEnum []interface{} +var vPNConnectionTypeModePropEnum []any func init() { var res []string @@ -287,11 +300,15 @@ func (m *VPNConnection) validatePeerGatewayAddress(formats strfmt.Registry) erro if m.PeerGatewayAddress != nil { if err := m.PeerGatewayAddress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } } @@ -308,7 +325,7 @@ func (m *VPNConnection) validatePeerSubnets(formats strfmt.Registry) error { return nil } -var vPNConnectionTypeStatusPropEnum []interface{} +var vPNConnectionTypeStatusPropEnum []any func init() { var res []string @@ -394,11 +411,15 @@ func (m *VPNConnection) contextValidateDeadPeerDetection(ctx context.Context, fo if m.DeadPeerDetection != nil { if err := m.DeadPeerDetection.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("deadPeerDetection") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("deadPeerDetection") } + return err } } @@ -411,11 +432,15 @@ func (m *VPNConnection) contextValidateIkePolicy(ctx context.Context, formats st if m.IkePolicy != nil { if err := m.IkePolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ikePolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ikePolicy") } + return err } } @@ -428,11 +453,15 @@ func (m *VPNConnection) contextValidateIPSecPolicy(ctx context.Context, formats if m.IPSecPolicy != nil { if err := m.IPSecPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("ipSecPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("ipSecPolicy") } + return err } } @@ -445,11 +474,15 @@ func (m *VPNConnection) contextValidatePeerGatewayAddress(ctx context.Context, f if m.PeerGatewayAddress != nil { if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go index 817382851e..e6fae3814b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -113,7 +114,7 @@ func (m *VPNConnectionCreate) validateIPSecPolicy(formats strfmt.Registry) error return nil } -var vPNConnectionCreateTypeModePropEnum []interface{} +var vPNConnectionCreateTypeModePropEnum []any func init() { var res []string @@ -186,11 +187,15 @@ func (m *VPNConnectionCreate) validatePeerGatewayAddress(formats strfmt.Registry if m.PeerGatewayAddress != nil { if err := m.PeerGatewayAddress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } } @@ -226,11 +231,15 @@ func (m *VPNConnectionCreate) contextValidatePeerGatewayAddress(ctx context.Cont if m.PeerGatewayAddress != nil { if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go index d3eea56753..813f6e9dab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -94,11 +95,15 @@ func (m *VPNConnectionCreateResponse) validateJobRef(formats strfmt.Registry) er if m.JobRef != nil { if err := m.JobRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobRef") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobRef") } + return err } } @@ -134,11 +139,15 @@ func (m *VPNConnectionCreateResponse) contextValidateJobRef(ctx context.Context, } if err := m.JobRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("jobRef") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("jobRef") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go index 5fe68e0103..18efba92c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -38,7 +39,7 @@ type VPNConnectionUpdate struct { PeerGatewayAddress PeerGatewayAddress `json:"peerGatewayAddress,omitempty"` // v p n connection update additional properties - VPNConnectionUpdateAdditionalProperties map[string]interface{} `json:"-"` + VPNConnectionUpdateAdditionalProperties map[string]any `json:"-"` } // UnmarshalJSON unmarshals this object with additional properties from JSON @@ -85,9 +86,9 @@ func (m *VPNConnectionUpdate) UnmarshalJSON(data []byte) error { delete(stage2, "peerGatewayAddress") // stage 3, add additional properties values if len(stage2) > 0 { - result := make(map[string]interface{}) + result := make(map[string]any) for k, v := range stage2 { - var toadd interface{} + var toadd any if err := json.Unmarshal(v, &toadd); err != nil { return err } @@ -191,11 +192,15 @@ func (m *VPNConnectionUpdate) validatePeerGatewayAddress(formats strfmt.Registry } if err := m.PeerGatewayAddress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } @@ -223,11 +228,15 @@ func (m *VPNConnectionUpdate) contextValidatePeerGatewayAddress(ctx context.Cont } if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("peerGatewayAddress") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("peerGatewayAddress") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go index d86298c76a..6de716713d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -50,11 +51,15 @@ func (m *VPNConnections) validateVpnConnections(formats strfmt.Registry) error { if m.VpnConnections[i] != nil { if err := m.VpnConnections[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpnConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpnConnections" + "." + strconv.Itoa(i)) } + return err } } @@ -89,11 +94,15 @@ func (m *VPNConnections) contextValidateVpnConnections(ctx context.Context, form } if err := m.VpnConnections[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("vpnConnections" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("vpnConnections" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number.go index 4e712394b0..60e414b0e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -94,11 +95,15 @@ func (m *VirtualSerialNumber) validateSoftwareTier(formats strfmt.Registry) erro } if err := m.SoftwareTier.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } @@ -126,11 +131,15 @@ func (m *VirtualSerialNumber) contextValidateSoftwareTier(ctx context.Context, f } if err := m.SoftwareTier.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("softwareTier") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("softwareTier") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number_list.go index a83f8bdac6..925a61e5e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/virtual_serial_number_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -30,11 +31,15 @@ func (m VirtualSerialNumberList) Validate(formats strfmt.Registry) error { if m[i] != nil { if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } @@ -60,11 +65,15 @@ func (m VirtualSerialNumberList) ContextValidate(ctx context.Context, formats st } if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName(strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go index 8a7fc54faa..f612917ff5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -93,6 +94,9 @@ type Volume struct { // Replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` + // CRN of the replication targert workspace; for a primary replicated volume this is the target workspace that owns the auxiliary data; for an auxiliary replicated volume this is the target workspace that owns the primary data. + ReplicationTargetCRN string `json:"replicationTargetCRN,omitempty"` + // type of replication(metro,global) ReplicationType string `json:"replicationType,omitempty"` @@ -188,11 +192,15 @@ func (m *Volume) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -233,7 +241,7 @@ func (m *Volume) validateName(formats strfmt.Registry) error { return nil } -var volumeTypePrimaryRolePropEnum []interface{} +var volumeTypePrimaryRolePropEnum []any func init() { var res []string @@ -290,11 +298,15 @@ func (m *Volume) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -335,11 +347,15 @@ func (m *Volume) contextValidateCrn(ctx context.Context, formats strfmt.Registry } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -349,11 +365,15 @@ func (m *Volume) contextValidateCrn(ctx context.Context, formats strfmt.Registry func (m *Volume) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go index 77e8f9dc3f..3d269d9da4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -96,11 +97,15 @@ func (m *VolumeGroup) validateStatusDescription(formats strfmt.Registry) error { if m.StatusDescription != nil { if err := m.StatusDescription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("statusDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("statusDescription") } + return err } } @@ -131,11 +136,15 @@ func (m *VolumeGroup) contextValidateStatusDescription(ctx context.Context, form } if err := m.StatusDescription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("statusDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("statusDescription") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go index 9da802f0dd..c50950bce0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -32,7 +33,7 @@ type VolumeGroupAction struct { Stop *VolumeGroupActionStop `json:"stop,omitempty"` // volume group action additional properties - VolumeGroupActionAdditionalProperties map[string]interface{} `json:"-"` + VolumeGroupActionAdditionalProperties map[string]any `json:"-"` } // UnmarshalJSON unmarshals this object with additional properties from JSON @@ -70,9 +71,9 @@ func (m *VolumeGroupAction) UnmarshalJSON(data []byte) error { delete(stage2, "stop") // stage 3, add additional properties values if len(stage2) > 0 { - result := make(map[string]interface{}) + result := make(map[string]any) for k, v := range stage2 { - var toadd interface{} + var toadd any if err := json.Unmarshal(v, &toadd); err != nil { return err } @@ -182,11 +183,15 @@ func (m *VolumeGroupAction) validateReset(formats strfmt.Registry) error { if m.Reset != nil { if err := m.Reset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("reset") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("reset") } + return err } } @@ -201,11 +206,15 @@ func (m *VolumeGroupAction) validateStart(formats strfmt.Registry) error { if m.Start != nil { if err := m.Start.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("start") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("start") } + return err } } @@ -220,11 +229,15 @@ func (m *VolumeGroupAction) validateStop(formats strfmt.Registry) error { if m.Stop != nil { if err := m.Stop.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("stop") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("stop") } + return err } } @@ -263,11 +276,15 @@ func (m *VolumeGroupAction) contextValidateReset(ctx context.Context, formats st } if err := m.Reset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("reset") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("reset") } + return err } } @@ -284,11 +301,15 @@ func (m *VolumeGroupAction) contextValidateStart(ctx context.Context, formats st } if err := m.Start.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("start") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("start") } + return err } } @@ -305,11 +326,15 @@ func (m *VolumeGroupAction) contextValidateStop(ctx context.Context, formats str } if err := m.Stop.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("stop") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("stop") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_reset.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_reset.go index 1e5bb0ac71..a073e4408d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_reset.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_reset.go @@ -40,7 +40,7 @@ func (m *VolumeGroupActionReset) Validate(formats strfmt.Registry) error { return nil } -var volumeGroupActionResetTypeStatusPropEnum []interface{} +var volumeGroupActionResetTypeStatusPropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_start.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_start.go index fe500653c5..3ee6050937 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_start.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action_start.go @@ -40,7 +40,7 @@ func (m *VolumeGroupActionStart) Validate(formats strfmt.Registry) error { return nil } -var volumeGroupActionStartTypeSourcePropEnum []interface{} +var volumeGroupActionStartTypeSourcePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_create.go index da11dd4521..aa77527b03 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_create.go @@ -27,6 +27,9 @@ type VolumeGroupCreate struct { // Pattern: ^[\s]*[A-Za-z0-9:_.\-][A-Za-z0-9\s:_.\-]*$ Name string `json:"name,omitempty"` + // Target CRN of the secondary workspace where the auxiliary data resides; optional; if specified, the auxiliary volumes for the primary volumes getting added to the new volume group will be automatically onboarded into the secondary workspace and added to the corresponding auxiliary consistency group. + TargetCRN string `json:"targetCRN,omitempty"` + // List of volume IDs,members of VolumeGroup // Required: true VolumeIDs []string `json:"volumeIDs"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go index fb9a4edf77..e000042720 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -39,6 +40,9 @@ type VolumeGroupDetails struct { // Replication status of volume group ReplicationStatus string `json:"replicationStatus,omitempty"` + // CRN of the replication targert workspace; for a primary replicated volume this is the target workspace that owns the auxiliary data; for an auxiliary replicated volume this is the target workspace that owns the primary data. + ReplicationTargetCRN string `json:"replicationTargetCRN,omitempty"` + // Status of the volume group Status string `json:"status,omitempty"` @@ -99,11 +103,15 @@ func (m *VolumeGroupDetails) validateStatusDescription(formats strfmt.Registry) if m.StatusDescription != nil { if err := m.StatusDescription.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("statusDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("statusDescription") } + return err } } @@ -134,11 +142,15 @@ func (m *VolumeGroupDetails) contextValidateStatusDescription(ctx context.Contex } if err := m.StatusDescription.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("statusDescription") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("statusDescription") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go index db283ffd88..7f1bb42974 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *VolumeGroupRemoteCopyRelationships) validateRemoteCopyRelationships(for if m.RemoteCopyRelationships[i] != nil { if err := m.RemoteCopyRelationships[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remoteCopyRelationships" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remoteCopyRelationships" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *VolumeGroupRemoteCopyRelationships) contextValidateRemoteCopyRelationsh } if err := m.RemoteCopyRelationships[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("remoteCopyRelationships" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("remoteCopyRelationships" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_update.go index a283929d55..e2e484419d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_update.go @@ -22,6 +22,9 @@ type VolumeGroupUpdate struct { // List of volume IDs to remove from the volume-group RemoveVolumes []string `json:"removeVolumes"` + + // Target CRN of the secondary workspace where the auxiliary data resides; optional; if specified, the primary volume's corresponding auxiliary volume will be automatically added or removed from the auxiliary consistency group. + TargetCRN string `json:"targetCRN,omitempty"` } // Validate validates this volume group update diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go index 0af75b13fd..0b3597932f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *VolumeGroups) validateVolumeGroups(formats strfmt.Registry) error { if m.VolumeGroups[i] != nil { if err := m.VolumeGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *VolumeGroups) contextValidateVolumeGroups(ctx context.Context, formats } if err := m.VolumeGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go index 254b14812b..7cac831947 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *VolumeGroupsDetails) validateVolumeGroups(formats strfmt.Registry) erro if m.VolumeGroups[i] != nil { if err := m.VolumeGroups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *VolumeGroupsDetails) contextValidateVolumeGroups(ctx context.Context, f } if err := m.VolumeGroups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_info.go index 59905e2570..23bd094474 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_info.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -48,11 +49,15 @@ func (m *VolumeInfo) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -80,11 +85,15 @@ func (m *VolumeInfo) contextValidateCrn(ctx context.Context, formats strfmt.Regi } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go index 4bca382d7d..2f120b2697 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -135,11 +136,15 @@ func (m *VolumeOnboarding) validateResults(formats strfmt.Registry) error { if m.Results != nil { if err := m.Results.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("results") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("results") } + return err } } @@ -175,11 +180,15 @@ func (m *VolumeOnboarding) contextValidateResults(ctx context.Context, formats s } if err := m.Results.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("results") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("results") } + return err } } @@ -243,11 +252,15 @@ func (m *VolumeOnboardingResults) validateVolumeOnboardingFailures(formats strfm if m.VolumeOnboardingFailures[i] != nil { if err := m.VolumeOnboardingFailures[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("results" + "." + "volumeOnboardingFailures" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("results" + "." + "volumeOnboardingFailures" + "." + strconv.Itoa(i)) } + return err } } @@ -282,11 +295,15 @@ func (m *VolumeOnboardingResults) contextValidateVolumeOnboardingFailures(ctx co } if err := m.VolumeOnboardingFailures[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("results" + "." + "volumeOnboardingFailures" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("results" + "." + "volumeOnboardingFailures" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go index 30863a53d3..0760c269d9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -62,11 +63,15 @@ func (m *VolumeOnboardingCreate) validateVolumes(formats strfmt.Registry) error if m.Volumes[i] != nil { if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("Volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("Volumes" + "." + strconv.Itoa(i)) } + return err } } @@ -82,11 +87,15 @@ func (m *VolumeOnboardingCreate) validateUserTags(formats strfmt.Registry) error } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -122,11 +131,15 @@ func (m *VolumeOnboardingCreate) contextValidateVolumes(ctx context.Context, for } if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("Volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("Volumes" + "." + strconv.Itoa(i)) } + return err } } @@ -139,11 +152,15 @@ func (m *VolumeOnboardingCreate) contextValidateVolumes(ctx context.Context, for func (m *VolumeOnboardingCreate) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go index 8b2e760911..224ac8f9a0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *VolumeOnboardings) validateOnboardings(formats strfmt.Registry) error { if m.Onboardings[i] != nil { if err := m.Onboardings[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("onboardings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("onboardings" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *VolumeOnboardings) contextValidateOnboardings(ctx context.Context, form } if err := m.Onboardings[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("onboardings" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("onboardings" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go index dedbebfb0c..9e01ed27b1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -99,6 +100,9 @@ type VolumeReference struct { // shows the replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` + // CRN of the replication targert workspace; for a primary replicated volume this is the target workspace that owns the auxiliary data; for an auxiliary replicated volume this is the target workspace that owns the primary data. + ReplicationTargetCRN string `json:"replicationTargetCRN,omitempty"` + // type of replication(metro, global)s ReplicationType string `json:"replicationType,omitempty"` @@ -230,11 +234,15 @@ func (m *VolumeReference) validateCrn(formats strfmt.Registry) error { } if err := m.Crn.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -293,7 +301,7 @@ func (m *VolumeReference) validateName(formats strfmt.Registry) error { return nil } -var volumeReferenceTypePrimaryRolePropEnum []interface{} +var volumeReferenceTypePrimaryRolePropEnum []any func init() { var res []string @@ -368,11 +376,15 @@ func (m *VolumeReference) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -422,11 +434,15 @@ func (m *VolumeReference) contextValidateCrn(ctx context.Context, formats strfmt } if err := m.Crn.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("crn") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("crn") } + return err } @@ -436,11 +452,15 @@ func (m *VolumeReference) contextValidateCrn(ctx context.Context, formats strfmt func (m *VolumeReference) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_snapshot_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_snapshot_list.go index 9190cd3302..35899a3b49 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_snapshot_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_snapshot_list.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *VolumeSnapshotList) validateVolumeSnapshots(formats strfmt.Registry) er if m.VolumeSnapshots[i] != nil { if err := m.VolumeSnapshots[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeSnapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeSnapshots" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *VolumeSnapshotList) contextValidateVolumeSnapshots(ctx context.Context, } if err := m.VolumeSnapshots[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumeSnapshots" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumeSnapshots" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go index 45225e3ca3..34664ad3fb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Volumes) validateVolumes(formats strfmt.Registry) error { if m.Volumes[i] != nil { if err := m.Volumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Volumes) contextValidateVolumes(ctx context.Context, formats strfmt.Reg } if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go index 6d9f8c3b45..8336f6768a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -85,11 +86,15 @@ func (m *VolumesCloneAsyncRequest) validateUserTags(formats strfmt.Registry) err } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -122,11 +127,15 @@ func (m *VolumesCloneAsyncRequest) ContextValidate(ctx context.Context, formats func (m *VolumesCloneAsyncRequest) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go index 5ce539cfc8..ec71122088 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -89,11 +90,15 @@ func (m *VolumesCloneDetail) validateClonedVolumes(formats strfmt.Registry) erro if m.ClonedVolumes[i] != nil { if err := m.ClonedVolumes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) } + return err } } @@ -161,11 +166,15 @@ func (m *VolumesCloneDetail) contextValidateClonedVolumes(ctx context.Context, f } if err := m.ClonedVolumes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go index e118ea23b4..e18870ae01 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -82,11 +83,15 @@ func (m *VolumesCloneExecute) validateUserTags(formats strfmt.Registry) error { } if err := m.UserTags.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } @@ -110,11 +115,15 @@ func (m *VolumesCloneExecute) ContextValidate(ctx context.Context, formats strfm func (m *VolumesCloneExecute) contextValidateUserTags(ctx context.Context, formats strfmt.Registry) error { if err := m.UserTags.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("userTags") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("userTags") } + return err } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_response.go index 09ecf72c26..7ab2407e76 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_response.go @@ -21,7 +21,7 @@ type VolumesCloneResponse struct { AdditionalProperties string `json:"additionalProperties,omitempty"` // A map of volume IDs to cloned volume IDs - ClonedVolumes interface{} `json:"clonedVolumes,omitempty"` + ClonedVolumes any `json:"clonedVolumes,omitempty"` } // Validate validates this volumes clone response diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go index e8abde5e34..cb7db97464 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -49,11 +50,15 @@ func (m *VolumesClones) validateVolumesClone(formats strfmt.Registry) error { if m.VolumesClone[i] != nil { if err := m.VolumesClone[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumesClone" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumesClone" + "." + strconv.Itoa(i)) } + return err } } @@ -88,11 +93,15 @@ func (m *VolumesClones) contextValidateVolumesClone(ctx context.Context, formats } if err := m.VolumesClone[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("volumesClone" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("volumesClone" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go index 89fdc4dc7b..e3145ecc4d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go @@ -8,6 +8,7 @@ package models import ( "context" "encoding/json" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -105,11 +106,15 @@ func (m *Workspace) validateDetails(formats strfmt.Registry) error { if m.Details != nil { if err := m.Details.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("details") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("details") } + return err } } @@ -134,11 +139,15 @@ func (m *Workspace) validateLocation(formats strfmt.Registry) error { if m.Location != nil { if err := m.Location.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("location") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("location") } + return err } } @@ -164,7 +173,7 @@ func (m *Workspace) validateStatus(formats strfmt.Registry) error { return nil } -var workspaceTypeTypePropEnum []interface{} +var workspaceTypeTypePropEnum []any func init() { var res []string @@ -230,11 +239,15 @@ func (m *Workspace) contextValidateDetails(ctx context.Context, formats strfmt.R if m.Details != nil { if err := m.Details.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("details") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("details") } + return err } } @@ -247,11 +260,15 @@ func (m *Workspace) contextValidateLocation(ctx context.Context, formats strfmt. if m.Location != nil { if err := m.Location.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("location") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("location") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go index a26cc6ea53..faf000d270 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -93,11 +94,15 @@ func (m *WorkspaceDetails) validateNetworkSecurityGroups(formats strfmt.Registry if m.NetworkSecurityGroups != nil { if err := m.NetworkSecurityGroups.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkSecurityGroups") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkSecurityGroups") } + return err } } @@ -112,11 +117,15 @@ func (m *WorkspaceDetails) validatePowerEdgeRouter(formats strfmt.Registry) erro if m.PowerEdgeRouter != nil { if err := m.PowerEdgeRouter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("powerEdgeRouter") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("powerEdgeRouter") } + return err } } @@ -151,11 +160,15 @@ func (m *WorkspaceDetails) contextValidateNetworkSecurityGroups(ctx context.Cont } if err := m.NetworkSecurityGroups.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("networkSecurityGroups") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("networkSecurityGroups") } + return err } } @@ -172,11 +185,15 @@ func (m *WorkspaceDetails) contextValidatePowerEdgeRouter(ctx context.Context, f } if err := m.PowerEdgeRouter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("powerEdgeRouter") - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("powerEdgeRouter") } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_network_security_groups_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_network_security_groups_details.go index baf2523e0b..a8e2f38a56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_network_security_groups_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_network_security_groups_details.go @@ -40,7 +40,7 @@ func (m *WorkspaceNetworkSecurityGroupsDetails) Validate(formats strfmt.Registry return nil } -var workspaceNetworkSecurityGroupsDetailsTypeStatePropEnum []interface{} +var workspaceNetworkSecurityGroupsDetailsTypeStatePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_power_edge_router_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_power_edge_router_details.go index 993163305f..e7639db65b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_power_edge_router_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_power_edge_router_details.go @@ -57,7 +57,7 @@ func (m *WorkspacePowerEdgeRouterDetails) Validate(formats strfmt.Registry) erro return nil } -var workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum []interface{} +var workspacePowerEdgeRouterDetailsTypeMigrationStatusPropEnum []any func init() { var res []string @@ -105,7 +105,7 @@ func (m *WorkspacePowerEdgeRouterDetails) validateMigrationStatus(formats strfmt return nil } -var workspacePowerEdgeRouterDetailsTypeStatePropEnum []interface{} +var workspacePowerEdgeRouterDetailsTypeStatePropEnum []any func init() { var res []string @@ -166,7 +166,7 @@ func (m *WorkspacePowerEdgeRouterDetails) validateState(formats strfmt.Registry) return nil } -var workspacePowerEdgeRouterDetailsTypeTypePropEnum []interface{} +var workspacePowerEdgeRouterDetailsTypeTypePropEnum []any func init() { var res []string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_ssh_keys.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_ssh_keys.go index 44eaea4cba..d935790dca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_ssh_keys.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_ssh_keys.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *WorkspaceSSHKeys) validateSSHKeys(formats strfmt.Registry) error { if m.SSHKeys[i] != nil { if err := m.SSHKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *WorkspaceSSHKeys) contextValidateSSHKeys(ctx context.Context, formats s } if err := m.SSHKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("sshKeys" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go index ef05e06211..cd18b3de87 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go @@ -7,6 +7,7 @@ package models import ( "context" + stderrors "errors" "strconv" "github.com/go-openapi/errors" @@ -52,11 +53,15 @@ func (m *Workspaces) validateWorkspaces(formats strfmt.Registry) error { if m.Workspaces[i] != nil { if err := m.Workspaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("workspaces" + "." + strconv.Itoa(i)) } + return err } } @@ -91,11 +96,15 @@ func (m *Workspaces) contextValidateWorkspaces(ctx context.Context, formats strf } if err := m.Workspaces[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { return ce.ValidateName("workspaces" + "." + strconv.Itoa(i)) } + return err } } diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go index 5b70ae7ff9..2fe9feb7b0 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go @@ -15,4 +15,4 @@ package core // limitations under the License. // Version of the SDK -const __VERSION__ = "5.21.0" +const __VERSION__ = "5.21.2" diff --git a/vendor/github.com/IBM/ibm-cos-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/IBM/ibm-cos-sdk-go/aws/endpoints/defaults.go index 3bb705161a..bf1d4fd0cd 100644 --- a/vendor/github.com/IBM/ibm-cos-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/IBM/ibm-cos-sdk-go/aws/endpoints/defaults.go @@ -73,10 +73,10 @@ func DefaultResolver() Resolver { // DefaultPartitions returns a list of the partitions the SDK is bundled // with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US). // -// partitions := endpoints.DefaultPartitions -// for _, p := range partitions { -// // ... inspect partitions -// } +// partitions := endpoints.DefaultPartitions +// for _, p := range partitions { +// // ... inspect partitions +// } func DefaultPartitions() []Partition { return defaultPartitions.Partitions() } diff --git a/vendor/github.com/IBM/ibm-cos-sdk-go/aws/version.go b/vendor/github.com/IBM/ibm-cos-sdk-go/aws/version.go index 770f83fd60..086a32b793 100644 --- a/vendor/github.com/IBM/ibm-cos-sdk-go/aws/version.go +++ b/vendor/github.com/IBM/ibm-cos-sdk-go/aws/version.go @@ -7,6 +7,6 @@ package aws const SDKName = "ibm-cos-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.12.3" +const SDKVersion = "1.12.4" // IBM COS SDK Code -- END diff --git a/vendor/github.com/IBM/ibm-cos-sdk-go/service/s3/api.go b/vendor/github.com/IBM/ibm-cos-sdk-go/service/s3/api.go index b1968d8c30..e47e73c7ae 100644 --- a/vendor/github.com/IBM/ibm-cos-sdk-go/service/s3/api.go +++ b/vendor/github.com/IBM/ibm-cos-sdk-go/service/s3/api.go @@ -3700,6 +3700,81 @@ func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts return out, req.Send() } +const opListBucketReplicationFailures = "ListBucketReplicationFailures" + +// ListBucketReplicationFailuresRequest generates a "aws/request.Request" representing the +// client's request for the ListBucketReplicationFailures operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBucketReplicationFailures for more information on using the ListBucketReplicationFailures +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the ListBucketReplicationFailuresRequest method. +// req, resp := client.ListBucketReplicationFailuresRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketReplicationFailures +func (c *S3) ListBucketReplicationFailuresRequest(input *ListBucketReplicationFailuresInput) (req *request.Request, output *ListBucketReplicationFailuresOutput) { + op := &request.Operation{ + Name: opListBucketReplicationFailures, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?ibm-replication-failures", + } + + if input == nil { + input = &ListBucketReplicationFailuresInput{} + } + + output = &ListBucketReplicationFailuresOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Build.PushBackNamed(request.NamedHandler{ + Name: "contentMd5Handler", + Fn: checksum.AddBodyContentMD5Handler, + }) + return +} + +// ListBucketReplicationFailures API operation for Amazon Simple Storage Service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation ListBucketReplicationFailures for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketReplicationFailures +func (c *S3) ListBucketReplicationFailures(input *ListBucketReplicationFailuresInput) (*ListBucketReplicationFailuresOutput, error) { + req, out := c.ListBucketReplicationFailuresRequest(input) + return out, req.Send() +} + +// ListBucketReplicationFailuresWithContext is the same as ListBucketReplicationFailures with the addition of +// the ability to pass a context and additional request options. +// +// See ListBucketReplicationFailures for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3) ListBucketReplicationFailuresWithContext(ctx aws.Context, input *ListBucketReplicationFailuresInput, opts ...request.Option) (*ListBucketReplicationFailuresOutput, error) { + req, out := c.ListBucketReplicationFailuresRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListBuckets = "ListBuckets" // ListBucketsRequest generates a "aws/request.Request" representing the @@ -5446,6 +5521,82 @@ func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketRe return out, req.Send() } +const opPutBucketReplicationReattempt = "PutBucketReplicationReattempt" + +// PutBucketReplicationReattemptRequest generates a "aws/request.Request" representing the +// client's request for the PutBucketReplicationReattempt operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutBucketReplicationReattempt for more information on using the PutBucketReplicationReattempt +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutBucketReplicationReattemptRequest method. +// req, resp := client.PutBucketReplicationReattemptRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationReattempt +func (c *S3) PutBucketReplicationReattemptRequest(input *PutBucketReplicationReattemptInput) (req *request.Request, output *PutBucketReplicationReattemptOutput) { + op := &request.Operation{ + Name: opPutBucketReplicationReattempt, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}?ibm-replication-reattempt", + } + + if input == nil { + input = &PutBucketReplicationReattemptInput{} + } + + output = &PutBucketReplicationReattemptOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(request.NamedHandler{ + Name: "contentMd5Handler", + Fn: checksum.AddBodyContentMD5Handler, + }) + return +} + +// PutBucketReplicationReattempt API operation for Amazon Simple Storage Service. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation PutBucketReplicationReattempt for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationReattempt +func (c *S3) PutBucketReplicationReattempt(input *PutBucketReplicationReattemptInput) (*PutBucketReplicationReattemptOutput, error) { + req, out := c.PutBucketReplicationReattemptRequest(input) + return out, req.Send() +} + +// PutBucketReplicationReattemptWithContext is the same as PutBucketReplicationReattempt with the addition of +// the ability to pass a context and additional request options. +// +// See PutBucketReplicationReattempt for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3) PutBucketReplicationReattemptWithContext(ctx aws.Context, input *PutBucketReplicationReattemptInput, opts ...request.Option) (*PutBucketReplicationReattemptOutput, error) { + req, out := c.PutBucketReplicationReattemptRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutBucketVersioning = "PutBucketVersioning" // PutBucketVersioningRequest generates a "aws/request.Request" representing the @@ -15906,6 +16057,128 @@ func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter { return s } +type ListBucketReplicationFailuresInput struct { + _ struct{} `locationName:"ListBucketReplicationFailuresRequest" type:"structure"` + + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` + + // Requests Amazon S3 to encode the object keys in the response and specifies + // the encoding method to use. An object key can contain any Unicode character; + // however, the XML 1.0 parser cannot parse some characters, such as characters + // with an ASCII value from 0 to 10. For characters that are not supported in + // XML 1.0, you can add this parameter to request that Amazon S3 encode the + // keys in the response. + EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` + + FirstSyncAttemptedBefore *string `location:"querystring" locationName:"first-sync-attempted-before" type:"string"` + + MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListBucketReplicationFailuresInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListBucketReplicationFailuresInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBucketReplicationFailuresInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBucketReplicationFailuresInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *ListBucketReplicationFailuresInput) SetBucket(v string) *ListBucketReplicationFailuresInput { + s.Bucket = &v + return s +} + +func (s *ListBucketReplicationFailuresInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *ListBucketReplicationFailuresInput) SetContinuationToken(v string) *ListBucketReplicationFailuresInput { + s.ContinuationToken = &v + return s +} + +// SetEncodingType sets the EncodingType field's value. +func (s *ListBucketReplicationFailuresInput) SetEncodingType(v string) *ListBucketReplicationFailuresInput { + s.EncodingType = &v + return s +} + +// SetFirstSyncAttemptedBefore sets the FirstSyncAttemptedBefore field's value. +func (s *ListBucketReplicationFailuresInput) SetFirstSyncAttemptedBefore(v string) *ListBucketReplicationFailuresInput { + s.FirstSyncAttemptedBefore = &v + return s +} + +// SetMaxKeys sets the MaxKeys field's value. +func (s *ListBucketReplicationFailuresInput) SetMaxKeys(v int64) *ListBucketReplicationFailuresInput { + s.MaxKeys = &v + return s +} + +type ListBucketReplicationFailuresOutput struct { + _ struct{} `type:"structure" payload:"ListReplicationFailureResult"` + + ListReplicationFailureResult *ListReplicationFailureResult `locationName:"ListReplicationFailureResult" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListBucketReplicationFailuresOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListBucketReplicationFailuresOutput) GoString() string { + return s.String() +} + +// SetListReplicationFailureResult sets the ListReplicationFailureResult field's value. +func (s *ListBucketReplicationFailuresOutput) SetListReplicationFailureResult(v *ListReplicationFailureResult) *ListBucketReplicationFailuresOutput { + s.ListReplicationFailureResult = v + return s +} + type ListBucketsExtendedInput struct { _ struct{} `locationName:"ListBucketsExtendedRequest" type:"structure"` @@ -17856,6 +18129,110 @@ func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput { return s } +type ListReplicationFailureResult struct { + _ struct{} `type:"structure"` + + // Contents is a required field + Contents []*ObjectSyncAttempted `locationNameList:"Contents" type:"list" flattened:"true" required:"true"` + + ContinuationToken *string `type:"string"` + + // Requests Amazon S3 to encode the object keys in the response and specifies + // the encoding method to use. An object key can contain any Unicode character; + // however, the XML 1.0 parser cannot parse some characters, such as characters + // with an ASCII value from 0 to 10. For characters that are not supported in + // XML 1.0, you can add this parameter to request that Amazon S3 encode the + // keys in the response. + EncodingType *string `type:"string" enum:"EncodingType"` + + FirstSyncAttemptedBefore *string `type:"string"` + + // IsTruncated is a required field + IsTruncated *bool `type:"boolean" required:"true"` + + // KeyCount is a required field + KeyCount *int64 `type:"integer" required:"true"` + + MaxKeys *int64 `type:"integer"` + + // Name is a required field + Name *string `type:"string" required:"true"` + + NextContinuationToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListReplicationFailureResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListReplicationFailureResult) GoString() string { + return s.String() +} + +// SetContents sets the Contents field's value. +func (s *ListReplicationFailureResult) SetContents(v []*ObjectSyncAttempted) *ListReplicationFailureResult { + s.Contents = v + return s +} + +// SetContinuationToken sets the ContinuationToken field's value. +func (s *ListReplicationFailureResult) SetContinuationToken(v string) *ListReplicationFailureResult { + s.ContinuationToken = &v + return s +} + +// SetEncodingType sets the EncodingType field's value. +func (s *ListReplicationFailureResult) SetEncodingType(v string) *ListReplicationFailureResult { + s.EncodingType = &v + return s +} + +// SetFirstSyncAttemptedBefore sets the FirstSyncAttemptedBefore field's value. +func (s *ListReplicationFailureResult) SetFirstSyncAttemptedBefore(v string) *ListReplicationFailureResult { + s.FirstSyncAttemptedBefore = &v + return s +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *ListReplicationFailureResult) SetIsTruncated(v bool) *ListReplicationFailureResult { + s.IsTruncated = &v + return s +} + +// SetKeyCount sets the KeyCount field's value. +func (s *ListReplicationFailureResult) SetKeyCount(v int64) *ListReplicationFailureResult { + s.KeyCount = &v + return s +} + +// SetMaxKeys sets the MaxKeys field's value. +func (s *ListReplicationFailureResult) SetMaxKeys(v int64) *ListReplicationFailureResult { + s.MaxKeys = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListReplicationFailureResult) SetName(v string) *ListReplicationFailureResult { + s.Name = &v + return s +} + +// SetNextContinuationToken sets the NextContinuationToken field's value. +func (s *ListReplicationFailureResult) SetNextContinuationToken(v string) *ListReplicationFailureResult { + s.NextContinuationToken = &v + return s +} + // Describes where logs are stored and the prefix that Amazon S3 assigns to // all log object keys for a bucket. For more information, see PUT Bucket logging // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) @@ -18439,6 +18816,81 @@ func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRul return s } +type ObjectSyncAttempted struct { + _ struct{} `type:"structure"` + + // FirstSyncAttempted is a required field + FirstSyncAttempted *time.Time `type:"timestamp" required:"true"` + + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // LastSyncAttempted is a required field + LastSyncAttempted *time.Time `type:"timestamp" required:"true"` + + SyncFailureCause *string `type:"string"` + + // SyncType is a required field + SyncType *string `type:"string" required:"true"` + + // VersionId is a required field + VersionId *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ObjectSyncAttempted) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ObjectSyncAttempted) GoString() string { + return s.String() +} + +// SetFirstSyncAttempted sets the FirstSyncAttempted field's value. +func (s *ObjectSyncAttempted) SetFirstSyncAttempted(v time.Time) *ObjectSyncAttempted { + s.FirstSyncAttempted = &v + return s +} + +// SetKey sets the Key field's value. +func (s *ObjectSyncAttempted) SetKey(v string) *ObjectSyncAttempted { + s.Key = &v + return s +} + +// SetLastSyncAttempted sets the LastSyncAttempted field's value. +func (s *ObjectSyncAttempted) SetLastSyncAttempted(v time.Time) *ObjectSyncAttempted { + s.LastSyncAttempted = &v + return s +} + +// SetSyncFailureCause sets the SyncFailureCause field's value. +func (s *ObjectSyncAttempted) SetSyncFailureCause(v string) *ObjectSyncAttempted { + s.SyncFailureCause = &v + return s +} + +// SetSyncType sets the SyncType field's value. +func (s *ObjectSyncAttempted) SetSyncType(v string) *ObjectSyncAttempted { + s.SyncType = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *ObjectSyncAttempted) SetVersionId(v string) *ObjectSyncAttempted { + s.VersionId = &v + return s +} + // The version of an object. type ObjectVersion struct { _ struct{} `type:"structure"` @@ -19487,6 +19939,82 @@ func (s PutBucketReplicationOutput) GoString() string { return s.String() } +type PutBucketReplicationReattemptInput struct { + _ struct{} `locationName:"PutBucketReplicationReattemptRequest" type:"structure"` + + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutBucketReplicationReattemptInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutBucketReplicationReattemptInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBucketReplicationReattemptInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationReattemptInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *PutBucketReplicationReattemptInput) SetBucket(v string) *PutBucketReplicationReattemptInput { + s.Bucket = &v + return s +} + +func (s *PutBucketReplicationReattemptInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type PutBucketReplicationReattemptOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutBucketReplicationReattemptOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutBucketReplicationReattemptOutput) GoString() string { + return s.String() +} + type PutBucketVersioningInput struct { _ struct{} `locationName:"PutBucketVersioningRequest" type:"structure" payload:"VersioningConfiguration"` diff --git a/vendor/github.com/IBM/networking-go-sdk/transitgatewayapisv1/transit_gateway_apis_v1.go b/vendor/github.com/IBM/networking-go-sdk/transitgatewayapisv1/transit_gateway_apis_v1.go index df0c02ccff..dffe47a9fc 100644 --- a/vendor/github.com/IBM/networking-go-sdk/transitgatewayapisv1/transit_gateway_apis_v1.go +++ b/vendor/github.com/IBM/networking-go-sdk/transitgatewayapisv1/transit_gateway_apis_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.73.0-eeee85a9-20230607-165104 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ // Package transitgatewayapisv1 : Operations and models for the TransitGatewayApisV1 service @@ -72,22 +72,26 @@ func NewTransitGatewayApisV1UsingExternalConfig(options *TransitGatewayApisV1Opt if options.Authenticator == nil { options.Authenticator, err = core.GetAuthenticatorFromEnvironment(options.ServiceName) if err != nil { + err = core.SDKErrorf(err, "", "env-auth-error", common.GetComponentInfo()) return } } transitGatewayApis, err = NewTransitGatewayApisV1(options) + err = core.RepurposeSDKProblem(err, "new-client-error") if err != nil { return } err = transitGatewayApis.Service.ConfigureService(options.ServiceName) if err != nil { + err = core.SDKErrorf(err, "", "client-config-error", common.GetComponentInfo()) return } if options.URL != "" { err = transitGatewayApis.Service.SetServiceURL(options.URL) + err = core.RepurposeSDKProblem(err, "url-set-error") } return } @@ -101,17 +105,20 @@ func NewTransitGatewayApisV1(options *TransitGatewayApisV1Options) (service *Tra err = core.ValidateStruct(options, "options") if err != nil { + err = core.SDKErrorf(err, "", "invalid-global-options", common.GetComponentInfo()) return } baseService, err := core.NewBaseService(serviceOptions) if err != nil { + err = core.SDKErrorf(err, "", "new-base-error", common.GetComponentInfo()) return } if options.URL != "" { err = baseService.SetServiceURL(options.URL) if err != nil { + err = core.SDKErrorf(err, "", "set-url-error", common.GetComponentInfo()) return } } @@ -126,7 +133,7 @@ func NewTransitGatewayApisV1(options *TransitGatewayApisV1Options) (service *Tra // GetServiceURLForRegion returns the service URL to be used for the specified region func GetServiceURLForRegion(region string) (string, error) { - return "", fmt.Errorf("service does not support regional URLs") + return "", core.SDKErrorf(nil, "service does not support regional URLs", "no-regional-support", common.GetComponentInfo()) } // Clone makes a copy of "transitGatewayApis" suitable for processing requests. @@ -141,7 +148,11 @@ func (transitGatewayApis *TransitGatewayApisV1) Clone() *TransitGatewayApisV1 { // SetServiceURL sets the service URL func (transitGatewayApis *TransitGatewayApisV1) SetServiceURL(url string) error { - return transitGatewayApis.Service.SetServiceURL(url) + err := transitGatewayApis.Service.SetServiceURL(url) + if err != nil { + err = core.SDKErrorf(err, "", "url-set-error", common.GetComponentInfo()) + } + return err } // GetServiceURL returns the service URL @@ -178,13 +189,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DisableRetries() { // ListTransitGateways : Retrieves all Transit Gateways // List all Transit Gateways in account the caller is authorized to view. func (transitGatewayApis *TransitGatewayApisV1) ListTransitGateways(listTransitGatewaysOptions *ListTransitGatewaysOptions) (result *TransitGatewayCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListTransitGatewaysWithContext(context.Background(), listTransitGatewaysOptions) + result, response, err = transitGatewayApis.ListTransitGatewaysWithContext(context.Background(), listTransitGatewaysOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListTransitGatewaysWithContext is an alternate form of the ListTransitGateways method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewaysWithContext(ctx context.Context, listTransitGatewaysOptions *ListTransitGatewaysOptions) (result *TransitGatewayCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listTransitGatewaysOptions, "listTransitGatewaysOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -193,15 +207,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewaysWithContext(c builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listTransitGatewaysOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGateways") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGateways") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listTransitGatewaysOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -216,17 +231,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewaysWithContext(c request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_transit_gateways", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -238,17 +257,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewaysWithContext(c // CreateTransitGateway : Creates a Transit Gateway // Create a Transit Gateway based on the supplied input template. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGateway(createTransitGatewayOptions *CreateTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayWithContext(context.Background(), createTransitGatewayOptions) + result, response, err = transitGatewayApis.CreateTransitGatewayWithContext(context.Background(), createTransitGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayWithContext is an alternate form of the CreateTransitGateway method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayWithContext(ctx context.Context, createTransitGatewayOptions *CreateTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayOptions, "createTransitGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayOptions, "createTransitGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -257,15 +280,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayWithContext( builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGateway") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGateway") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -291,22 +315,27 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayWithContext( } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -319,17 +348,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayWithContext( // This request deletes a Transit Gateway. This operation cannot be reversed. For this request to succeed, the Transit // Gateway must not contain connections. func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGateway(deleteTransitGatewayOptions *DeleteTransitGatewayOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.DeleteTransitGatewayWithContext(context.Background(), deleteTransitGatewayOptions) + response, err = transitGatewayApis.DeleteTransitGatewayWithContext(context.Background(), deleteTransitGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteTransitGatewayWithContext is an alternate form of the DeleteTransitGateway method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayWithContext(ctx context.Context, deleteTransitGatewayOptions *DeleteTransitGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteTransitGatewayOptions, "deleteTransitGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteTransitGatewayOptions, "deleteTransitGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -342,15 +375,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayWithContext( builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range deleteTransitGatewayOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGateway") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGateway") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range deleteTransitGatewayOptions.Headers { builder.AddHeader(headerName, headerValue) } @@ -358,10 +392,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayWithContext( request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_transit_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -369,17 +409,21 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayWithContext( // GetTransitGateway : Retrieves specified Transit Gateway // This request retrieves a single Transit Gateway specified by the identifier in the URL. func (transitGatewayApis *TransitGatewayApisV1) GetTransitGateway(getTransitGatewayOptions *GetTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetTransitGatewayWithContext(context.Background(), getTransitGatewayOptions) + result, response, err = transitGatewayApis.GetTransitGatewayWithContext(context.Background(), getTransitGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetTransitGatewayWithContext is an alternate form of the GetTransitGateway method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayWithContext(ctx context.Context, getTransitGatewayOptions *GetTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getTransitGatewayOptions, "getTransitGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getTransitGatewayOptions, "getTransitGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -392,15 +436,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayWithContext(ctx builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getTransitGatewayOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGateway") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGateway") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getTransitGatewayOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -409,17 +454,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayWithContext(ctx request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_transit_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -431,17 +480,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayWithContext(ctx // UpdateTransitGateway : Updates specified Transit Gateway // This request updates a Transit Gateway's name and/or global flag. func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGateway(updateTransitGatewayOptions *UpdateTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { - return transitGatewayApis.UpdateTransitGatewayWithContext(context.Background(), updateTransitGatewayOptions) + result, response, err = transitGatewayApis.UpdateTransitGatewayWithContext(context.Background(), updateTransitGatewayOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateTransitGatewayWithContext is an alternate form of the UpdateTransitGateway method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayWithContext(ctx context.Context, updateTransitGatewayOptions *UpdateTransitGatewayOptions) (result *TransitGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateTransitGatewayOptions, "updateTransitGatewayOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateTransitGatewayOptions, "updateTransitGatewayOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -454,15 +507,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayWithContext( builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range updateTransitGatewayOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGateway") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGateway") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range updateTransitGatewayOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -482,22 +536,27 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayWithContext( } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_transit_gateway", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGateway) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -509,13 +568,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayWithContext( // ListConnections : Retrieves all connections // List all transit gateway connections associated with this account. func (transitGatewayApis *TransitGatewayApisV1) ListConnections(listConnectionsOptions *ListConnectionsOptions) (result *TransitConnectionCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListConnectionsWithContext(context.Background(), listConnectionsOptions) + result, response, err = transitGatewayApis.ListConnectionsWithContext(context.Background(), listConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListConnectionsWithContext is an alternate form of the ListConnections method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListConnectionsWithContext(ctx context.Context, listConnectionsOptions *ListConnectionsOptions) (result *TransitConnectionCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listConnectionsOptions, "listConnectionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -524,15 +586,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListConnectionsWithContext(ctx c builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/connections`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listConnectionsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListConnections") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListConnections") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listConnectionsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -553,17 +616,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListConnectionsWithContext(ctx c request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitConnectionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -575,17 +642,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListConnectionsWithContext(ctx c // ListTransitGatewayConnections : Retrieves all connections in a Transit Gateway // This request retrieves all connections in a Transit Gateway. func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnections(listTransitGatewayConnectionsOptions *ListTransitGatewayConnectionsOptions) (result *TransitGatewayConnectionCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListTransitGatewayConnectionsWithContext(context.Background(), listTransitGatewayConnectionsOptions) + result, response, err = transitGatewayApis.ListTransitGatewayConnectionsWithContext(context.Background(), listTransitGatewayConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListTransitGatewayConnectionsWithContext is an alternate form of the ListTransitGatewayConnections method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionsWithContext(ctx context.Context, listTransitGatewayConnectionsOptions *ListTransitGatewayConnectionsOptions) (result *TransitGatewayConnectionCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listTransitGatewayConnectionsOptions, "listTransitGatewayConnectionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listTransitGatewayConnectionsOptions, "listTransitGatewayConnectionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -598,15 +669,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionsWit builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listTransitGatewayConnectionsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayConnections") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayConnections") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listTransitGatewayConnectionsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -624,17 +696,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionsWit request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_transit_gateway_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayConnectionCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -646,17 +722,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionsWit // CreateTransitGatewayConnection : Adds a connection to a Transit Gateway // Add a connection to Transit Gateway. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnection(createTransitGatewayConnectionOptions *CreateTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayConnectionWithContext(context.Background(), createTransitGatewayConnectionOptions) + result, response, err = transitGatewayApis.CreateTransitGatewayConnectionWithContext(context.Background(), createTransitGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayConnectionWithContext is an alternate form of the CreateTransitGatewayConnection method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionWithContext(ctx context.Context, createTransitGatewayConnectionOptions *CreateTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayConnectionOptions, "createTransitGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayConnectionOptions, "createTransitGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -669,15 +749,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionWi builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayConnectionOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnection") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnection") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayConnectionOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -736,22 +817,27 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionWi } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayConnectionCust) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -764,17 +850,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionWi // After the specified connection is detached, entities still within the Transit Gateway will no longer be able to // communicate directly to it through the IBM Cloud private backbone. func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnection(deleteTransitGatewayConnectionOptions *DeleteTransitGatewayConnectionOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.DeleteTransitGatewayConnectionWithContext(context.Background(), deleteTransitGatewayConnectionOptions) + response, err = transitGatewayApis.DeleteTransitGatewayConnectionWithContext(context.Background(), deleteTransitGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteTransitGatewayConnectionWithContext is an alternate form of the DeleteTransitGatewayConnection method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionWithContext(ctx context.Context, deleteTransitGatewayConnectionOptions *DeleteTransitGatewayConnectionOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteTransitGatewayConnectionOptions, "deleteTransitGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteTransitGatewayConnectionOptions, "deleteTransitGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -788,15 +878,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionWi builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range deleteTransitGatewayConnectionOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnection") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnection") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range deleteTransitGatewayConnectionOptions.Headers { builder.AddHeader(headerName, headerValue) } @@ -804,10 +895,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionWi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_transit_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -815,17 +912,21 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionWi // GetTransitGatewayConnection : Retrieves specified Transit Gateway connection // This request retrieves a connection from the Transit Gateway. func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnection(getTransitGatewayConnectionOptions *GetTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetTransitGatewayConnectionWithContext(context.Background(), getTransitGatewayConnectionOptions) + result, response, err = transitGatewayApis.GetTransitGatewayConnectionWithContext(context.Background(), getTransitGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetTransitGatewayConnectionWithContext is an alternate form of the GetTransitGatewayConnection method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionWithContext(ctx context.Context, getTransitGatewayConnectionOptions *GetTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getTransitGatewayConnectionOptions, "getTransitGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getTransitGatewayConnectionOptions, "getTransitGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -839,15 +940,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionWithC builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getTransitGatewayConnectionOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnection") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnection") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getTransitGatewayConnectionOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -856,17 +958,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionWithC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_transit_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayConnectionCust) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -878,17 +984,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionWithC // UpdateTransitGatewayConnection : Updates specified Transit Gateway connection // Update the name of a connection to a Transit Gateway. func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnection(updateTransitGatewayConnectionOptions *UpdateTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.UpdateTransitGatewayConnectionWithContext(context.Background(), updateTransitGatewayConnectionOptions) + result, response, err = transitGatewayApis.UpdateTransitGatewayConnectionWithContext(context.Background(), updateTransitGatewayConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateTransitGatewayConnectionWithContext is an alternate form of the UpdateTransitGatewayConnection method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionWithContext(ctx context.Context, updateTransitGatewayConnectionOptions *UpdateTransitGatewayConnectionOptions) (result *TransitGatewayConnectionCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateTransitGatewayConnectionOptions, "updateTransitGatewayConnectionOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateTransitGatewayConnectionOptions, "updateTransitGatewayConnectionOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -902,15 +1012,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionWi builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range updateTransitGatewayConnectionOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnection") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnection") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range updateTransitGatewayConnectionOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -927,22 +1038,27 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionWi } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_transit_gateway_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayConnectionCust) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -954,17 +1070,21 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionWi // CreateTransitGatewayConnectionActions : Performs actions on a connection for a Transit Gateway // Allow a network owner to approve or reject a cross-account connection request. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionActions(createTransitGatewayConnectionActionsOptions *CreateTransitGatewayConnectionActionsOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayConnectionActionsWithContext(context.Background(), createTransitGatewayConnectionActionsOptions) + response, err = transitGatewayApis.CreateTransitGatewayConnectionActionsWithContext(context.Background(), createTransitGatewayConnectionActionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayConnectionActionsWithContext is an alternate form of the CreateTransitGatewayConnectionActions method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionActionsWithContext(ctx context.Context, createTransitGatewayConnectionActionsOptions *CreateTransitGatewayConnectionActionsOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayConnectionActionsOptions, "createTransitGatewayConnectionActionsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayConnectionActionsOptions, "createTransitGatewayConnectionActionsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -978,15 +1098,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionAc builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/actions`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayConnectionActionsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnectionActions") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnectionActions") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayConnectionActionsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Content-Type", "application/json") @@ -999,15 +1120,22 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionAc } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway_connection_actions", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -1015,17 +1143,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionAc // ListTransitGatewayGreTunnel : Retrieves specified Transit Gateway redundant gre connection tunnels // This request retrieves a list of all the tunnels for connection. func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayGreTunnel(listTransitGatewayGreTunnelOptions *ListTransitGatewayGreTunnelOptions) (result *TransitGatewayTunnelCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListTransitGatewayGreTunnelWithContext(context.Background(), listTransitGatewayGreTunnelOptions) + result, response, err = transitGatewayApis.ListTransitGatewayGreTunnelWithContext(context.Background(), listTransitGatewayGreTunnelOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListTransitGatewayGreTunnelWithContext is an alternate form of the ListTransitGatewayGreTunnel method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayGreTunnelWithContext(ctx context.Context, listTransitGatewayGreTunnelOptions *ListTransitGatewayGreTunnelOptions) (result *TransitGatewayTunnelCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listTransitGatewayGreTunnelOptions, "listTransitGatewayGreTunnelOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listTransitGatewayGreTunnelOptions, "listTransitGatewayGreTunnelOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1039,15 +1171,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayGreTunnelWithC builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listTransitGatewayGreTunnelOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayGreTunnel") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayGreTunnel") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listTransitGatewayGreTunnelOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1056,17 +1189,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayGreTunnelWithC request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_transit_gateway_gre_tunnel", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayTunnelCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1078,17 +1215,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayGreTunnelWithC // CreateTransitGatewayGreTunnel : Creates a Transit Gateway redundant GRE tunnel // Add a tunnel to an existing Redundant GRE connection. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayGreTunnel(createTransitGatewayGreTunnelOptions *CreateTransitGatewayGreTunnelOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayGreTunnelWithContext(context.Background(), createTransitGatewayGreTunnelOptions) + result, response, err = transitGatewayApis.CreateTransitGatewayGreTunnelWithContext(context.Background(), createTransitGatewayGreTunnelOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayGreTunnelWithContext is an alternate form of the CreateTransitGatewayGreTunnel method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayGreTunnelWithContext(ctx context.Context, createTransitGatewayGreTunnelOptions *CreateTransitGatewayGreTunnelOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayGreTunnelOptions, "createTransitGatewayGreTunnelOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayGreTunnelOptions, "createTransitGatewayGreTunnelOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1102,15 +1243,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayGreTunnelWit builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayGreTunnelOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayGreTunnel") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayGreTunnel") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayGreTunnelOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1142,22 +1284,27 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayGreTunnelWit } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway_gre_tunnel", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1169,17 +1316,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayGreTunnelWit // DeleteTransitGatewayConnectionTunnels : Deletes a specified Transit Gateway redundant GRE tunnel // Remove a tunnel from a redundant GRE connection. func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionTunnels(deleteTransitGatewayConnectionTunnelsOptions *DeleteTransitGatewayConnectionTunnelsOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.DeleteTransitGatewayConnectionTunnelsWithContext(context.Background(), deleteTransitGatewayConnectionTunnelsOptions) + response, err = transitGatewayApis.DeleteTransitGatewayConnectionTunnelsWithContext(context.Background(), deleteTransitGatewayConnectionTunnelsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteTransitGatewayConnectionTunnelsWithContext is an alternate form of the DeleteTransitGatewayConnectionTunnels method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionTunnelsWithContext(ctx context.Context, deleteTransitGatewayConnectionTunnelsOptions *DeleteTransitGatewayConnectionTunnelsOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteTransitGatewayConnectionTunnelsOptions, "deleteTransitGatewayConnectionTunnelsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteTransitGatewayConnectionTunnelsOptions, "deleteTransitGatewayConnectionTunnelsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1194,15 +1345,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionTu builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range deleteTransitGatewayConnectionTunnelsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnectionTunnels") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnectionTunnels") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range deleteTransitGatewayConnectionTunnelsOptions.Headers { builder.AddHeader(headerName, headerValue) } @@ -1210,10 +1362,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionTu request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_transit_gateway_connection_tunnels", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -1221,17 +1379,21 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionTu // GetTransitGatewayConnectionTunnels : Retrieves specified Transit Gateway connection tunnel // This request retrieves a connection tunnel from the Transit Gateway connection. func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionTunnels(getTransitGatewayConnectionTunnelsOptions *GetTransitGatewayConnectionTunnelsOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetTransitGatewayConnectionTunnelsWithContext(context.Background(), getTransitGatewayConnectionTunnelsOptions) + result, response, err = transitGatewayApis.GetTransitGatewayConnectionTunnelsWithContext(context.Background(), getTransitGatewayConnectionTunnelsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetTransitGatewayConnectionTunnelsWithContext is an alternate form of the GetTransitGatewayConnectionTunnels method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionTunnelsWithContext(ctx context.Context, getTransitGatewayConnectionTunnelsOptions *GetTransitGatewayConnectionTunnelsOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getTransitGatewayConnectionTunnelsOptions, "getTransitGatewayConnectionTunnelsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getTransitGatewayConnectionTunnelsOptions, "getTransitGatewayConnectionTunnelsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1246,15 +1408,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionTunne builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getTransitGatewayConnectionTunnelsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnectionTunnels") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnectionTunnels") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getTransitGatewayConnectionTunnelsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1263,17 +1426,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionTunne request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_transit_gateway_connection_tunnels", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1285,17 +1452,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionTunne // UpdateTransitGatewayConnectionTunnels : Updates specified Transit Gateway redundant GRE tunnel // Update the name of a connection tunnel. func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionTunnels(updateTransitGatewayConnectionTunnelsOptions *UpdateTransitGatewayConnectionTunnelsOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { - return transitGatewayApis.UpdateTransitGatewayConnectionTunnelsWithContext(context.Background(), updateTransitGatewayConnectionTunnelsOptions) + result, response, err = transitGatewayApis.UpdateTransitGatewayConnectionTunnelsWithContext(context.Background(), updateTransitGatewayConnectionTunnelsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateTransitGatewayConnectionTunnelsWithContext is an alternate form of the UpdateTransitGatewayConnectionTunnels method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionTunnelsWithContext(ctx context.Context, updateTransitGatewayConnectionTunnelsOptions *UpdateTransitGatewayConnectionTunnelsOptions) (result *TransitGatewayTunnel, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateTransitGatewayConnectionTunnelsOptions, "updateTransitGatewayConnectionTunnelsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateTransitGatewayConnectionTunnelsOptions, "updateTransitGatewayConnectionTunnelsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1310,15 +1481,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionTu builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/tunnels/{gre_tunnel_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range updateTransitGatewayConnectionTunnelsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnectionTunnels") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnectionTunnels") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range updateTransitGatewayConnectionTunnelsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1328,22 +1500,27 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionTu _, err = builder.SetBodyContentJSON(updateTransitGatewayConnectionTunnelsOptions.TransitGatewayTunnelPatch) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_transit_gateway_connection_tunnels", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1355,13 +1532,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionTu // ListGatewayLocations : Lists all locations that support Transit Gateways // List all locations that support Transit Gateways. func (transitGatewayApis *TransitGatewayApisV1) ListGatewayLocations(listGatewayLocationsOptions *ListGatewayLocationsOptions) (result *TSCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListGatewayLocationsWithContext(context.Background(), listGatewayLocationsOptions) + result, response, err = transitGatewayApis.ListGatewayLocationsWithContext(context.Background(), listGatewayLocationsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListGatewayLocationsWithContext is an alternate form of the ListGatewayLocations method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListGatewayLocationsWithContext(ctx context.Context, listGatewayLocationsOptions *ListGatewayLocationsOptions) (result *TSCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listGatewayLocationsOptions, "listGatewayLocationsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1370,15 +1550,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListGatewayLocationsWithContext( builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/locations`, nil) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listGatewayLocationsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListGatewayLocations") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListGatewayLocations") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listGatewayLocationsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1387,17 +1568,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListGatewayLocationsWithContext( request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_gateway_locations", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTSCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1409,17 +1594,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListGatewayLocationsWithContext( // GetGatewayLocation : Shows the details of a given Transit Gateway location // Get the details of a Transit Gateway Location. func (transitGatewayApis *TransitGatewayApisV1) GetGatewayLocation(getGatewayLocationOptions *GetGatewayLocationOptions) (result *TSLocation, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetGatewayLocationWithContext(context.Background(), getGatewayLocationOptions) + result, response, err = transitGatewayApis.GetGatewayLocationWithContext(context.Background(), getGatewayLocationOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetGatewayLocationWithContext is an alternate form of the GetGatewayLocation method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetGatewayLocationWithContext(ctx context.Context, getGatewayLocationOptions *GetGatewayLocationOptions) (result *TSLocation, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getGatewayLocationOptions, "getGatewayLocationOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getGatewayLocationOptions, "getGatewayLocationOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1432,15 +1621,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetGatewayLocationWithContext(ct builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/locations/{name}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getGatewayLocationOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetGatewayLocation") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetGatewayLocation") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getGatewayLocationOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1449,17 +1639,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetGatewayLocationWithContext(ct request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_gateway_location", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalTSLocation) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1471,17 +1665,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetGatewayLocationWithContext(ct // ListTransitGatewayConnectionPrefixFilters : Retrieves all prefix filters in a Transit Gateway connection // This request retrieves all prefix filters in a Transit Gateway connection. func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionPrefixFilters(listTransitGatewayConnectionPrefixFiltersOptions *ListTransitGatewayConnectionPrefixFiltersOptions) (result *PrefixFilterCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListTransitGatewayConnectionPrefixFiltersWithContext(context.Background(), listTransitGatewayConnectionPrefixFiltersOptions) + result, response, err = transitGatewayApis.ListTransitGatewayConnectionPrefixFiltersWithContext(context.Background(), listTransitGatewayConnectionPrefixFiltersOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListTransitGatewayConnectionPrefixFiltersWithContext is an alternate form of the ListTransitGatewayConnectionPrefixFilters method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionPrefixFiltersWithContext(ctx context.Context, listTransitGatewayConnectionPrefixFiltersOptions *ListTransitGatewayConnectionPrefixFiltersOptions) (result *PrefixFilterCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listTransitGatewayConnectionPrefixFiltersOptions, "listTransitGatewayConnectionPrefixFiltersOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listTransitGatewayConnectionPrefixFiltersOptions, "listTransitGatewayConnectionPrefixFiltersOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1495,15 +1693,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionPref builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listTransitGatewayConnectionPrefixFiltersOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayConnectionPrefixFilters") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayConnectionPrefixFilters") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listTransitGatewayConnectionPrefixFiltersOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1512,17 +1711,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionPref request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_transit_gateway_connection_prefix_filters", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPrefixFilterCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1532,19 +1735,25 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayConnectionPref } // CreateTransitGatewayConnectionPrefixFilter : Add a prefix filter to a Transit Gateway connection -// Add a prefix filter to a Transit Gateway connection. +// Add a Prefix Filter to a Transit Gateway Connection. Prefix Filters can be added to `vpc`, `classic`, `directlink`, +// and `power_virtual_server` Connection types. Prefix Filters cannot be added to `gre_tunnel`, `unbound_gre_tunnel`, +// `redundant_gre` or `vpn_gateway` Connection types. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionPrefixFilter(createTransitGatewayConnectionPrefixFilterOptions *CreateTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayConnectionPrefixFilterWithContext(context.Background(), createTransitGatewayConnectionPrefixFilterOptions) + result, response, err = transitGatewayApis.CreateTransitGatewayConnectionPrefixFilterWithContext(context.Background(), createTransitGatewayConnectionPrefixFilterOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayConnectionPrefixFilterWithContext is an alternate form of the CreateTransitGatewayConnectionPrefixFilter method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionPrefixFilterWithContext(ctx context.Context, createTransitGatewayConnectionPrefixFilterOptions *CreateTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayConnectionPrefixFilterOptions, "createTransitGatewayConnectionPrefixFilterOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayConnectionPrefixFilterOptions, "createTransitGatewayConnectionPrefixFilterOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1558,15 +1767,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionPr builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayConnectionPrefixFilterOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnectionPrefixFilter") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayConnectionPrefixFilter") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayConnectionPrefixFilterOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1592,95 +1802,27 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayConnectionPr } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway_connection_prefix_filter", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPrefixFilterCust) if err != nil { - return - } - response.Result = result - } - - return -} - -// ReplaceTransitGatewayConnectionPrefixFilter : Replaces the prefix filters of the Transit Gateway connection -// Replaces the prefix filters of the Transit Gateway connection. -func (transitGatewayApis *TransitGatewayApisV1) ReplaceTransitGatewayConnectionPrefixFilter(replaceTransitGatewayConnectionPrefixFilterOptions *ReplaceTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ReplaceTransitGatewayConnectionPrefixFilterWithContext(context.Background(), replaceTransitGatewayConnectionPrefixFilterOptions) -} - -// ReplaceTransitGatewayConnectionPrefixFilterWithContext is an alternate form of the ReplaceTransitGatewayConnectionPrefixFilter method which supports a Context parameter -func (transitGatewayApis *TransitGatewayApisV1) ReplaceTransitGatewayConnectionPrefixFilterWithContext(ctx context.Context, replaceTransitGatewayConnectionPrefixFilterOptions *ReplaceTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCollection, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(replaceTransitGatewayConnectionPrefixFilterOptions, "replaceTransitGatewayConnectionPrefixFilterOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(replaceTransitGatewayConnectionPrefixFilterOptions, "replaceTransitGatewayConnectionPrefixFilterOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "transit_gateway_id": *replaceTransitGatewayConnectionPrefixFilterOptions.TransitGatewayID, - "id": *replaceTransitGatewayConnectionPrefixFilterOptions.ID, - } - - builder := core.NewRequestBuilder(core.PUT) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range replaceTransitGatewayConnectionPrefixFilterOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ReplaceTransitGatewayConnectionPrefixFilter") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") - - builder.AddQuery("version", fmt.Sprint(*transitGatewayApis.Version)) - - body := make(map[string]interface{}) - if replaceTransitGatewayConnectionPrefixFilterOptions.PrefixFilters != nil { - body["prefix_filters"] = replaceTransitGatewayConnectionPrefixFilterOptions.PrefixFilters - } - _, err = builder.SetBodyContentJSON(body) - if err != nil { - return - } - - request, err := builder.Build() - if err != nil { - return - } - - var rawResponse map[string]json.RawMessage - response, err = transitGatewayApis.Service.Request(request, &rawResponse) - if err != nil { - return - } - if rawResponse != nil { - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPrefixFilterCollection) - if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1692,17 +1834,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ReplaceTransitGatewayConnectionP // DeleteTransitGatewayConnectionPrefixFilter : Remove prefix filter from Transit Gateway connection // Delete a prefix filter. func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionPrefixFilter(deleteTransitGatewayConnectionPrefixFilterOptions *DeleteTransitGatewayConnectionPrefixFilterOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.DeleteTransitGatewayConnectionPrefixFilterWithContext(context.Background(), deleteTransitGatewayConnectionPrefixFilterOptions) + response, err = transitGatewayApis.DeleteTransitGatewayConnectionPrefixFilterWithContext(context.Background(), deleteTransitGatewayConnectionPrefixFilterOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteTransitGatewayConnectionPrefixFilterWithContext is an alternate form of the DeleteTransitGatewayConnectionPrefixFilter method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionPrefixFilterWithContext(ctx context.Context, deleteTransitGatewayConnectionPrefixFilterOptions *DeleteTransitGatewayConnectionPrefixFilterOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteTransitGatewayConnectionPrefixFilterOptions, "deleteTransitGatewayConnectionPrefixFilterOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteTransitGatewayConnectionPrefixFilterOptions, "deleteTransitGatewayConnectionPrefixFilterOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1717,15 +1863,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionPr builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters/{filter_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range deleteTransitGatewayConnectionPrefixFilterOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnectionPrefixFilter") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayConnectionPrefixFilter") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range deleteTransitGatewayConnectionPrefixFilterOptions.Headers { builder.AddHeader(headerName, headerValue) } @@ -1733,10 +1880,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionPr request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_transit_gateway_connection_prefix_filter", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -1744,17 +1897,21 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayConnectionPr // GetTransitGatewayConnectionPrefixFilter : Retrieves specified Transit Gateway connection prefix filter // This request retrieves a prefix filter from the Transit Gateway connection. func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionPrefixFilter(getTransitGatewayConnectionPrefixFilterOptions *GetTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetTransitGatewayConnectionPrefixFilterWithContext(context.Background(), getTransitGatewayConnectionPrefixFilterOptions) + result, response, err = transitGatewayApis.GetTransitGatewayConnectionPrefixFilterWithContext(context.Background(), getTransitGatewayConnectionPrefixFilterOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetTransitGatewayConnectionPrefixFilterWithContext is an alternate form of the GetTransitGatewayConnectionPrefixFilter method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionPrefixFilterWithContext(ctx context.Context, getTransitGatewayConnectionPrefixFilterOptions *GetTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getTransitGatewayConnectionPrefixFilterOptions, "getTransitGatewayConnectionPrefixFilterOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getTransitGatewayConnectionPrefixFilterOptions, "getTransitGatewayConnectionPrefixFilterOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1769,15 +1926,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionPrefi builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters/{filter_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getTransitGatewayConnectionPrefixFilterOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnectionPrefixFilter") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayConnectionPrefixFilter") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getTransitGatewayConnectionPrefixFilterOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1786,17 +1944,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionPrefi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_transit_gateway_connection_prefix_filter", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPrefixFilterCust) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1808,17 +1970,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayConnectionPrefi // UpdateTransitGatewayConnectionPrefixFilter : Updates specified Transit Gateway connection prefix filter // Update prefix filter for a Transit Gateway Connection. func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionPrefixFilter(updateTransitGatewayConnectionPrefixFilterOptions *UpdateTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { - return transitGatewayApis.UpdateTransitGatewayConnectionPrefixFilterWithContext(context.Background(), updateTransitGatewayConnectionPrefixFilterOptions) + result, response, err = transitGatewayApis.UpdateTransitGatewayConnectionPrefixFilterWithContext(context.Background(), updateTransitGatewayConnectionPrefixFilterOptions) + err = core.RepurposeSDKProblem(err, "") + return } // UpdateTransitGatewayConnectionPrefixFilterWithContext is an alternate form of the UpdateTransitGatewayConnectionPrefixFilter method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionPrefixFilterWithContext(ctx context.Context, updateTransitGatewayConnectionPrefixFilterOptions *UpdateTransitGatewayConnectionPrefixFilterOptions) (result *PrefixFilterCust, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateTransitGatewayConnectionPrefixFilterOptions, "updateTransitGatewayConnectionPrefixFilterOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(updateTransitGatewayConnectionPrefixFilterOptions, "updateTransitGatewayConnectionPrefixFilterOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1833,15 +1999,16 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionPr builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/connections/{id}/prefix_filters/{filter_id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range updateTransitGatewayConnectionPrefixFilterOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnectionPrefixFilter") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "UpdateTransitGatewayConnectionPrefixFilter") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range updateTransitGatewayConnectionPrefixFilterOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1867,22 +2034,27 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionPr } _, err = builder.SetBodyContentJSON(body) if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "update_transit_gateway_connection_prefix_filter", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPrefixFilterCust) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1895,17 +2067,21 @@ func (transitGatewayApis *TransitGatewayApisV1) UpdateTransitGatewayConnectionPr // Retrieve all route reports for the specified Transit Gateway. There will normally be at most one completed report // and one pending report. Additionally, completed route reports are written to IBM Cloud Activity Tracker. func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayRouteReports(listTransitGatewayRouteReportsOptions *ListTransitGatewayRouteReportsOptions) (result *RouteReportCollection, response *core.DetailedResponse, err error) { - return transitGatewayApis.ListTransitGatewayRouteReportsWithContext(context.Background(), listTransitGatewayRouteReportsOptions) + result, response, err = transitGatewayApis.ListTransitGatewayRouteReportsWithContext(context.Background(), listTransitGatewayRouteReportsOptions) + err = core.RepurposeSDKProblem(err, "") + return } // ListTransitGatewayRouteReportsWithContext is an alternate form of the ListTransitGatewayRouteReports method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayRouteReportsWithContext(ctx context.Context, listTransitGatewayRouteReportsOptions *ListTransitGatewayRouteReportsOptions) (result *RouteReportCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listTransitGatewayRouteReportsOptions, "listTransitGatewayRouteReportsOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(listTransitGatewayRouteReportsOptions, "listTransitGatewayRouteReportsOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1918,15 +2094,16 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayRouteReportsWi builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/route_reports`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range listTransitGatewayRouteReportsOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayRouteReports") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "ListTransitGatewayRouteReports") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range listTransitGatewayRouteReportsOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1935,17 +2112,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayRouteReportsWi request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "list_transit_gateway_route_reports", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteReportCollection) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -1958,17 +2139,21 @@ func (transitGatewayApis *TransitGatewayApisV1) ListTransitGatewayRouteReportsWi // Request route report generation. While report generation is in progress, additional requests to generate a report // are ignored and return the current pending report. func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayRouteReport(createTransitGatewayRouteReportOptions *CreateTransitGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error) { - return transitGatewayApis.CreateTransitGatewayRouteReportWithContext(context.Background(), createTransitGatewayRouteReportOptions) + result, response, err = transitGatewayApis.CreateTransitGatewayRouteReportWithContext(context.Background(), createTransitGatewayRouteReportOptions) + err = core.RepurposeSDKProblem(err, "") + return } // CreateTransitGatewayRouteReportWithContext is an alternate form of the CreateTransitGatewayRouteReport method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayRouteReportWithContext(ctx context.Context, createTransitGatewayRouteReportOptions *CreateTransitGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createTransitGatewayRouteReportOptions, "createTransitGatewayRouteReportOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(createTransitGatewayRouteReportOptions, "createTransitGatewayRouteReportOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -1981,15 +2166,16 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayRouteReportW builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/route_reports`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range createTransitGatewayRouteReportOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayRouteReport") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "CreateTransitGatewayRouteReport") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range createTransitGatewayRouteReportOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -1998,17 +2184,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayRouteReportW request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "create_transit_gateway_route_report", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteReport) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2020,17 +2210,21 @@ func (transitGatewayApis *TransitGatewayApisV1) CreateTransitGatewayRouteReportW // DeleteTransitGatewayRouteReport : Deletes a route report // Delete a route report. func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayRouteReport(deleteTransitGatewayRouteReportOptions *DeleteTransitGatewayRouteReportOptions) (response *core.DetailedResponse, err error) { - return transitGatewayApis.DeleteTransitGatewayRouteReportWithContext(context.Background(), deleteTransitGatewayRouteReportOptions) + response, err = transitGatewayApis.DeleteTransitGatewayRouteReportWithContext(context.Background(), deleteTransitGatewayRouteReportOptions) + err = core.RepurposeSDKProblem(err, "") + return } // DeleteTransitGatewayRouteReportWithContext is an alternate form of the DeleteTransitGatewayRouteReport method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayRouteReportWithContext(ctx context.Context, deleteTransitGatewayRouteReportOptions *DeleteTransitGatewayRouteReportOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteTransitGatewayRouteReportOptions, "deleteTransitGatewayRouteReportOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(deleteTransitGatewayRouteReportOptions, "deleteTransitGatewayRouteReportOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2044,15 +2238,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayRouteReportW builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/route_reports/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range deleteTransitGatewayRouteReportOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayRouteReport") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "DeleteTransitGatewayRouteReport") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range deleteTransitGatewayRouteReportOptions.Headers { builder.AddHeader(headerName, headerValue) } @@ -2060,10 +2255,16 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayRouteReportW request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } response, err = transitGatewayApis.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_transit_gateway_route_report", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } return } @@ -2071,17 +2272,21 @@ func (transitGatewayApis *TransitGatewayApisV1) DeleteTransitGatewayRouteReportW // GetTransitGatewayRouteReport : Retrieves a route report // Retrieve a route report. func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayRouteReport(getTransitGatewayRouteReportOptions *GetTransitGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error) { - return transitGatewayApis.GetTransitGatewayRouteReportWithContext(context.Background(), getTransitGatewayRouteReportOptions) + result, response, err = transitGatewayApis.GetTransitGatewayRouteReportWithContext(context.Background(), getTransitGatewayRouteReportOptions) + err = core.RepurposeSDKProblem(err, "") + return } // GetTransitGatewayRouteReportWithContext is an alternate form of the GetTransitGatewayRouteReport method which supports a Context parameter func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayRouteReportWithContext(ctx context.Context, getTransitGatewayRouteReportOptions *GetTransitGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getTransitGatewayRouteReportOptions, "getTransitGatewayRouteReportOptions cannot be nil") if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } err = core.ValidateStruct(getTransitGatewayRouteReportOptions, "getTransitGatewayRouteReportOptions") if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } @@ -2095,15 +2300,16 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayRouteReportWith builder.EnableGzipCompression = transitGatewayApis.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(transitGatewayApis.Service.Options.URL, `/transit_gateways/{transit_gateway_id}/route_reports/{id}`, pathParamsMap) if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - for headerName, headerValue := range getTransitGatewayRouteReportOptions.Headers { + sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayRouteReport") + for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("transit_gateway_apis", "V1", "GetTransitGatewayRouteReport") - for headerName, headerValue := range sdkHeaders { + for headerName, headerValue := range getTransitGatewayRouteReportOptions.Headers { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") @@ -2112,17 +2318,21 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayRouteReportWith request, err := builder.Build() if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } var rawResponse map[string]json.RawMessage response, err = transitGatewayApis.Service.Request(request, &rawResponse) if err != nil { + core.EnrichHTTPProblem(err, "get_transit_gateway_route_report", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } if rawResponse != nil { err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteReport) if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) return } response.Result = result @@ -2130,6 +2340,9 @@ func (transitGatewayApis *TransitGatewayApisV1) GetTransitGatewayRouteReportWith return } +func getServiceComponentInfo() *core.ProblemComponent { + return core.NewProblemComponent(DefaultServiceName, "__VERSION__") +} // CreateTransitGatewayConnectionActionsOptions : The CreateTransitGatewayConnectionActions options. type CreateTransitGatewayConnectionActionsOptions struct { @@ -2142,7 +2355,7 @@ type CreateTransitGatewayConnectionActionsOptions struct { // The action that is to be performed against the connection request. Action *string `json:"action" validate:"required"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2305,7 +2518,7 @@ type CreateTransitGatewayConnectionOptions struct { // `redundant_gre` connections. Zone ZoneIdentityIntf `json:"zone,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2501,7 +2714,7 @@ type CreateTransitGatewayConnectionPrefixFilterOptions struct { // If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. Le *int64 `json:"le,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2604,7 +2817,7 @@ type CreateTransitGatewayGreTunnelOptions struct { // will assign an ASN. RemoteBgpAsn *int64 `json:"remote_bgp_asn,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2700,7 +2913,7 @@ type CreateTransitGatewayOptions struct { // group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. ResourceGroup *ResourceGroupIdentity `json:"resource_group,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2753,7 +2966,7 @@ type CreateTransitGatewayRouteReportOptions struct { // The Transit Gateway identifier. TransitGatewayID *string `json:"transit_gateway_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2784,7 +2997,7 @@ type DeleteTransitGatewayConnectionOptions struct { // The connection identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2825,7 +3038,7 @@ type DeleteTransitGatewayConnectionPrefixFilterOptions struct { // Prefix filter identifier. FilterID *string `json:"filter_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2873,7 +3086,7 @@ type DeleteTransitGatewayConnectionTunnelsOptions struct { // The tunnel identifier. GreTunnelID *string `json:"gre_tunnel_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2915,7 +3128,7 @@ type DeleteTransitGatewayOptions struct { // The Transit Gateway identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2946,7 +3159,7 @@ type DeleteTransitGatewayRouteReportOptions struct { // Route report identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -2981,7 +3194,7 @@ type GetGatewayLocationOptions struct { // The Transit Gateway location Name. Name *string `json:"name" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3012,7 +3225,7 @@ type GetTransitGatewayConnectionOptions struct { // The connection identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3053,7 +3266,7 @@ type GetTransitGatewayConnectionPrefixFilterOptions struct { // Prefix filter identifier. FilterID *string `json:"filter_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3101,7 +3314,7 @@ type GetTransitGatewayConnectionTunnelsOptions struct { // The tunnel identifier. GreTunnelID *string `json:"gre_tunnel_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3143,7 +3356,7 @@ type GetTransitGatewayOptions struct { // The Transit Gateway identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3174,7 +3387,7 @@ type GetTransitGatewayRouteReportOptions struct { // Route report identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3218,7 +3431,7 @@ type ListConnectionsOptions struct { // Search for connections with the given network_type value. NetworkType *string `json:"network_type,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3260,7 +3473,7 @@ func (options *ListConnectionsOptions) SetHeaders(param map[string]string) *List // ListGatewayLocationsOptions : The ListGatewayLocations options. type ListGatewayLocationsOptions struct { - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3283,7 +3496,7 @@ type ListTransitGatewayConnectionPrefixFiltersOptions struct { // The connection identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3327,7 +3540,7 @@ type ListTransitGatewayConnectionsOptions struct { // Search for connections with the given name. Name *string `json:"name,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3376,7 +3589,7 @@ type ListTransitGatewayGreTunnelOptions struct { // The connection identifier. ID *string `json:"id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3411,7 +3624,7 @@ type ListTransitGatewayRouteReportsOptions struct { // The Transit Gateway identifier. TransitGatewayID *string `json:"transit_gateway_id" validate:"required,ne="` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3442,7 +3655,7 @@ type ListTransitGatewaysOptions struct { // A server supplied token determining which resource to start the page on. Start *string `json:"start,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -3480,6 +3693,7 @@ func UnmarshalPaginationFirstConnection(m map[string]json.RawMessage, result int obj := new(PaginationFirstConnection) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3497,6 +3711,7 @@ func UnmarshalPaginationFirstTG(m map[string]json.RawMessage, result interface{} obj := new(PaginationFirstTG) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3515,6 +3730,7 @@ func UnmarshalPaginationFirstTGWConnection(m map[string]json.RawMessage, result obj := new(PaginationFirstTGWConnection) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3535,10 +3751,12 @@ func UnmarshalPaginationNextConnection(m map[string]json.RawMessage, result inte obj := new(PaginationNextConnection) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "start", &obj.Start) if err != nil { + err = core.SDKErrorf(err, "", "start-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3559,10 +3777,12 @@ func UnmarshalPaginationNextTG(m map[string]json.RawMessage, result interface{}) obj := new(PaginationNextTG) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "start", &obj.Start) if err != nil { + err = core.SDKErrorf(err, "", "start-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3583,10 +3803,12 @@ func UnmarshalPaginationNextTGWConnection(m map[string]json.RawMessage, result i obj := new(PaginationNextTGWConnection) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "start", &obj.Start) if err != nil { + err = core.SDKErrorf(err, "", "start-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3604,6 +3826,7 @@ func UnmarshalPrefixFilterCollection(m map[string]json.RawMessage, result interf obj := new(PrefixFilterCollection) err = core.UnmarshalModel(m, "prefix_filters", &obj.PrefixFilters, UnmarshalPrefixFilterCust) if err != nil { + err = core.SDKErrorf(err, "", "prefix_filters-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3668,157 +3891,48 @@ func UnmarshalPrefixFilterCust(m map[string]json.RawMessage, result interface{}) obj := new(PrefixFilterCust) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "before", &obj.Before) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ge", &obj.Ge) if err != nil { + err = core.SDKErrorf(err, "", "ge-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "le", &obj.Le) if err != nil { + err = core.SDKErrorf(err, "", "le-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// PrefixFilterPut : A prefix filter update template. -type PrefixFilterPut struct { - // Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. - Action *string `json:"action" validate:"required"` - - // Defines the minimum matched prefix precision. If this field is non-zero then the filter will match all routes within - // the `prefix` that have a prefix length greater or equal to this value. - // - // This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - // or less then or equal to 32. If this value is set to zero, the filter will not use the `ge` route matching behavior. - // If the `le` value is non-zero the the `ge` value must between the prefix length and the - // `le` value, inclusive. - Ge *int64 `json:"ge,omitempty"` - - // Defines the maximum matched prefix precision. If this field is non-zero then the filter will match all routes within - // the `prefix` that have a prefix length less than or equal to this value. - // - // This value can be zero, or a non-negative number greater than or equal to the prefix length of the filter's prefix - // or less then or equal to 32. If this value is set to zero, the filter will not use the `le` route matching behavior. - // If the `ge` value is non-zero the the `le` value must between the `ge` value and 32, inclusive. - Le *int64 `json:"le,omitempty"` - - // The IPv4 Prefix to be matched by this filter. If both the `le` and `ge` are zero, then this filter will only apply - // to routes that exactly match this prefix, while a non-zero value for either `le` or `ge`, this filter can apply to - // multiple routes with different prefix lengths, but will still only apply to prefixes contained in the address space - // defined by `prefix`. - Prefix *string `json:"prefix" validate:"required"` -} - -// Constants associated with the PrefixFilterPut.Action property. -// Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. -const ( - PrefixFilterPut_Action_Deny = "deny" - PrefixFilterPut_Action_Permit = "permit" -) - -// NewPrefixFilterPut : Instantiate PrefixFilterPut (Generic Model Constructor) -func (*TransitGatewayApisV1) NewPrefixFilterPut(action string, prefix string) (_model *PrefixFilterPut, err error) { - _model = &PrefixFilterPut{ - Action: core.StringPtr(action), - Prefix: core.StringPtr(prefix), - } - err = core.ValidateStruct(_model, "required parameters") - return -} - -// UnmarshalPrefixFilterPut unmarshals an instance of PrefixFilterPut from the specified map of raw messages. -func UnmarshalPrefixFilterPut(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(PrefixFilterPut) - err = core.UnmarshalPrimitive(m, "action", &obj.Action) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "ge", &obj.Ge) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "le", &obj.Le) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// ReplaceTransitGatewayConnectionPrefixFilterOptions : The ReplaceTransitGatewayConnectionPrefixFilter options. -type ReplaceTransitGatewayConnectionPrefixFilterOptions struct { - // The Transit Gateway identifier. - TransitGatewayID *string `json:"transit_gateway_id" validate:"required,ne="` - - // The connection identifier. - ID *string `json:"id" validate:"required,ne="` - - // Array of prefix filters. - PrefixFilters []PrefixFilterPut `json:"prefix_filters" validate:"required"` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewReplaceTransitGatewayConnectionPrefixFilterOptions : Instantiate ReplaceTransitGatewayConnectionPrefixFilterOptions -func (*TransitGatewayApisV1) NewReplaceTransitGatewayConnectionPrefixFilterOptions(transitGatewayID string, id string, prefixFilters []PrefixFilterPut) *ReplaceTransitGatewayConnectionPrefixFilterOptions { - return &ReplaceTransitGatewayConnectionPrefixFilterOptions{ - TransitGatewayID: core.StringPtr(transitGatewayID), - ID: core.StringPtr(id), - PrefixFilters: prefixFilters, - } -} - -// SetTransitGatewayID : Allow user to set TransitGatewayID -func (_options *ReplaceTransitGatewayConnectionPrefixFilterOptions) SetTransitGatewayID(transitGatewayID string) *ReplaceTransitGatewayConnectionPrefixFilterOptions { - _options.TransitGatewayID = core.StringPtr(transitGatewayID) - return _options -} - -// SetID : Allow user to set ID -func (_options *ReplaceTransitGatewayConnectionPrefixFilterOptions) SetID(id string) *ReplaceTransitGatewayConnectionPrefixFilterOptions { - _options.ID = core.StringPtr(id) - return _options -} - -// SetPrefixFilters : Allow user to set PrefixFilters -func (_options *ReplaceTransitGatewayConnectionPrefixFilterOptions) SetPrefixFilters(prefixFilters []PrefixFilterPut) *ReplaceTransitGatewayConnectionPrefixFilterOptions { - _options.PrefixFilters = prefixFilters - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *ReplaceTransitGatewayConnectionPrefixFilterOptions) SetHeaders(param map[string]string) *ReplaceTransitGatewayConnectionPrefixFilterOptions { - options.Headers = param - return options -} - // ResourceGroupIdentity : The resource group to use. If unspecified, the account's [default resource // group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. type ResourceGroupIdentity struct { @@ -3832,6 +3946,9 @@ func (*TransitGatewayApisV1) NewResourceGroupIdentity(id string) (_model *Resour ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -3840,6 +3957,7 @@ func UnmarshalResourceGroupIdentity(m map[string]json.RawMessage, result interfa obj := new(ResourceGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3861,10 +3979,12 @@ func UnmarshalResourceGroupReference(m map[string]json.RawMessage, result interf obj := new(ResourceGroupReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3907,26 +4027,32 @@ func UnmarshalRouteReport(m map[string]json.RawMessage, result interface{}) (err obj := new(RouteReport) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalRouteReportConnection) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "overlapping_routes", &obj.OverlappingRoutes, UnmarshalRouteReportOverlappingRouteGroup) if err != nil { + err = core.SDKErrorf(err, "", "overlapping_routes-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3944,6 +4070,7 @@ func UnmarshalRouteReportCollection(m map[string]json.RawMessage, result interfa obj := new(RouteReportCollection) err = core.UnmarshalModel(m, "route_reports", &obj.RouteReports, UnmarshalRouteReport) if err != nil { + err = core.SDKErrorf(err, "", "route_reports-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -3973,22 +4100,27 @@ func UnmarshalRouteReportConnection(m map[string]json.RawMessage, result interfa obj := new(RouteReportConnection) err = core.UnmarshalModel(m, "bgps", &obj.Bgps, UnmarshalRouteReportConnectionBgp) if err != nil { + err = core.SDKErrorf(err, "", "bgps-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReportConnectionRoute) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4015,18 +4147,22 @@ func UnmarshalRouteReportConnectionBgp(m map[string]json.RawMessage, result inte obj := new(RouteReportConnectionBgp) err = core.UnmarshalPrimitive(m, "as_path", &obj.AsPath) if err != nil { + err = core.SDKErrorf(err, "", "as_path-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "is_used", &obj.IsUsed) if err != nil { + err = core.SDKErrorf(err, "", "is_used-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_preference", &obj.LocalPreference) if err != nil { + err = core.SDKErrorf(err, "", "local_preference-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4044,6 +4180,7 @@ func UnmarshalRouteReportConnectionRoute(m map[string]json.RawMessage, result in obj := new(RouteReportConnectionRoute) err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4064,10 +4201,12 @@ func UnmarshalRouteReportOverlappingRoute(m map[string]json.RawMessage, result i obj := new(RouteReportOverlappingRoute) err = core.UnmarshalPrimitive(m, "connection_id", &obj.ConnectionID) if err != nil { + err = core.SDKErrorf(err, "", "connection_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4085,6 +4224,7 @@ func UnmarshalRouteReportOverlappingRouteGroup(m map[string]json.RawMessage, res obj := new(RouteReportOverlappingRouteGroup) err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReportOverlappingRoute) if err != nil { + err = core.SDKErrorf(err, "", "routes-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4102,6 +4242,7 @@ func UnmarshalTSCollection(m map[string]json.RawMessage, result interface{}) (er obj := new(TSCollection) err = core.UnmarshalModel(m, "locations", &obj.Locations, UnmarshalTSLocationBasic) if err != nil { + err = core.SDKErrorf(err, "", "locations-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4139,18 +4280,22 @@ func UnmarshalTSLocalLocation(m map[string]json.RawMessage, result interface{}) obj := new(TSLocalLocation) err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) if err != nil { + err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "supported_connection_types", &obj.SupportedConnectionTypes) if err != nil { + err = core.SDKErrorf(err, "", "supported_connection_types-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4180,22 +4325,27 @@ func UnmarshalTSLocation(m map[string]json.RawMessage, result interface{}) (err obj := new(TSLocation) err = core.UnmarshalPrimitive(m, "billing_location", &obj.BillingLocation) if err != nil { + err = core.SDKErrorf(err, "", "billing_location-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "local_connection_locations", &obj.LocalConnectionLocations, UnmarshalTSLocalLocation) if err != nil { + err = core.SDKErrorf(err, "", "local_connection_locations-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zones-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4219,14 +4369,17 @@ func UnmarshalTSLocationBasic(m map[string]json.RawMessage, result interface{}) obj := new(TSLocationBasic) err = core.UnmarshalPrimitive(m, "billing_location", &obj.BillingLocation) if err != nil { + err = core.SDKErrorf(err, "", "billing_location-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4387,94 +4540,117 @@ func UnmarshalTransitConnection(m map[string]json.RawMessage, result interface{} obj := new(TransitConnection) err = core.UnmarshalPrimitive(m, "base_network_type", &obj.BaseNetworkType) if err != nil { + err = core.SDKErrorf(err, "", "base_network_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_id", &obj.NetworkID) if err != nil { + err = core.SDKErrorf(err, "", "network_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_type", &obj.NetworkType) if err != nil { + err = core.SDKErrorf(err, "", "network_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "base_connection_id", &obj.BaseConnectionID) if err != nil { + err = core.SDKErrorf(err, "", "base_connection_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_bgp_asn", &obj.LocalBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "local_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_gateway_ip", &obj.LocalGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "local_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_tunnel_ip", &obj.LocalTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "local_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mtu", &obj.Mtu) if err != nil { + err = core.SDKErrorf(err, "", "mtu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_account_id", &obj.NetworkAccountID) if err != nil { + err = core.SDKErrorf(err, "", "network_account_id-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "prefix_filters", &obj.PrefixFilters, UnmarshalTransitGatewayConnectionPrefixFilterReference) if err != nil { + err = core.SDKErrorf(err, "", "prefix_filters-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix_filters_default", &obj.PrefixFiltersDefault) if err != nil { + err = core.SDKErrorf(err, "", "prefix_filters_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_bgp_asn", &obj.RemoteBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "remote_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_gateway_ip", &obj.RemoteGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_tunnel_ip", &obj.RemoteTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "request_status", &obj.RequestStatus) if err != nil { + err = core.SDKErrorf(err, "", "request_status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "transit_gateway", &obj.TransitGateway, UnmarshalTransitGatewayReference) if err != nil { + err = core.SDKErrorf(err, "", "transit_gateway-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4501,18 +4677,22 @@ func UnmarshalTransitConnectionCollection(m map[string]json.RawMessage, result i obj := new(TransitConnectionCollection) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalTransitConnection) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPaginationFirstConnection) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPaginationNextConnection) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4585,50 +4765,62 @@ func UnmarshalTransitGateway(m map[string]json.RawMessage, result interface{}) ( obj := new(TransitGateway) err = core.UnmarshalPrimitive(m, "connection_count", &obj.ConnectionCount) if err != nil { + err = core.SDKErrorf(err, "", "connection_count-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "connection_needs_attention", &obj.ConnectionNeedsAttention) if err != nil { + err = core.SDKErrorf(err, "", "connection_needs_attention-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "crn", &obj.Crn) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "global", &obj.Global) if err != nil { + err = core.SDKErrorf(err, "", "global-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "gre_enhanced_route_propagation", &obj.GreEnhancedRoutePropagation) if err != nil { + err = core.SDKErrorf(err, "", "gre_enhanced_route_propagation-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "location", &obj.Location) if err != nil { + err = core.SDKErrorf(err, "", "location-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4655,18 +4847,22 @@ func UnmarshalTransitGatewayCollection(m map[string]json.RawMessage, result inte obj := new(TransitGatewayCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPaginationFirstTG) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPaginationNextTG) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "transit_gateways", &obj.TransitGateways, UnmarshalTransitGateway) if err != nil { + err = core.SDKErrorf(err, "", "transit_gateways-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4706,22 +4902,27 @@ func UnmarshalTransitGatewayConnectionCollection(m map[string]json.RawMessage, r obj := new(TransitGatewayConnectionCollection) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalTransitGatewayConnectionCust) if err != nil { + err = core.SDKErrorf(err, "", "connections-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPaginationFirstTGWConnection) if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPaginationNextTGWConnection) if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -4898,94 +5099,117 @@ func UnmarshalTransitGatewayConnectionCust(m map[string]json.RawMessage, result obj := new(TransitGatewayConnectionCust) err = core.UnmarshalPrimitive(m, "base_connection_id", &obj.BaseConnectionID) if err != nil { + err = core.SDKErrorf(err, "", "base_connection_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "base_network_type", &obj.BaseNetworkType) if err != nil { + err = core.SDKErrorf(err, "", "base_network_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "cidr", &obj.Cidr) if err != nil { + err = core.SDKErrorf(err, "", "cidr-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_bgp_asn", &obj.LocalBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "local_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_gateway_ip", &obj.LocalGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "local_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_tunnel_ip", &obj.LocalTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "local_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mtu", &obj.Mtu) if err != nil { + err = core.SDKErrorf(err, "", "mtu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_account_id", &obj.NetworkAccountID) if err != nil { + err = core.SDKErrorf(err, "", "network_account_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_id", &obj.NetworkID) if err != nil { + err = core.SDKErrorf(err, "", "network_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_type", &obj.NetworkType) if err != nil { + err = core.SDKErrorf(err, "", "network_type-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "prefix_filters", &obj.PrefixFilters, UnmarshalTransitGatewayConnectionPrefixFilterReference) if err != nil { + err = core.SDKErrorf(err, "", "prefix_filters-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix_filters_default", &obj.PrefixFiltersDefault) if err != nil { + err = core.SDKErrorf(err, "", "prefix_filters_default-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_bgp_asn", &obj.RemoteBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "remote_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_gateway_ip", &obj.RemoteGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_tunnel_ip", &obj.RemoteTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "request_status", &obj.RequestStatus) if err != nil { + err = core.SDKErrorf(err, "", "request_status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5021,6 +5245,9 @@ func (*TransitGatewayApisV1) NewTransitGatewayConnectionPrefixFilter(action stri Prefix: core.StringPtr(prefix), } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -5029,18 +5256,22 @@ func UnmarshalTransitGatewayConnectionPrefixFilter(m map[string]json.RawMessage, obj := new(TransitGatewayConnectionPrefixFilter) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ge", &obj.Ge) if err != nil { + err = core.SDKErrorf(err, "", "ge-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "le", &obj.Le) if err != nil { + err = core.SDKErrorf(err, "", "le-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5101,34 +5332,42 @@ func UnmarshalTransitGatewayConnectionPrefixFilterReference(m map[string]json.Ra obj := new(TransitGatewayConnectionPrefixFilterReference) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { + err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "before", &obj.Before) if err != nil { + err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "ge", &obj.Ge) if err != nil { + err = core.SDKErrorf(err, "", "ge-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "le", &obj.Le) if err != nil { + err = core.SDKErrorf(err, "", "le-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "prefix", &obj.Prefix) if err != nil { + err = core.SDKErrorf(err, "", "prefix-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5152,14 +5391,17 @@ func UnmarshalTransitGatewayReference(m map[string]json.RawMessage, result inter obj := new(TransitGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.Crn) if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5200,9 +5442,9 @@ type TransitGatewayTunnel struct { // The ID of the network VPC being connected via this connection. NetworkID *string `json:"network_id,omitempty"` - // Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512-64513, 65100, - // 65200-65234, 65402-65433, 65500 and 4201065000-4201065999. If `remote_bgp_asn` is omitted on create requests, IBM - // will assign an ASN. + // Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, 65100, + // 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 and 4201065000-4201065999 If `remote_bgp_asn` is omitted + // on create requests, IBM will assign an ASN. RemoteBgpAsn *int64 `json:"remote_bgp_asn" validate:"required"` // Remote gateway IP address. @@ -5228,6 +5470,7 @@ type TransitGatewayTunnel struct { const ( TransitGatewayTunnel_BaseNetworkType_Classic = "classic" TransitGatewayTunnel_BaseNetworkType_Vpc = "vpc" + TransitGatewayTunnel_BaseNetworkType_Vpn = "vpn" ) // Constants associated with the TransitGatewayTunnel.Status property. @@ -5249,66 +5492,82 @@ func UnmarshalTransitGatewayTunnel(m map[string]json.RawMessage, result interfac obj := new(TransitGatewayTunnel) err = core.UnmarshalPrimitive(m, "base_network_type", &obj.BaseNetworkType) if err != nil { + err = core.SDKErrorf(err, "", "base_network_type-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_bgp_asn", &obj.LocalBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "local_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_gateway_ip", &obj.LocalGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "local_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_tunnel_ip", &obj.LocalTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "local_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "mtu", &obj.Mtu) if err != nil { + err = core.SDKErrorf(err, "", "mtu-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_account_id", &obj.NetworkAccountID) if err != nil { + err = core.SDKErrorf(err, "", "network_account_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "network_id", &obj.NetworkID) if err != nil { + err = core.SDKErrorf(err, "", "network_id-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_bgp_asn", &obj.RemoteBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "remote_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_gateway_ip", &obj.RemoteGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_tunnel_ip", &obj.RemoteTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { + err = core.SDKErrorf(err, "", "updated_at-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5326,6 +5585,7 @@ func UnmarshalTransitGatewayTunnelCollection(m map[string]json.RawMessage, resul obj := new(TransitGatewayTunnelCollection) err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalTransitGatewayTunnel) if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5343,6 +5603,7 @@ func UnmarshalTransitGatewayTunnelPatch(m map[string]json.RawMessage, result int obj := new(TransitGatewayTunnelPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5351,11 +5612,11 @@ func UnmarshalTransitGatewayTunnelPatch(m map[string]json.RawMessage, result int // AsPatch returns a generic map representation of the TransitGatewayTunnelPatch func (transitGatewayTunnelPatch *TransitGatewayTunnelPatch) AsPatch() (_patch map[string]interface{}, err error) { - var jsonData []byte - jsonData, err = json.Marshal(transitGatewayTunnelPatch) - if err == nil { - err = json.Unmarshal(jsonData, &_patch) + _patch = map[string]interface{}{} + if !core.IsNil(transitGatewayTunnelPatch.Name) { + _patch["name"] = transitGatewayTunnelPatch.Name } + return } @@ -5399,6 +5660,9 @@ func (*TransitGatewayApisV1) NewTransitGatewayTunnelTemplate(localGatewayIp stri Zone: zone, } err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } return } @@ -5407,30 +5671,37 @@ func UnmarshalTransitGatewayTunnelTemplate(m map[string]json.RawMessage, result obj := new(TransitGatewayTunnelTemplate) err = core.UnmarshalPrimitive(m, "local_gateway_ip", &obj.LocalGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "local_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "local_tunnel_ip", &obj.LocalTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "local_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_bgp_asn", &obj.RemoteBgpAsn) if err != nil { + err = core.SDKErrorf(err, "", "remote_bgp_asn-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_gateway_ip", &obj.RemoteGatewayIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_gateway_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalPrimitive(m, "remote_tunnel_ip", &obj.RemoteTunnelIp) if err != nil { + err = core.SDKErrorf(err, "", "remote_tunnel_ip-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5453,7 +5724,7 @@ type UpdateTransitGatewayConnectionOptions struct { // Default setting of permit or deny which applies to any routes that don't match a specified filter. PrefixFiltersDefault *string `json:"prefix_filters_default,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -5544,7 +5815,7 @@ type UpdateTransitGatewayConnectionPrefixFilterOptions struct { // The IPv4 Prefix to be matched by this filter. Prefix *string `json:"prefix,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -5632,7 +5903,7 @@ type UpdateTransitGatewayConnectionTunnelsOptions struct { // The update connection tunnel template. TransitGatewayTunnelPatch map[string]interface{} `json:"TransitGatewayTunnel_patch" validate:"required"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -5690,7 +5961,7 @@ type UpdateTransitGatewayOptions struct { // A human readable name for a resource. Name *string `json:"name,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -5752,6 +6023,7 @@ func UnmarshalZoneIdentity(m map[string]json.RawMessage, result interface{}) (er obj := new(ZoneIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5769,6 +6041,7 @@ func UnmarshalZoneReference(m map[string]json.RawMessage, result interface{}) (e obj := new(ZoneReference) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5791,6 +6064,7 @@ func UnmarshalZoneIdentityByName(m map[string]json.RawMessage, result interface{ obj := new(ZoneIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -5810,7 +6084,7 @@ type TransitGatewaysPager struct { // NewTransitGatewaysPager returns a new TransitGatewaysPager instance. func (transitGatewayApis *TransitGatewayApisV1) NewTransitGatewaysPager(options *ListTransitGatewaysOptions) (pager *TransitGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -5838,6 +6112,7 @@ func (pager *TransitGatewaysPager) GetNextWithContext(ctx context.Context) (page result, _, err := pager.client.ListTransitGatewaysWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -5859,6 +6134,7 @@ func (pager *TransitGatewaysPager) GetAllWithContext(ctx context.Context) (allIt var nextPage []TransitGateway nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -5868,12 +6144,16 @@ func (pager *TransitGatewaysPager) GetAllWithContext(ctx context.Context) (allIt // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *TransitGatewaysPager) GetNext() (page []TransitGateway, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *TransitGatewaysPager) GetAll() (allItems []TransitGateway, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // ConnectionsPager can be used to simplify the use of the "ListConnections" method. @@ -5889,7 +6169,7 @@ type ConnectionsPager struct { // NewConnectionsPager returns a new ConnectionsPager instance. func (transitGatewayApis *TransitGatewayApisV1) NewConnectionsPager(options *ListConnectionsOptions) (pager *ConnectionsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -5917,6 +6197,7 @@ func (pager *ConnectionsPager) GetNextWithContext(ctx context.Context) (page []T result, _, err := pager.client.ListConnectionsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -5938,6 +6219,7 @@ func (pager *ConnectionsPager) GetAllWithContext(ctx context.Context) (allItems var nextPage []TransitConnection nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -5947,12 +6229,16 @@ func (pager *ConnectionsPager) GetAllWithContext(ctx context.Context) (allItems // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ConnectionsPager) GetNext() (page []TransitConnection, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ConnectionsPager) GetAll() (allItems []TransitConnection, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // TransitGatewayConnectionsPager can be used to simplify the use of the "ListTransitGatewayConnections" method. @@ -5968,7 +6254,7 @@ type TransitGatewayConnectionsPager struct { // NewTransitGatewayConnectionsPager returns a new TransitGatewayConnectionsPager instance. func (transitGatewayApis *TransitGatewayApisV1) NewTransitGatewayConnectionsPager(options *ListTransitGatewayConnectionsOptions) (pager *TransitGatewayConnectionsPager, err error) { if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) return } @@ -5996,6 +6282,7 @@ func (pager *TransitGatewayConnectionsPager) GetNextWithContext(ctx context.Cont result, _, err := pager.client.ListTransitGatewayConnectionsWithContext(ctx, pager.options) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } @@ -6017,6 +6304,7 @@ func (pager *TransitGatewayConnectionsPager) GetAllWithContext(ctx context.Conte var nextPage []TransitGatewayConnectionCust nextPage, err = pager.GetNextWithContext(ctx) if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") return } allItems = append(allItems, nextPage...) @@ -6026,10 +6314,14 @@ func (pager *TransitGatewayConnectionsPager) GetAllWithContext(ctx context.Conte // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *TransitGatewayConnectionsPager) GetNext() (page []TransitGatewayConnectionCust, err error) { - return pager.GetNextWithContext(context.Background()) + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *TransitGatewayConnectionsPager) GetAll() (allItems []TransitGatewayConnectionCust, err error) { - return pager.GetAllWithContext(context.Background()) + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return } diff --git a/vendor/github.com/IBM/platform-services-go-sdk/common/version.go b/vendor/github.com/IBM/platform-services-go-sdk/common/version.go index 960e319151..6ec06b79e7 100644 --- a/vendor/github.com/IBM/platform-services-go-sdk/common/version.go +++ b/vendor/github.com/IBM/platform-services-go-sdk/common/version.go @@ -17,4 +17,4 @@ package common // Version of the SDK -const Version = "0.86.1" +const Version = "0.91.0" diff --git a/vendor/github.com/IBM/platform-services-go-sdk/globalsearchv2/global_search_v2.go b/vendor/github.com/IBM/platform-services-go-sdk/globalsearchv2/global_search_v2.go index 269939ca22..2873836e51 100644 --- a/vendor/github.com/IBM/platform-services-go-sdk/globalsearchv2/global_search_v2.go +++ b/vendor/github.com/IBM/platform-services-go-sdk/globalsearchv2/global_search_v2.go @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2024. + * (C) Copyright IBM Corp. 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.87.0-91c7c775-20240320-213027 + * IBM OpenAPI SDK Code Generator Version: 3.100.0-2ad7a784-20250212-162551 */ // Package globalsearchv2 : Operations and models for the GlobalSearchV2 service @@ -178,21 +178,18 @@ func (globalSearch *GlobalSearchV2) DisableRetries() { // Search : Find instances of resources (v3) // Find IAM-enabled resources or storage and network resources that run on classic infrastructure in a specific account -// ID. You can apply query strings if necessary. -// -// To filter results, you can insert a string by using the Lucene syntax and the query string is parsed into a series of -// terms and operators. A term can be a single word or a phrase, in which case the search is performed for all the -// words, in the same order. To filter for a specific value regardless of the property that contains it, type the search -// term without specifying a field. Only resources that belong to the account ID and that are accessible by the client -// are returned. +// ID. // // You must use `/v3/resources/search` when you need to fetch more than `10000` resource items. On the first call, the // operation returns a live cursor on the data that you must use on all the subsequent calls to get the next batch of // results until you get the empty result set. // -// By default, the fields that are returned for every resource are `crn`, `name`, -// `family`, `type`, and `account_id`. You can specify the subset of the fields you want in your request using the -// `fields` request body attribute. Set `"fields": ["*"]` to discover the set of fields which are available to request. +// To filter results, you can apply query strings following the *Lucene* query syntax. +// +// By default, the fields that are returned for every resource are **crn**, **name**, +// **family**, **type**, and **account_id**. You can specify the subset of the fields you want in your request using the +// `fields` request body attribute. Set `"fields": ["*"]` to discover the complete set of fields which are available to +// request. func (globalSearch *GlobalSearchV2) Search(searchOptions *SearchOptions) (result *ScanResult, response *core.DetailedResponse, err error) { result, response, err = globalSearch.SearchWithContext(context.Background(), searchOptions) err = core.RepurposeSDKProblem(err, "") @@ -256,9 +253,6 @@ func (globalSearch *GlobalSearchV2) SearchWithContext(ctx context.Context, searc if searchOptions.IsReclaimed != nil { builder.AddQuery("is_reclaimed", fmt.Sprint(*searchOptions.IsReclaimed)) } - if searchOptions.IsPublic != nil { - builder.AddQuery("is_public", fmt.Sprint(*searchOptions.IsPublic)) - } if searchOptions.ImpersonateUser != nil { builder.AddQuery("impersonate_user", fmt.Sprint(*searchOptions.ImpersonateUser)) } @@ -315,15 +309,16 @@ func getServiceComponentInfo() *core.ProblemComponent { // ResultItem : A resource returned in a search result, which is identified by its `crn`. It contains other properties that depend on // the resource type. +// This type supports additional properties of type interface{}. type ResultItem struct { // Resource identifier in CRN format. CRN *string `json:"crn" validate:"required"` - // Allows users to set arbitrary properties + // Allows users to set arbitrary properties of type interface{}. additionalProperties map[string]interface{} } -// SetProperty allows the user to set an arbitrary property on an instance of ResultItem +// SetProperty allows the user to set an arbitrary property on an instance of ResultItem. func (o *ResultItem) SetProperty(key string, value interface{}) { if o.additionalProperties == nil { o.additionalProperties = make(map[string]interface{}) @@ -331,7 +326,7 @@ func (o *ResultItem) SetProperty(key string, value interface{}) { o.additionalProperties[key] = value } -// SetProperties allows the user to set a map of arbitrary properties on an instance of ResultItem +// SetProperties allows the user to set a map of arbitrary properties on an instance of ResultItem. func (o *ResultItem) SetProperties(m map[string]interface{}) { o.additionalProperties = make(map[string]interface{}) for k, v := range m { @@ -339,12 +334,12 @@ func (o *ResultItem) SetProperties(m map[string]interface{}) { } } -// GetProperty allows the user to retrieve an arbitrary property from an instance of ResultItem +// GetProperty allows the user to retrieve an arbitrary property from an instance of ResultItem. func (o *ResultItem) GetProperty(key string) interface{} { return o.additionalProperties[key] } -// GetProperties allows the user to retrieve the map of arbitrary properties from an instance of ResultItem +// GetProperties allows the user to retrieve the map of arbitrary properties from an instance of ResultItem. func (o *ResultItem) GetProperties() map[string]interface{} { return o.additionalProperties } @@ -436,7 +431,9 @@ type SearchOptions struct { Fields []string `json:"fields,omitempty"` // An opaque cursor that is returned on each call and that must be set on the subsequent call to get the next batch of - // items. If the search returns no items, then the search_cursor is not present in the response. + // items. You can stop paging when the search returns less items than the specified `limit` or when the `search_cursor` + // is not present in the response. NOTE: when setting this parameter, any other properties present in the body will be + // ignored. SearchCursor *string `json:"search_cursor,omitempty"` // An alphanumeric string that is used to trace the request. The value may include ASCII alphanumerics and any of @@ -477,11 +474,6 @@ type SearchOptions struct { // both reclaimed and not reclaimed documents are returned. IsReclaimed *string `json:"is_reclaimed,omitempty"` - // Determines if public resources should be included in result set or not. Possible values are false (default), true or - // any. If false, do not search public resources; if true, search only public resources; If any, search also public - // resources. - IsPublic *string `json:"is_public,omitempty"` - // The user on whose behalf the search must be performed. Only a GhoST admin can impersonate a user, so be sure you set // a GhoST admin IAM token in the Authorization header if you set this parameter. (_for administrators only_). ImpersonateUser *string `json:"impersonate_user,omitempty"` @@ -497,7 +489,7 @@ type SearchOptions struct { // authorized ServiceIds can use this query parameter. IsProjectResource *string `json:"is_project_resource,omitempty"` - // Allows users to set headers on API requests + // Allows users to set headers on API requests. Headers map[string]string } @@ -521,16 +513,6 @@ const ( SearchOptionsIsReclaimedTrueConst = "true" ) -// Constants associated with the SearchOptions.IsPublic property. -// Determines if public resources should be included in result set or not. Possible values are false (default), true or -// any. If false, do not search public resources; if true, search only public resources; If any, search also public -// resources. -const ( - SearchOptionsIsPublicAnyConst = "any" - SearchOptionsIsPublicFalseConst = "false" - SearchOptionsIsPublicTrueConst = "true" -) - // Constants associated with the SearchOptions.CanTag property. // Determines if the result set must return the resources that the user can tag or the resources that the user can view // (only a GhoST admin can use this parameter). If false (default), only resources user can view are returned; if true, @@ -622,12 +604,6 @@ func (_options *SearchOptions) SetIsReclaimed(isReclaimed string) *SearchOptions return _options } -// SetIsPublic : Allow user to set IsPublic -func (_options *SearchOptions) SetIsPublic(isPublic string) *SearchOptions { - _options.IsPublic = core.StringPtr(isPublic) - return _options -} - // SetImpersonateUser : Allow user to set ImpersonateUser func (_options *SearchOptions) SetImpersonateUser(impersonateUser string) *SearchOptions { _options.ImpersonateUser = core.StringPtr(impersonateUser) diff --git a/vendor/github.com/IBM/platform-services-go-sdk/iamidentityv1/iam_identity_v1.go b/vendor/github.com/IBM/platform-services-go-sdk/iamidentityv1/iam_identity_v1.go index 7a0cfc7f28..22c126e0f1 100644 --- a/vendor/github.com/IBM/platform-services-go-sdk/iamidentityv1/iam_identity_v1.go +++ b/vendor/github.com/IBM/platform-services-go-sdk/iamidentityv1/iam_identity_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.106.0-09823488-20250707-071701 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ // Package iamidentityv1 : Operations and models for the IamIdentityV1 service @@ -3559,6 +3559,9 @@ func (iamIdentity *IamIdentityV1) GetAccountSettingsWithContext(ctx context.Cont if getAccountSettingsOptions.IncludeHistory != nil { builder.AddQuery("include_history", fmt.Sprint(*getAccountSettingsOptions.IncludeHistory)) } + if getAccountSettingsOptions.ResolveUserMfa != nil { + builder.AddQuery("resolve_user_mfa", fmt.Sprint(*getAccountSettingsOptions.ResolveUserMfa)) + } request, err := builder.Build() if err != nil { @@ -3665,6 +3668,12 @@ func (iamIdentity *IamIdentityV1) UpdateAccountSettingsWithContext(ctx context.C if updateAccountSettingsOptions.SystemRefreshTokenExpirationInSeconds != nil { body["system_refresh_token_expiration_in_seconds"] = updateAccountSettingsOptions.SystemRefreshTokenExpirationInSeconds } + if updateAccountSettingsOptions.RestrictUserListVisibility != nil { + body["restrict_user_list_visibility"] = updateAccountSettingsOptions.RestrictUserListVisibility + } + if updateAccountSettingsOptions.RestrictUserDomains != nil { + body["restrict_user_domains"] = updateAccountSettingsOptions.RestrictUserDomains + } _, err = builder.SetBodyContentJSON(body) if err != nil { err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) @@ -6729,206 +6738,35 @@ func UnmarshalAccountBasedMfaEnrollment(m map[string]json.RawMessage, result int return } -// AccountSettingsAccountSection : AccountSettingsAccountSection struct -type AccountSettingsAccountSection struct { - // Unique ID of the account. - AccountID *string `json:"account_id,omitempty"` - - // Defines whether or not creating a service ID is access controlled. Valid values: - // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service - // IDs, including the account owner - // * NOT_RESTRICTED - all members of an account can create service IDs - // * NOT_SET - to 'unset' a previous set value. - RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` - - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - to apply access control - // * NOT_RESTRICTED - to remove access control - // * NOT_SET - to 'unset' a previous set value. - RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` - - // Defines the IP addresses and subnets from which IAM tokens can be created for the account. - AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` - - // Defines the MFA requirement for the user. Valid values: - // * NONE - No MFA trait set - // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password - // * TOTP - For all non-federated IBMId users - // * TOTP4ALL - For all users - // * LEVEL1 - Email-based MFA for all users - // * LEVEL2 - TOTP-based MFA for all users - // * LEVEL3 - U2F MFA for all users. - Mfa *string `json:"mfa,omitempty"` - - // List of users that are exempted from the MFA requirement of the account. - UserMfa []EffectiveAccountSettingsUserMfa `json:"user_mfa,omitempty"` - - // History of the Account Settings. - History []EnityHistoryRecord `json:"history,omitempty"` - - // Defines the session expiration in seconds for the account. Valid values: - // * Any whole number between between '900' and '86400' - // * NOT_SET - To unset account setting and use service default. - SessionExpirationInSeconds *string `json:"session_expiration_in_seconds,omitempty"` - - // Defines the period of time in seconds in which a session will be invalidated due to inactivity. Valid values: - // * Any whole number between '900' and '7200' - // * NOT_SET - To unset account setting and use service default. - SessionInvalidationInSeconds *string `json:"session_invalidation_in_seconds,omitempty"` - - // Defines the max allowed sessions per identity required by the account. Valid values: - // * Any whole number greater than 0 - // * NOT_SET - To unset account setting and use service default. - MaxSessionsPerIdentity *string `json:"max_sessions_per_identity,omitempty"` - - // Defines the access token expiration in seconds. Valid values: - // * Any whole number between '900' and '3600' - // * NOT_SET - To unset account setting and use service default. - SystemAccessTokenExpirationInSeconds *string `json:"system_access_token_expiration_in_seconds,omitempty"` - - // Defines the refresh token expiration in seconds. Valid values: - // * Any whole number between '900' and '259200' - // * NOT_SET - To unset account setting and use service default. - SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds,omitempty"` -} - -// Constants associated with the AccountSettingsAccountSection.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: -// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service -// IDs, including the account owner -// * NOT_RESTRICTED - all members of an account can create service IDs -// * NOT_SET - to 'unset' a previous set value. -const ( - AccountSettingsAccountSectionRestrictCreateServiceIDNotRestrictedConst = "NOT_RESTRICTED" - AccountSettingsAccountSectionRestrictCreateServiceIDNotSetConst = "NOT_SET" - AccountSettingsAccountSectionRestrictCreateServiceIDRestrictedConst = "RESTRICTED" -) - -// Constants associated with the AccountSettingsAccountSection.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - to apply access control -// * NOT_RESTRICTED - to remove access control -// * NOT_SET - to 'unset' a previous set value. -const ( - AccountSettingsAccountSectionRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" - AccountSettingsAccountSectionRestrictCreatePlatformApikeyNotSetConst = "NOT_SET" - AccountSettingsAccountSectionRestrictCreatePlatformApikeyRestrictedConst = "RESTRICTED" -) - -// Constants associated with the AccountSettingsAccountSection.Mfa property. -// Defines the MFA requirement for the user. Valid values: -// * NONE - No MFA trait set -// * NONE_NO_ROPC- No MFA, disable CLI logins with only a password -// * TOTP - For all non-federated IBMId users -// * TOTP4ALL - For all users -// * LEVEL1 - Email-based MFA for all users -// * LEVEL2 - TOTP-based MFA for all users -// * LEVEL3 - U2F MFA for all users. -const ( - AccountSettingsAccountSectionMfaLevel1Const = "LEVEL1" - AccountSettingsAccountSectionMfaLevel2Const = "LEVEL2" - AccountSettingsAccountSectionMfaLevel3Const = "LEVEL3" - AccountSettingsAccountSectionMfaNoneConst = "NONE" - AccountSettingsAccountSectionMfaNoneNoRopcConst = "NONE_NO_ROPC" - AccountSettingsAccountSectionMfaTotpConst = "TOTP" - AccountSettingsAccountSectionMfaTotp4allConst = "TOTP4ALL" -) - -// UnmarshalAccountSettingsAccountSection unmarshals an instance of AccountSettingsAccountSection from the specified map of raw messages. -func UnmarshalAccountSettingsAccountSection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AccountSettingsAccountSection) - err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) - if err != nil { - err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "restrict_create_service_id", &obj.RestrictCreateServiceID) - if err != nil { - err = core.SDKErrorf(err, "", "restrict_create_service_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "restrict_create_platform_apikey", &obj.RestrictCreatePlatformApikey) - if err != nil { - err = core.SDKErrorf(err, "", "restrict_create_platform_apikey-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "allowed_ip_addresses", &obj.AllowedIPAddresses) - if err != nil { - err = core.SDKErrorf(err, "", "allowed_ip_addresses-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) - if err != nil { - err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalEffectiveAccountSettingsUserMfa) - if err != nil { - err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "history", &obj.History, UnmarshalEnityHistoryRecord) - if err != nil { - err = core.SDKErrorf(err, "", "history-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "session_expiration_in_seconds", &obj.SessionExpirationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "session_expiration_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "session_invalidation_in_seconds", &obj.SessionInvalidationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "session_invalidation_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "max_sessions_per_identity", &obj.MaxSessionsPerIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "max_sessions_per_identity-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "system_access_token_expiration_in_seconds", &obj.SystemAccessTokenExpirationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "system_access_token_expiration_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "system_refresh_token_expiration_in_seconds", &obj.SystemRefreshTokenExpirationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "system_refresh_token_expiration_in_seconds-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// AccountSettingsAssignedTemplatesSection : AccountSettingsAssignedTemplatesSection struct +// AccountSettingsAssignedTemplatesSection : Input body parameters for the Account Settings REST request. type AccountSettingsAssignedTemplatesSection struct { // Template Id. - TemplateID *string `json:"template_id,omitempty"` + TemplateID *string `json:"template_id" validate:"required"` // Template version. - TemplateVersion *int64 `json:"template_version,omitempty"` + TemplateVersion *int64 `json:"template_version" validate:"required"` // Template name. - TemplateName *string `json:"template_name,omitempty"` + TemplateName *string `json:"template_name" validate:"required"` - // Defines whether or not creating a service ID is access controlled. Valid values: + // Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - to apply access control - // * NOT_RESTRICTED - to remove access control + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` // Defines the IP addresses and subnets from which IAM tokens can be created for the account. AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` - // Defines the MFA requirement for the user. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -6938,9 +6776,6 @@ type AccountSettingsAssignedTemplatesSection struct { // * LEVEL3 - U2F MFA for all users. Mfa *string `json:"mfa,omitempty"` - // List of users that are exempted from the MFA requirement of the account. - UserMfa []EffectiveAccountSettingsUserMfa `json:"user_mfa,omitempty"` - // Defines the session expiration in seconds for the account. Valid values: // * Any whole number between between '900' and '86400' // * NOT_SET - To unset account setting and use service default. @@ -6965,10 +6800,22 @@ type AccountSettingsAssignedTemplatesSection struct { // * Any whole number between '900' and '259200' // * NOT_SET - To unset account setting and use service default. SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds,omitempty"` + + // Defines whether or not user visibility is access controlled. Valid values: + // * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to + // the account, or descendants of those users based on the classic infrastructure hierarchy + // * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console + // * NOT_SET - to 'unset' a previous set value. + RestrictUserListVisibility *string `json:"restrict_user_list_visibility,omitempty"` + + // List of users that are exempted from the MFA requirement of the account. + UserMfa []AccountSettingsUserMfaResponse `json:"user_mfa,omitempty"` + + RestrictUserDomains *AssignedTemplatesAccountSettingsRestrictUserDomains `json:"restrict_user_domains,omitempty"` } // Constants associated with the AccountSettingsAssignedTemplatesSection.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: +// Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs @@ -6980,9 +6827,10 @@ const ( ) // Constants associated with the AccountSettingsAssignedTemplatesSection.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - to apply access control -// * NOT_RESTRICTED - to remove access control +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. const ( AccountSettingsAssignedTemplatesSectionRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" @@ -6991,7 +6839,7 @@ const ( ) // Constants associated with the AccountSettingsAssignedTemplatesSection.Mfa property. -// Defines the MFA requirement for the user. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7009,6 +6857,18 @@ const ( AccountSettingsAssignedTemplatesSectionMfaTotp4allConst = "TOTP4ALL" ) +// Constants associated with the AccountSettingsAssignedTemplatesSection.RestrictUserListVisibility property. +// Defines whether or not user visibility is access controlled. Valid values: +// * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to +// the account, or descendants of those users based on the classic infrastructure hierarchy +// * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console +// * NOT_SET - to 'unset' a previous set value. +const ( + AccountSettingsAssignedTemplatesSectionRestrictUserListVisibilityNotRestrictedConst = "NOT_RESTRICTED" + AccountSettingsAssignedTemplatesSectionRestrictUserListVisibilityNotSetConst = "NOT_SET" + AccountSettingsAssignedTemplatesSectionRestrictUserListVisibilityRestrictedConst = "RESTRICTED" +) + // UnmarshalAccountSettingsAssignedTemplatesSection unmarshals an instance of AccountSettingsAssignedTemplatesSection from the specified map of raw messages. func UnmarshalAccountSettingsAssignedTemplatesSection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(AccountSettingsAssignedTemplatesSection) @@ -7047,11 +6907,6 @@ func UnmarshalAccountSettingsAssignedTemplatesSection(m map[string]json.RawMessa err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalEffectiveAccountSettingsUserMfa) - if err != nil { - err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) - return - } err = core.UnmarshalPrimitive(m, "session_expiration_in_seconds", &obj.SessionExpirationInSeconds) if err != nil { err = core.SDKErrorf(err, "", "session_expiration_in_seconds-error", common.GetComponentInfo()) @@ -7077,160 +6932,19 @@ func UnmarshalAccountSettingsAssignedTemplatesSection(m map[string]json.RawMessa err = core.SDKErrorf(err, "", "system_refresh_token_expiration_in_seconds-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// AccountSettingsComponent : AccountSettingsComponent struct -type AccountSettingsComponent struct { - // Defines whether or not creating a service ID is access controlled. Valid values: - // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service - // IDs, including the account owner - // * NOT_RESTRICTED - all members of an account can create service IDs - // * NOT_SET - to 'unset' a previous set value. - RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` - - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - to apply access control - // * NOT_RESTRICTED - to remove access control - // * NOT_SET - to 'unset' a previous set value. - RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` - - // Defines the IP addresses and subnets from which IAM tokens can be created for the account. - AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` - - // Defines the MFA trait for the account. Valid values: - // * NONE - No MFA trait set - // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password - // * TOTP - For all non-federated IBMId users - // * TOTP4ALL - For all users - // * LEVEL1 - Email-based MFA for all users - // * LEVEL2 - TOTP-based MFA for all users - // * LEVEL3 - U2F MFA for all users. - Mfa *string `json:"mfa,omitempty"` - - // List of users that are exempted from the MFA requirement of the account. - UserMfa []AccountSettingsUserMfa `json:"user_mfa,omitempty"` - - // Defines the session expiration in seconds for the account. Valid values: - // * Any whole number between between '900' and '86400' - // * NOT_SET - To unset account setting and use service default. - SessionExpirationInSeconds *string `json:"session_expiration_in_seconds,omitempty"` - - // Defines the period of time in seconds in which a session will be invalidated due to inactivity. Valid values: - // * Any whole number between '900' and '7200' - // * NOT_SET - To unset account setting and use service default. - SessionInvalidationInSeconds *string `json:"session_invalidation_in_seconds,omitempty"` - - // Defines the max allowed sessions per identity required by the account. Valid values: - // * Any whole number greater than 0 - // * NOT_SET - To unset account setting and use service default. - MaxSessionsPerIdentity *string `json:"max_sessions_per_identity,omitempty"` - - // Defines the access token expiration in seconds. Valid values: - // * Any whole number between '900' and '3600' - // * NOT_SET - To unset account setting and use service default. - SystemAccessTokenExpirationInSeconds *string `json:"system_access_token_expiration_in_seconds,omitempty"` - - // Defines the refresh token expiration in seconds. Valid values: - // * Any whole number between '900' and '259200' - // * NOT_SET - To unset account setting and use service default. - SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds,omitempty"` -} - -// Constants associated with the AccountSettingsComponent.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: -// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service -// IDs, including the account owner -// * NOT_RESTRICTED - all members of an account can create service IDs -// * NOT_SET - to 'unset' a previous set value. -const ( - AccountSettingsComponentRestrictCreateServiceIDNotRestrictedConst = "NOT_RESTRICTED" - AccountSettingsComponentRestrictCreateServiceIDNotSetConst = "NOT_SET" - AccountSettingsComponentRestrictCreateServiceIDRestrictedConst = "RESTRICTED" -) - -// Constants associated with the AccountSettingsComponent.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - to apply access control -// * NOT_RESTRICTED - to remove access control -// * NOT_SET - to 'unset' a previous set value. -const ( - AccountSettingsComponentRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" - AccountSettingsComponentRestrictCreatePlatformApikeyNotSetConst = "NOT_SET" - AccountSettingsComponentRestrictCreatePlatformApikeyRestrictedConst = "RESTRICTED" -) - -// Constants associated with the AccountSettingsComponent.Mfa property. -// Defines the MFA trait for the account. Valid values: -// * NONE - No MFA trait set -// * NONE_NO_ROPC- No MFA, disable CLI logins with only a password -// * TOTP - For all non-federated IBMId users -// * TOTP4ALL - For all users -// * LEVEL1 - Email-based MFA for all users -// * LEVEL2 - TOTP-based MFA for all users -// * LEVEL3 - U2F MFA for all users. -const ( - AccountSettingsComponentMfaLevel1Const = "LEVEL1" - AccountSettingsComponentMfaLevel2Const = "LEVEL2" - AccountSettingsComponentMfaLevel3Const = "LEVEL3" - AccountSettingsComponentMfaNoneConst = "NONE" - AccountSettingsComponentMfaNoneNoRopcConst = "NONE_NO_ROPC" - AccountSettingsComponentMfaTotpConst = "TOTP" - AccountSettingsComponentMfaTotp4allConst = "TOTP4ALL" -) - -// UnmarshalAccountSettingsComponent unmarshals an instance of AccountSettingsComponent from the specified map of raw messages. -func UnmarshalAccountSettingsComponent(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AccountSettingsComponent) - err = core.UnmarshalPrimitive(m, "restrict_create_service_id", &obj.RestrictCreateServiceID) - if err != nil { - err = core.SDKErrorf(err, "", "restrict_create_service_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "restrict_create_platform_apikey", &obj.RestrictCreatePlatformApikey) - if err != nil { - err = core.SDKErrorf(err, "", "restrict_create_platform_apikey-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "allowed_ip_addresses", &obj.AllowedIPAddresses) - if err != nil { - err = core.SDKErrorf(err, "", "allowed_ip_addresses-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) + err = core.UnmarshalPrimitive(m, "restrict_user_list_visibility", &obj.RestrictUserListVisibility) if err != nil { - err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "restrict_user_list_visibility-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalAccountSettingsUserMfa) + err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalAccountSettingsUserMfaResponse) if err != nil { err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "session_expiration_in_seconds", &obj.SessionExpirationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "session_expiration_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "session_invalidation_in_seconds", &obj.SessionInvalidationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "session_invalidation_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "max_sessions_per_identity", &obj.MaxSessionsPerIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "max_sessions_per_identity-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "system_access_token_expiration_in_seconds", &obj.SystemAccessTokenExpirationInSeconds) - if err != nil { - err = core.SDKErrorf(err, "", "system_access_token_expiration_in_seconds-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "system_refresh_token_expiration_in_seconds", &obj.SystemRefreshTokenExpirationInSeconds) + err = core.UnmarshalModel(m, "restrict_user_domains", &obj.RestrictUserDomains, UnmarshalAssignedTemplatesAccountSettingsRestrictUserDomains) if err != nil { - err = core.SDKErrorf(err, "", "system_refresh_token_expiration_in_seconds-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "restrict_user_domains-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -7239,23 +6953,30 @@ func UnmarshalAccountSettingsComponent(m map[string]json.RawMessage, result inte // AccountSettingsEffectiveSection : AccountSettingsEffectiveSection struct type AccountSettingsEffectiveSection struct { - // Defines whether or not creating a service ID is access controlled. Valid values: + // Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - to apply access control - // * NOT_RESTRICTED - to remove access control + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` + // Defines whether or not user visibility is access controlled. Valid values: + // * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to + // the account, or descendants of those users based on the classic infrastructure hierarchy + // * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. + RestrictUserListVisibility *string `json:"restrict_user_list_visibility,omitempty"` + // Defines the IP addresses and subnets from which IAM tokens can be created for the account. AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` - // Defines the MFA requirement for the user. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7266,7 +6987,7 @@ type AccountSettingsEffectiveSection struct { Mfa *string `json:"mfa,omitempty"` // List of users that are exempted from the MFA requirement of the account. - UserMfa []EffectiveAccountSettingsUserMfa `json:"user_mfa,omitempty"` + UserMfa []AccountSettingsUserMfaResponse `json:"user_mfa,omitempty"` // Defines the session expiration in seconds for the account. Valid values: // * Any whole number between between '900' and '86400' @@ -7295,7 +7016,7 @@ type AccountSettingsEffectiveSection struct { } // Constants associated with the AccountSettingsEffectiveSection.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: +// Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs @@ -7307,9 +7028,10 @@ const ( ) // Constants associated with the AccountSettingsEffectiveSection.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - to apply access control -// * NOT_RESTRICTED - to remove access control +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. const ( AccountSettingsEffectiveSectionRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" @@ -7317,8 +7039,18 @@ const ( AccountSettingsEffectiveSectionRestrictCreatePlatformApikeyRestrictedConst = "RESTRICTED" ) +// Constants associated with the AccountSettingsEffectiveSection.RestrictUserListVisibility property. +// Defines whether or not user visibility is access controlled. Valid values: +// * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to +// the account, or descendants of those users based on the classic infrastructure hierarchy +// * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. +const ( + AccountSettingsEffectiveSectionRestrictUserListVisibilityNotRestrictedConst = "NOT_RESTRICTED" + AccountSettingsEffectiveSectionRestrictUserListVisibilityRestrictedConst = "RESTRICTED" +) + // Constants associated with the AccountSettingsEffectiveSection.Mfa property. -// Defines the MFA requirement for the user. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7349,6 +7081,11 @@ func UnmarshalAccountSettingsEffectiveSection(m map[string]json.RawMessage, resu err = core.SDKErrorf(err, "", "restrict_create_platform_apikey-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "restrict_user_list_visibility", &obj.RestrictUserListVisibility) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_user_list_visibility-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "allowed_ip_addresses", &obj.AllowedIPAddresses) if err != nil { err = core.SDKErrorf(err, "", "allowed_ip_addresses-error", common.GetComponentInfo()) @@ -7359,7 +7096,7 @@ func UnmarshalAccountSettingsEffectiveSection(m map[string]json.RawMessage, resu err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalEffectiveAccountSettingsUserMfa) + err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalAccountSettingsUserMfaResponse) if err != nil { err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) return @@ -7393,7 +7130,7 @@ func UnmarshalAccountSettingsEffectiveSection(m map[string]json.RawMessage, resu return } -// AccountSettingsResponse : Response body format for Account Settings REST requests. +// AccountSettingsResponse : Input body parameters for the Account Settings REST request. type AccountSettingsResponse struct { // Context with key properties for problem determination. Context *ResponseContext `json:"context,omitempty"` @@ -7401,26 +7138,30 @@ type AccountSettingsResponse struct { // Unique ID of the account. AccountID *string `json:"account_id" validate:"required"` - // Defines whether or not creating a service ID is access controlled. Valid values: + // Version of the account settings. + EntityTag *string `json:"entity_tag" validate:"required"` + + // History of the Account Settings. + History []EnityHistoryRecord `json:"history,omitempty"` + + // Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreateServiceID *string `json:"restrict_create_service_id" validate:"required"` - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - to apply access control - // * NOT_RESTRICTED - to remove access control + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey" validate:"required"` // Defines the IP addresses and subnets from which IAM tokens can be created for the account. AllowedIPAddresses *string `json:"allowed_ip_addresses" validate:"required"` - // Version of the account settings. - EntityTag *string `json:"entity_tag" validate:"required"` - - // Defines the MFA trait for the account. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7430,12 +7171,6 @@ type AccountSettingsResponse struct { // * LEVEL3 - U2F MFA for all users. Mfa *string `json:"mfa" validate:"required"` - // List of users that are exempted from the MFA requirement of the account. - UserMfa []AccountSettingsUserMfa `json:"user_mfa" validate:"required"` - - // History of the Account Settings. - History []EnityHistoryRecord `json:"history,omitempty"` - // Defines the session expiration in seconds for the account. Valid values: // * Any whole number between between '900' and '86400' // * NOT_SET - To unset account setting and use service default. @@ -7460,10 +7195,23 @@ type AccountSettingsResponse struct { // * Any whole number between '900' and '259200' // * NOT_SET - To unset account setting and use service default. SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds" validate:"required"` + + // Defines whether or not user visibility is access controlled. Valid values: + // * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to + // the account, or descendants of those users based on the classic infrastructure hierarchy + // * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. + RestrictUserListVisibility *string `json:"restrict_user_list_visibility" validate:"required"` + + // List of users that are exempted from the MFA requirement of the account. + UserMfa []AccountSettingsUserMfaResponse `json:"user_mfa" validate:"required"` + + // Defines if account invitations are restricted to specified domains. To remove an entry for a realm_id, perform an + // update (PUT) request with only the realm_id set. + RestrictUserDomains []AccountSettingsUserDomainRestriction `json:"restrict_user_domains" validate:"required"` } // Constants associated with the AccountSettingsResponse.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: +// Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs @@ -7475,9 +7223,10 @@ const ( ) // Constants associated with the AccountSettingsResponse.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - to apply access control -// * NOT_RESTRICTED - to remove access control +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. const ( AccountSettingsResponseRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" @@ -7486,7 +7235,7 @@ const ( ) // Constants associated with the AccountSettingsResponse.Mfa property. -// Defines the MFA trait for the account. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7504,6 +7253,16 @@ const ( AccountSettingsResponseMfaTotp4allConst = "TOTP4ALL" ) +// Constants associated with the AccountSettingsResponse.RestrictUserListVisibility property. +// Defines whether or not user visibility is access controlled. Valid values: +// * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to +// the account, or descendants of those users based on the classic infrastructure hierarchy +// * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. +const ( + AccountSettingsResponseRestrictUserListVisibilityNotRestrictedConst = "NOT_RESTRICTED" + AccountSettingsResponseRestrictUserListVisibilityRestrictedConst = "RESTRICTED" +) + // UnmarshalAccountSettingsResponse unmarshals an instance of AccountSettingsResponse from the specified map of raw messages. func UnmarshalAccountSettingsResponse(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(AccountSettingsResponse) @@ -7517,6 +7276,16 @@ func UnmarshalAccountSettingsResponse(m map[string]json.RawMessage, result inter err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "entity_tag", &obj.EntityTag) + if err != nil { + err = core.SDKErrorf(err, "", "entity_tag-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "history", &obj.History, UnmarshalEnityHistoryRecord) + if err != nil { + err = core.SDKErrorf(err, "", "history-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "restrict_create_service_id", &obj.RestrictCreateServiceID) if err != nil { err = core.SDKErrorf(err, "", "restrict_create_service_id-error", common.GetComponentInfo()) @@ -7532,26 +7301,11 @@ func UnmarshalAccountSettingsResponse(m map[string]json.RawMessage, result inter err = core.SDKErrorf(err, "", "allowed_ip_addresses-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "entity_tag", &obj.EntityTag) - if err != nil { - err = core.SDKErrorf(err, "", "entity_tag-error", common.GetComponentInfo()) - return - } err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) if err != nil { err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalAccountSettingsUserMfa) - if err != nil { - err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "history", &obj.History, UnmarshalEnityHistoryRecord) - if err != nil { - err = core.SDKErrorf(err, "", "history-error", common.GetComponentInfo()) - return - } err = core.UnmarshalPrimitive(m, "session_expiration_in_seconds", &obj.SessionExpirationInSeconds) if err != nil { err = core.SDKErrorf(err, "", "session_expiration_in_seconds-error", common.GetComponentInfo()) @@ -7577,6 +7331,21 @@ func UnmarshalAccountSettingsResponse(m map[string]json.RawMessage, result inter err = core.SDKErrorf(err, "", "system_refresh_token_expiration_in_seconds-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "restrict_user_list_visibility", &obj.RestrictUserListVisibility) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_user_list_visibility-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalAccountSettingsUserMfaResponse) + if err != nil { + err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "restrict_user_domains", &obj.RestrictUserDomains, UnmarshalAccountSettingsUserDomainRestriction) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_user_domains-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -7669,7 +7438,8 @@ type AccountSettingsTemplateResponse struct { // Committed flag determines if the template is ready for assignment. Committed *bool `json:"committed" validate:"required"` - AccountSettings *AccountSettingsComponent `json:"account_settings" validate:"required"` + // Input body parameters for the Account Settings REST request. + AccountSettings *TemplateAccountSettings `json:"account_settings" validate:"required"` // History of the Template. History []EnityHistoryRecord `json:"history,omitempty"` @@ -7726,7 +7496,7 @@ func UnmarshalAccountSettingsTemplateResponse(m map[string]json.RawMessage, resu err = core.SDKErrorf(err, "", "committed-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "account_settings", &obj.AccountSettings, UnmarshalAccountSettingsComponent) + err = core.UnmarshalModel(m, "account_settings", &obj.AccountSettings, UnmarshalTemplateAccountSettings) if err != nil { err = core.SDKErrorf(err, "", "account_settings-error", common.GetComponentInfo()) return @@ -7770,12 +7540,60 @@ func UnmarshalAccountSettingsTemplateResponse(m map[string]json.RawMessage, resu return } -// AccountSettingsUserMfa : AccountSettingsUserMfa struct -type AccountSettingsUserMfa struct { +// AccountSettingsUserDomainRestriction : Input body parameters for the Account Settings REST request. +type AccountSettingsUserDomainRestriction struct { + // The realm that the restrictions apply to. + RealmID *string `json:"realm_id" validate:"required"` + + // The list of allowed email patterns. Wildcard syntax is supported, '*' represents any sequence of zero or more + // characters in the string, except for '.' and '@'. The sequence ends if a '.' or '@' was found. '**' represents any + // sequence of zero or more characters in the string - without limit. + InvitationEmailAllowPatterns []string `json:"invitation_email_allow_patterns,omitempty"` + + // When true invites will only be possible to the domain patterns provided, otherwise invites are unrestricted. + RestrictInvitation *bool `json:"restrict_invitation,omitempty"` +} + +// NewAccountSettingsUserDomainRestriction : Instantiate AccountSettingsUserDomainRestriction (Generic Model Constructor) +func (*IamIdentityV1) NewAccountSettingsUserDomainRestriction(realmID string) (_model *AccountSettingsUserDomainRestriction, err error) { + _model = &AccountSettingsUserDomainRestriction{ + RealmID: core.StringPtr(realmID), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalAccountSettingsUserDomainRestriction unmarshals an instance of AccountSettingsUserDomainRestriction from the specified map of raw messages. +func UnmarshalAccountSettingsUserDomainRestriction(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AccountSettingsUserDomainRestriction) + err = core.UnmarshalPrimitive(m, "realm_id", &obj.RealmID) + if err != nil { + err = core.SDKErrorf(err, "", "realm_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "invitation_email_allow_patterns", &obj.InvitationEmailAllowPatterns) + if err != nil { + err = core.SDKErrorf(err, "", "invitation_email_allow_patterns-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "restrict_invitation", &obj.RestrictInvitation) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_invitation-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AccountSettingsUserMfaResponse : AccountSettingsUserMfaResponse struct +type AccountSettingsUserMfaResponse struct { // The iam_id of the user. IamID *string `json:"iam_id" validate:"required"` - // Defines the MFA requirement for the user. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7784,10 +7602,22 @@ type AccountSettingsUserMfa struct { // * LEVEL2 - TOTP-based MFA for all users // * LEVEL3 - U2F MFA for all users. Mfa *string `json:"mfa" validate:"required"` + + // name of the user account. + Name *string `json:"name,omitempty"` + + // userName of the user. + UserName *string `json:"userName,omitempty"` + + // email of the user. + Email *string `json:"email,omitempty"` + + // optional description. + Description *string `json:"description,omitempty"` } -// Constants associated with the AccountSettingsUserMfa.Mfa property. -// Defines the MFA requirement for the user. Valid values: +// Constants associated with the AccountSettingsUserMfaResponse.Mfa property. +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -7796,31 +7626,18 @@ type AccountSettingsUserMfa struct { // * LEVEL2 - TOTP-based MFA for all users // * LEVEL3 - U2F MFA for all users. const ( - AccountSettingsUserMfaMfaLevel1Const = "LEVEL1" - AccountSettingsUserMfaMfaLevel2Const = "LEVEL2" - AccountSettingsUserMfaMfaLevel3Const = "LEVEL3" - AccountSettingsUserMfaMfaNoneConst = "NONE" - AccountSettingsUserMfaMfaNoneNoRopcConst = "NONE_NO_ROPC" - AccountSettingsUserMfaMfaTotpConst = "TOTP" - AccountSettingsUserMfaMfaTotp4allConst = "TOTP4ALL" + AccountSettingsUserMfaResponseMfaLevel1Const = "LEVEL1" + AccountSettingsUserMfaResponseMfaLevel2Const = "LEVEL2" + AccountSettingsUserMfaResponseMfaLevel3Const = "LEVEL3" + AccountSettingsUserMfaResponseMfaNoneConst = "NONE" + AccountSettingsUserMfaResponseMfaNoneNoRopcConst = "NONE_NO_ROPC" + AccountSettingsUserMfaResponseMfaTotpConst = "TOTP" + AccountSettingsUserMfaResponseMfaTotp4allConst = "TOTP4ALL" ) -// NewAccountSettingsUserMfa : Instantiate AccountSettingsUserMfa (Generic Model Constructor) -func (*IamIdentityV1) NewAccountSettingsUserMfa(iamID string, mfa string) (_model *AccountSettingsUserMfa, err error) { - _model = &AccountSettingsUserMfa{ - IamID: core.StringPtr(iamID), - Mfa: core.StringPtr(mfa), - } - err = core.ValidateStruct(_model, "required parameters") - if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) - } - return -} - -// UnmarshalAccountSettingsUserMfa unmarshals an instance of AccountSettingsUserMfa from the specified map of raw messages. -func UnmarshalAccountSettingsUserMfa(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AccountSettingsUserMfa) +// UnmarshalAccountSettingsUserMfaResponse unmarshals an instance of AccountSettingsUserMfaResponse from the specified map of raw messages. +func UnmarshalAccountSettingsUserMfaResponse(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AccountSettingsUserMfaResponse) err = core.UnmarshalPrimitive(m, "iam_id", &obj.IamID) if err != nil { err = core.SDKErrorf(err, "", "iam_id-error", common.GetComponentInfo()) @@ -7831,6 +7648,26 @@ func UnmarshalAccountSettingsUserMfa(m map[string]json.RawMessage, result interf err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "userName", &obj.UserName) + if err != nil { + err = core.SDKErrorf(err, "", "userName-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "email", &obj.Email) + if err != nil { + err = core.SDKErrorf(err, "", "email-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -8434,6 +8271,32 @@ func UnmarshalApikeyActivityUser(m map[string]json.RawMessage, result interface{ return } +// AssignedTemplatesAccountSettingsRestrictUserDomains : AssignedTemplatesAccountSettingsRestrictUserDomains struct +type AssignedTemplatesAccountSettingsRestrictUserDomains struct { + AccountSufficient *bool `json:"account_sufficient,omitempty"` + + // Defines if account invitations are restricted to specified domains. To remove an entry for a realm_id, perform an + // update (PUT) request with only the realm_id set. + Restrictions []AccountSettingsUserDomainRestriction `json:"restrictions,omitempty"` +} + +// UnmarshalAssignedTemplatesAccountSettingsRestrictUserDomains unmarshals an instance of AssignedTemplatesAccountSettingsRestrictUserDomains from the specified map of raw messages. +func UnmarshalAssignedTemplatesAccountSettingsRestrictUserDomains(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AssignedTemplatesAccountSettingsRestrictUserDomains) + err = core.UnmarshalPrimitive(m, "account_sufficient", &obj.AccountSufficient) + if err != nil { + err = core.SDKErrorf(err, "", "account_sufficient-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "restrictions", &obj.Restrictions, UnmarshalAccountSettingsUserDomainRestriction) + if err != nil { + err = core.SDKErrorf(err, "", "restrictions-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // CommitAccountSettingsTemplateOptions : The CommitAccountSettingsTemplate options. type CommitAccountSettingsTemplateOptions struct { // ID of the account settings template. @@ -8586,7 +8449,8 @@ type CreateAccountSettingsTemplateOptions struct { // The description of the trusted profile template. Describe the template for enterprise account users. Description *string `json:"description,omitempty"` - AccountSettings *AccountSettingsComponent `json:"account_settings,omitempty"` + // Input body parameters for the Account Settings REST request. + AccountSettings *TemplateAccountSettings `json:"account_settings,omitempty"` // Allows users to set headers on API requests. Headers map[string]string @@ -8616,7 +8480,7 @@ func (_options *CreateAccountSettingsTemplateOptions) SetDescription(description } // SetAccountSettings : Allow user to set AccountSettings -func (_options *CreateAccountSettingsTemplateOptions) SetAccountSettings(accountSettings *AccountSettingsComponent) *CreateAccountSettingsTemplateOptions { +func (_options *CreateAccountSettingsTemplateOptions) SetAccountSettings(accountSettings *TemplateAccountSettings) *CreateAccountSettingsTemplateOptions { _options.AccountSettings = accountSettings return _options } @@ -8641,7 +8505,8 @@ type CreateAccountSettingsTemplateVersionOptions struct { // The description of the trusted profile template. Describe the template for enterprise account users. Description *string `json:"description,omitempty"` - AccountSettings *AccountSettingsComponent `json:"account_settings,omitempty"` + // Input body parameters for the Account Settings REST request. + AccountSettings *TemplateAccountSettings `json:"account_settings,omitempty"` // Allows users to set headers on API requests. Headers map[string]string @@ -8679,7 +8544,7 @@ func (_options *CreateAccountSettingsTemplateVersionOptions) SetDescription(desc } // SetAccountSettings : Allow user to set AccountSettings -func (_options *CreateAccountSettingsTemplateVersionOptions) SetAccountSettings(accountSettings *AccountSettingsComponent) *CreateAccountSettingsTemplateVersionOptions { +func (_options *CreateAccountSettingsTemplateVersionOptions) SetAccountSettings(accountSettings *TemplateAccountSettings) *CreateAccountSettingsTemplateVersionOptions { _options.AccountSettings = accountSettings return _options } @@ -10139,122 +10004,39 @@ type EffectiveAccountSettingsResponse struct { Effective *AccountSettingsEffectiveSection `json:"effective" validate:"required"` - Account *AccountSettingsAccountSection `json:"account" validate:"required"` - - // assigned template section. - AssignedTemplates []AccountSettingsAssignedTemplatesSection `json:"assigned_templates,omitempty"` -} - -// UnmarshalEffectiveAccountSettingsResponse unmarshals an instance of EffectiveAccountSettingsResponse from the specified map of raw messages. -func UnmarshalEffectiveAccountSettingsResponse(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(EffectiveAccountSettingsResponse) - err = core.UnmarshalModel(m, "context", &obj.Context, UnmarshalResponseContext) - if err != nil { - err = core.SDKErrorf(err, "", "context-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) - if err != nil { - err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "effective", &obj.Effective, UnmarshalAccountSettingsEffectiveSection) - if err != nil { - err = core.SDKErrorf(err, "", "effective-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "account", &obj.Account, UnmarshalAccountSettingsAccountSection) - if err != nil { - err = core.SDKErrorf(err, "", "account-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "assigned_templates", &obj.AssignedTemplates, UnmarshalAccountSettingsAssignedTemplatesSection) - if err != nil { - err = core.SDKErrorf(err, "", "assigned_templates-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// EffectiveAccountSettingsUserMfa : EffectiveAccountSettingsUserMfa struct -type EffectiveAccountSettingsUserMfa struct { - // The iam_id of the user. - IamID *string `json:"iam_id" validate:"required"` - - // Defines the MFA requirement for the user. Valid values: - // * NONE - No MFA trait set - // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password - // * TOTP - For all non-federated IBMId users - // * TOTP4ALL - For all users - // * LEVEL1 - Email-based MFA for all users - // * LEVEL2 - TOTP-based MFA for all users - // * LEVEL3 - U2F MFA for all users. - Mfa *string `json:"mfa" validate:"required"` - - // name of the user account. - Name *string `json:"name,omitempty"` - - // userName of the user. - UserName *string `json:"userName,omitempty"` - - // email of the user. - Email *string `json:"email,omitempty"` - - // optional description. - Description *string `json:"description,omitempty"` -} + // Input body parameters for the Account Settings REST request. + Account *AccountSettingsResponse `json:"account" validate:"required"` -// Constants associated with the EffectiveAccountSettingsUserMfa.Mfa property. -// Defines the MFA requirement for the user. Valid values: -// * NONE - No MFA trait set -// * NONE_NO_ROPC- No MFA, disable CLI logins with only a password -// * TOTP - For all non-federated IBMId users -// * TOTP4ALL - For all users -// * LEVEL1 - Email-based MFA for all users -// * LEVEL2 - TOTP-based MFA for all users -// * LEVEL3 - U2F MFA for all users. -const ( - EffectiveAccountSettingsUserMfaMfaLevel1Const = "LEVEL1" - EffectiveAccountSettingsUserMfaMfaLevel2Const = "LEVEL2" - EffectiveAccountSettingsUserMfaMfaLevel3Const = "LEVEL3" - EffectiveAccountSettingsUserMfaMfaNoneConst = "NONE" - EffectiveAccountSettingsUserMfaMfaNoneNoRopcConst = "NONE_NO_ROPC" - EffectiveAccountSettingsUserMfaMfaTotpConst = "TOTP" - EffectiveAccountSettingsUserMfaMfaTotp4allConst = "TOTP4ALL" -) + // assigned template section. + AssignedTemplates []AccountSettingsAssignedTemplatesSection `json:"assigned_templates,omitempty"` +} -// UnmarshalEffectiveAccountSettingsUserMfa unmarshals an instance of EffectiveAccountSettingsUserMfa from the specified map of raw messages. -func UnmarshalEffectiveAccountSettingsUserMfa(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(EffectiveAccountSettingsUserMfa) - err = core.UnmarshalPrimitive(m, "iam_id", &obj.IamID) - if err != nil { - err = core.SDKErrorf(err, "", "iam_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) +// UnmarshalEffectiveAccountSettingsResponse unmarshals an instance of EffectiveAccountSettingsResponse from the specified map of raw messages. +func UnmarshalEffectiveAccountSettingsResponse(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EffectiveAccountSettingsResponse) + err = core.UnmarshalModel(m, "context", &obj.Context, UnmarshalResponseContext) if err != nil { - err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "context-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "userName", &obj.UserName) + err = core.UnmarshalModel(m, "effective", &obj.Effective, UnmarshalAccountSettingsEffectiveSection) if err != nil { - err = core.SDKErrorf(err, "", "userName-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "effective-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "email", &obj.Email) + err = core.UnmarshalModel(m, "account", &obj.Account, UnmarshalAccountSettingsResponse) if err != nil { - err = core.SDKErrorf(err, "", "email-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "account-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "description", &obj.Description) + err = core.UnmarshalModel(m, "assigned_templates", &obj.AssignedTemplates, UnmarshalAccountSettingsAssignedTemplatesSection) if err != nil { - err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "assigned_templates-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -10512,6 +10294,9 @@ type GetAccountSettingsOptions struct { // Defines if the entity history is included in the response. IncludeHistory *bool `json:"include_history,omitempty"` + // Enrich MFA exemptions with user PI. + ResolveUserMfa *bool `json:"resolve_user_mfa,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } @@ -10535,6 +10320,12 @@ func (_options *GetAccountSettingsOptions) SetIncludeHistory(includeHistory bool return _options } +// SetResolveUserMfa : Allow user to set ResolveUserMfa +func (_options *GetAccountSettingsOptions) SetResolveUserMfa(resolveUserMfa bool) *GetAccountSettingsOptions { + _options.ResolveUserMfa = core.BoolPtr(resolveUserMfa) + return _options +} + // SetHeaders : Allow user to set Headers func (options *GetAccountSettingsOptions) SetHeaders(param map[string]string) *GetAccountSettingsOptions { options.Headers = param @@ -11368,7 +11159,7 @@ func (options *GetTrustedProfileAssignmentOptions) SetHeaders(param map[string]s // IDBasedMfaEnrollment : IDBasedMfaEnrollment struct type IDBasedMfaEnrollment struct { - // Defines the MFA trait for the account. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -11378,7 +11169,7 @@ type IDBasedMfaEnrollment struct { // * LEVEL3 - U2F MFA for all users. TraitAccountDefault *string `json:"trait_account_default" validate:"required"` - // Defines the MFA trait for the account. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -11388,7 +11179,7 @@ type IDBasedMfaEnrollment struct { // * LEVEL3 - U2F MFA for all users. TraitUserSpecific *string `json:"trait_user_specific,omitempty"` - // Defines the MFA trait for the account. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -11410,7 +11201,7 @@ type IDBasedMfaEnrollment struct { } // Constants associated with the IDBasedMfaEnrollment.TraitAccountDefault property. -// Defines the MFA trait for the account. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -11429,7 +11220,7 @@ const ( ) // Constants associated with the IDBasedMfaEnrollment.TraitUserSpecific property. -// Defines the MFA trait for the account. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -11448,7 +11239,7 @@ const ( ) // Constants associated with the IDBasedMfaEnrollment.TraitEffective property. -// Defines the MFA trait for the account. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -13954,6 +13745,221 @@ func (options *SetProfileIdentityOptions) SetHeaders(param map[string]string) *S return options } +// TemplateAccountSettings : Input body parameters for the Account Settings REST request. +type TemplateAccountSettings struct { + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs + // * NOT_SET - to 'unset' a previous set value. + RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` + + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs + // * NOT_SET - to 'unset' a previous set value. + RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` + + // Defines the IP addresses and subnets from which IAM tokens can be created for the account. + AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` + + // MFA trait definitions as follows: + // * NONE - No MFA trait set + // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password + // * TOTP - For all non-federated IBMId users + // * TOTP4ALL - For all users + // * LEVEL1 - Email-based MFA for all users + // * LEVEL2 - TOTP-based MFA for all users + // * LEVEL3 - U2F MFA for all users. + Mfa *string `json:"mfa,omitempty"` + + // List of users that are exempted from the MFA requirement of the account. + UserMfa []UserMfa `json:"user_mfa,omitempty"` + + // Defines the session expiration in seconds for the account. Valid values: + // * Any whole number between between '900' and '86400' + // * NOT_SET - To unset account setting and use service default. + SessionExpirationInSeconds *string `json:"session_expiration_in_seconds,omitempty"` + + // Defines the period of time in seconds in which a session will be invalidated due to inactivity. Valid values: + // * Any whole number between '900' and '7200' + // * NOT_SET - To unset account setting and use service default. + SessionInvalidationInSeconds *string `json:"session_invalidation_in_seconds,omitempty"` + + // Defines the max allowed sessions per identity required by the account. Valid values: + // * Any whole number greater than 0 + // * NOT_SET - To unset account setting and use service default. + MaxSessionsPerIdentity *string `json:"max_sessions_per_identity,omitempty"` + + // Defines the access token expiration in seconds. Valid values: + // * Any whole number between '900' and '3600' + // * NOT_SET - To unset account setting and use service default. + SystemAccessTokenExpirationInSeconds *string `json:"system_access_token_expiration_in_seconds,omitempty"` + + // Defines the refresh token expiration in seconds. Valid values: + // * Any whole number between '900' and '259200' + // * NOT_SET - To unset account setting and use service default. + SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds,omitempty"` + + // Defines whether or not user visibility is access controlled. Valid values: + // * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to + // the account, or descendants of those users based on the classic infrastructure hierarchy + // * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console + // * NOT_SET - to 'unset' a previous set value. + RestrictUserListVisibility *string `json:"restrict_user_list_visibility,omitempty"` + + RestrictUserDomains *TemplateAccountSettingsRestrictUserDomains `json:"restrict_user_domains,omitempty"` +} + +// Constants associated with the TemplateAccountSettings.RestrictCreateServiceID property. +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs +// * NOT_SET - to 'unset' a previous set value. +const ( + TemplateAccountSettingsRestrictCreateServiceIDNotRestrictedConst = "NOT_RESTRICTED" + TemplateAccountSettingsRestrictCreateServiceIDNotSetConst = "NOT_SET" + TemplateAccountSettingsRestrictCreateServiceIDRestrictedConst = "RESTRICTED" +) + +// Constants associated with the TemplateAccountSettings.RestrictCreatePlatformApikey property. +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs +// * NOT_SET - to 'unset' a previous set value. +const ( + TemplateAccountSettingsRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" + TemplateAccountSettingsRestrictCreatePlatformApikeyNotSetConst = "NOT_SET" + TemplateAccountSettingsRestrictCreatePlatformApikeyRestrictedConst = "RESTRICTED" +) + +// Constants associated with the TemplateAccountSettings.Mfa property. +// MFA trait definitions as follows: +// * NONE - No MFA trait set +// * NONE_NO_ROPC- No MFA, disable CLI logins with only a password +// * TOTP - For all non-federated IBMId users +// * TOTP4ALL - For all users +// * LEVEL1 - Email-based MFA for all users +// * LEVEL2 - TOTP-based MFA for all users +// * LEVEL3 - U2F MFA for all users. +const ( + TemplateAccountSettingsMfaLevel1Const = "LEVEL1" + TemplateAccountSettingsMfaLevel2Const = "LEVEL2" + TemplateAccountSettingsMfaLevel3Const = "LEVEL3" + TemplateAccountSettingsMfaNoneConst = "NONE" + TemplateAccountSettingsMfaNoneNoRopcConst = "NONE_NO_ROPC" + TemplateAccountSettingsMfaTotpConst = "TOTP" + TemplateAccountSettingsMfaTotp4allConst = "TOTP4ALL" +) + +// Constants associated with the TemplateAccountSettings.RestrictUserListVisibility property. +// Defines whether or not user visibility is access controlled. Valid values: +// * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to +// the account, or descendants of those users based on the classic infrastructure hierarchy +// * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console +// * NOT_SET - to 'unset' a previous set value. +const ( + TemplateAccountSettingsRestrictUserListVisibilityNotRestrictedConst = "NOT_RESTRICTED" + TemplateAccountSettingsRestrictUserListVisibilityNotSetConst = "NOT_SET" + TemplateAccountSettingsRestrictUserListVisibilityRestrictedConst = "RESTRICTED" +) + +// UnmarshalTemplateAccountSettings unmarshals an instance of TemplateAccountSettings from the specified map of raw messages. +func UnmarshalTemplateAccountSettings(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateAccountSettings) + err = core.UnmarshalPrimitive(m, "restrict_create_service_id", &obj.RestrictCreateServiceID) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_create_service_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "restrict_create_platform_apikey", &obj.RestrictCreatePlatformApikey) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_create_platform_apikey-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "allowed_ip_addresses", &obj.AllowedIPAddresses) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_ip_addresses-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) + if err != nil { + err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "user_mfa", &obj.UserMfa, UnmarshalUserMfa) + if err != nil { + err = core.SDKErrorf(err, "", "user_mfa-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "session_expiration_in_seconds", &obj.SessionExpirationInSeconds) + if err != nil { + err = core.SDKErrorf(err, "", "session_expiration_in_seconds-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "session_invalidation_in_seconds", &obj.SessionInvalidationInSeconds) + if err != nil { + err = core.SDKErrorf(err, "", "session_invalidation_in_seconds-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "max_sessions_per_identity", &obj.MaxSessionsPerIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "max_sessions_per_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "system_access_token_expiration_in_seconds", &obj.SystemAccessTokenExpirationInSeconds) + if err != nil { + err = core.SDKErrorf(err, "", "system_access_token_expiration_in_seconds-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "system_refresh_token_expiration_in_seconds", &obj.SystemRefreshTokenExpirationInSeconds) + if err != nil { + err = core.SDKErrorf(err, "", "system_refresh_token_expiration_in_seconds-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "restrict_user_list_visibility", &obj.RestrictUserListVisibility) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_user_list_visibility-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "restrict_user_domains", &obj.RestrictUserDomains, UnmarshalTemplateAccountSettingsRestrictUserDomains) + if err != nil { + err = core.SDKErrorf(err, "", "restrict_user_domains-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// TemplateAccountSettingsRestrictUserDomains : TemplateAccountSettingsRestrictUserDomains struct +type TemplateAccountSettingsRestrictUserDomains struct { + AccountSufficient *bool `json:"account_sufficient,omitempty"` + + // Defines if account invitations are restricted to specified domains. To remove an entry for a realm_id, perform an + // update (PUT) request with only the realm_id set. + Restrictions []AccountSettingsUserDomainRestriction `json:"restrictions,omitempty"` +} + +// UnmarshalTemplateAccountSettingsRestrictUserDomains unmarshals an instance of TemplateAccountSettingsRestrictUserDomains from the specified map of raw messages. +func UnmarshalTemplateAccountSettingsRestrictUserDomains(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateAccountSettingsRestrictUserDomains) + err = core.UnmarshalPrimitive(m, "account_sufficient", &obj.AccountSufficient) + if err != nil { + err = core.SDKErrorf(err, "", "account_sufficient-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "restrictions", &obj.Restrictions, UnmarshalAccountSettingsUserDomainRestriction) + if err != nil { + err = core.SDKErrorf(err, "", "restrictions-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // TemplateAssignmentListResponse : List Response body format for Template Assignments Records. type TemplateAssignmentListResponse struct { // Context with key properties for problem determination. @@ -15053,24 +15059,24 @@ type UpdateAccountSettingsOptions struct { // The id of the account to update the settings for. AccountID *string `json:"account_id" validate:"required,ne="` - // Defines whether or not creating a service ID is access controlled. Valid values: + // Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreateServiceID *string `json:"restrict_create_service_id,omitempty"` - // Defines whether or not creating platform API keys is access controlled. Valid values: - // * RESTRICTED - only users assigned the 'User API key creator' role on the IAM Identity Service can create API - // keys, including the account owner - // * NOT_RESTRICTED - all members of an account can create platform API keys + // Defines whether or not creating the resource is access controlled. Valid values: + // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service + // IDs, including the account owner + // * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. RestrictCreatePlatformApikey *string `json:"restrict_create_platform_apikey,omitempty"` // Defines the IP addresses and subnets from which IAM tokens can be created for the account. AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` - // Defines the MFA trait for the account. Valid values: + // MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -15081,7 +15087,7 @@ type UpdateAccountSettingsOptions struct { Mfa *string `json:"mfa,omitempty"` // List of users that are exempted from the MFA requirement of the account. - UserMfa []AccountSettingsUserMfa `json:"user_mfa,omitempty"` + UserMfa []UserMfa `json:"user_mfa,omitempty"` // Defines the session expiration in seconds for the account. Valid values: // * Any whole number between between '900' and '86400' @@ -15093,7 +15099,7 @@ type UpdateAccountSettingsOptions struct { // * NOT_SET - To unset account setting and use service default. SessionInvalidationInSeconds *string `json:"session_invalidation_in_seconds,omitempty"` - // Defines the max allowed sessions per identity required by the account. Value values: + // Defines the max allowed sessions per identity required by the account. Valid values: // * Any whole number greater than 0 // * NOT_SET - To unset account setting and use service default. MaxSessionsPerIdentity *string `json:"max_sessions_per_identity,omitempty"` @@ -15108,12 +15114,22 @@ type UpdateAccountSettingsOptions struct { // * NOT_SET - To unset account setting and use service default. SystemRefreshTokenExpirationInSeconds *string `json:"system_refresh_token_expiration_in_seconds,omitempty"` + // Defines whether or not user visibility is access controlled. Valid values: + // * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to + // the account, or descendants of those users based on the classic infrastructure hierarchy + // * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. + RestrictUserListVisibility *string `json:"restrict_user_list_visibility,omitempty"` + + // Defines if account invitations are restricted to specified domains. To remove an entry for a realm_id, perform an + // update (PUT) request with only the realm_id set. + RestrictUserDomains []AccountSettingsUserDomainRestriction `json:"restrict_user_domains,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } // Constants associated with the UpdateAccountSettingsOptions.RestrictCreateServiceID property. -// Defines whether or not creating a service ID is access controlled. Valid values: +// Defines whether or not creating the resource is access controlled. Valid values: // * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service // IDs, including the account owner // * NOT_RESTRICTED - all members of an account can create service IDs @@ -15125,10 +15141,10 @@ const ( ) // Constants associated with the UpdateAccountSettingsOptions.RestrictCreatePlatformApikey property. -// Defines whether or not creating platform API keys is access controlled. Valid values: -// * RESTRICTED - only users assigned the 'User API key creator' role on the IAM Identity Service can create API keys, -// including the account owner -// * NOT_RESTRICTED - all members of an account can create platform API keys +// Defines whether or not creating the resource is access controlled. Valid values: +// * RESTRICTED - only users assigned the 'Service ID creator' role on the IAM Identity Service can create service +// IDs, including the account owner +// * NOT_RESTRICTED - all members of an account can create service IDs // * NOT_SET - to 'unset' a previous set value. const ( UpdateAccountSettingsOptionsRestrictCreatePlatformApikeyNotRestrictedConst = "NOT_RESTRICTED" @@ -15137,7 +15153,7 @@ const ( ) // Constants associated with the UpdateAccountSettingsOptions.Mfa property. -// Defines the MFA trait for the account. Valid values: +// MFA trait definitions as follows: // * NONE - No MFA trait set // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password // * TOTP - For all non-federated IBMId users @@ -15155,6 +15171,16 @@ const ( UpdateAccountSettingsOptionsMfaTotp4allConst = "TOTP4ALL" ) +// Constants associated with the UpdateAccountSettingsOptions.RestrictUserListVisibility property. +// Defines whether or not user visibility is access controlled. Valid values: +// * RESTRICTED - users can view only specific types of users in the account, such as those the user has invited to +// the account, or descendants of those users based on the classic infrastructure hierarchy +// * NOT_RESTRICTED - any user in the account can view other users from the Users page in IBM Cloud console. +const ( + UpdateAccountSettingsOptionsRestrictUserListVisibilityNotRestrictedConst = "NOT_RESTRICTED" + UpdateAccountSettingsOptionsRestrictUserListVisibilityRestrictedConst = "RESTRICTED" +) + // NewUpdateAccountSettingsOptions : Instantiate UpdateAccountSettingsOptions func (*IamIdentityV1) NewUpdateAccountSettingsOptions(ifMatch string, accountID string) *UpdateAccountSettingsOptions { return &UpdateAccountSettingsOptions{ @@ -15200,7 +15226,7 @@ func (_options *UpdateAccountSettingsOptions) SetMfa(mfa string) *UpdateAccountS } // SetUserMfa : Allow user to set UserMfa -func (_options *UpdateAccountSettingsOptions) SetUserMfa(userMfa []AccountSettingsUserMfa) *UpdateAccountSettingsOptions { +func (_options *UpdateAccountSettingsOptions) SetUserMfa(userMfa []UserMfa) *UpdateAccountSettingsOptions { _options.UserMfa = userMfa return _options } @@ -15235,6 +15261,18 @@ func (_options *UpdateAccountSettingsOptions) SetSystemRefreshTokenExpirationInS return _options } +// SetRestrictUserListVisibility : Allow user to set RestrictUserListVisibility +func (_options *UpdateAccountSettingsOptions) SetRestrictUserListVisibility(restrictUserListVisibility string) *UpdateAccountSettingsOptions { + _options.RestrictUserListVisibility = core.StringPtr(restrictUserListVisibility) + return _options +} + +// SetRestrictUserDomains : Allow user to set RestrictUserDomains +func (_options *UpdateAccountSettingsOptions) SetRestrictUserDomains(restrictUserDomains []AccountSettingsUserDomainRestriction) *UpdateAccountSettingsOptions { + _options.RestrictUserDomains = restrictUserDomains + return _options +} + // SetHeaders : Allow user to set Headers func (options *UpdateAccountSettingsOptions) SetHeaders(param map[string]string) *UpdateAccountSettingsOptions { options.Headers = param @@ -15263,7 +15301,8 @@ type UpdateAccountSettingsTemplateVersionOptions struct { // The description of the trusted profile template. Describe the template for enterprise account users. Description *string `json:"description,omitempty"` - AccountSettings *AccountSettingsComponent `json:"account_settings,omitempty"` + // Input body parameters for the Account Settings REST request. + AccountSettings *TemplateAccountSettings `json:"account_settings,omitempty"` // Allows users to set headers on API requests. Headers map[string]string @@ -15315,7 +15354,7 @@ func (_options *UpdateAccountSettingsTemplateVersionOptions) SetDescription(desc } // SetAccountSettings : Allow user to set AccountSettings -func (_options *UpdateAccountSettingsTemplateVersionOptions) SetAccountSettings(accountSettings *AccountSettingsComponent) *UpdateAccountSettingsTemplateVersionOptions { +func (_options *UpdateAccountSettingsTemplateVersionOptions) SetAccountSettings(accountSettings *TemplateAccountSettings) *UpdateAccountSettingsTemplateVersionOptions { _options.AccountSettings = accountSettings return _options } @@ -16016,6 +16055,58 @@ func UnmarshalUserActivity(m map[string]json.RawMessage, result interface{}) (er return } +// UserMfa : UserMfa struct +type UserMfa struct { + // The iam_id of the user. + IamID *string `json:"iam_id,omitempty"` + + // MFA trait definitions as follows: + // * NONE - No MFA trait set + // * NONE_NO_ROPC- No MFA, disable CLI logins with only a password + // * TOTP - For all non-federated IBMId users + // * TOTP4ALL - For all users + // * LEVEL1 - Email-based MFA for all users + // * LEVEL2 - TOTP-based MFA for all users + // * LEVEL3 - U2F MFA for all users. + Mfa *string `json:"mfa,omitempty"` +} + +// Constants associated with the UserMfa.Mfa property. +// MFA trait definitions as follows: +// * NONE - No MFA trait set +// * NONE_NO_ROPC- No MFA, disable CLI logins with only a password +// * TOTP - For all non-federated IBMId users +// * TOTP4ALL - For all users +// * LEVEL1 - Email-based MFA for all users +// * LEVEL2 - TOTP-based MFA for all users +// * LEVEL3 - U2F MFA for all users. +const ( + UserMfaMfaLevel1Const = "LEVEL1" + UserMfaMfaLevel2Const = "LEVEL2" + UserMfaMfaLevel3Const = "LEVEL3" + UserMfaMfaNoneConst = "NONE" + UserMfaMfaNoneNoRopcConst = "NONE_NO_ROPC" + UserMfaMfaTotpConst = "TOTP" + UserMfaMfaTotp4allConst = "TOTP4ALL" +) + +// UnmarshalUserMfa unmarshals an instance of UserMfa from the specified map of raw messages. +func UnmarshalUserMfa(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(UserMfa) + err = core.UnmarshalPrimitive(m, "iam_id", &obj.IamID) + if err != nil { + err = core.SDKErrorf(err, "", "iam_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "mfa", &obj.Mfa) + if err != nil { + err = core.SDKErrorf(err, "", "mfa-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // UserMfaEnrollments : UserMfaEnrollments struct type UserMfaEnrollments struct { // IAMid of the user. diff --git a/vendor/github.com/IBM/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1.go b/vendor/github.com/IBM/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1.go index 4386dca177..8d6d27483f 100644 --- a/vendor/github.com/IBM/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1.go +++ b/vendor/github.com/IBM/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.106.0-09823488-20250707-071701 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ // Package iampolicymanagementv1 : Operations and models for the IamPolicyManagementV1 service @@ -4316,989 +4316,2178 @@ func (iamPolicyManagement *IamPolicyManagementV1) DeleteActionControlAssignmentW return } -func getServiceComponentInfo() *core.ProblemComponent { - return core.NewProblemComponent(DefaultServiceName, "1.0.1") -} -// AccountSettingsAccessManagement : The Access Management Account Settings that are currently set for the requested account. -type AccountSettingsAccessManagement struct { - // How external accounts can interact in relation to the requested account. - ExternalAccountIdentityInteraction *ExternalAccountIdentityInteraction `json:"external_account_identity_interaction" validate:"required"` +// ListRoleTemplates : List role templates by attributes +// List role templates and filter by attributes by using query parameters. The following attributes are supported: +// `account_id`, `name`, `role_name`, `role_service_name`, `state`, `limit`, `start`. +// `account_id` is a required query parameter. Only role templates that have the specified attributes and that the +// caller has read access to are returned. If the caller does not have read access to any role templates an empty array +// is returned. +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleTemplates(listRoleTemplatesOptions *ListRoleTemplatesOptions) (result *RoleTemplateCollection, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.ListRoleTemplatesWithContext(context.Background(), listRoleTemplatesOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalAccountSettingsAccessManagement unmarshals an instance of AccountSettingsAccessManagement from the specified map of raw messages. -func UnmarshalAccountSettingsAccessManagement(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AccountSettingsAccessManagement) - err = core.UnmarshalModel(m, "external_account_identity_interaction", &obj.ExternalAccountIdentityInteraction, UnmarshalExternalAccountIdentityInteraction) +// ListRoleTemplatesWithContext is an alternate form of the ListRoleTemplates method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleTemplatesWithContext(ctx context.Context, listRoleTemplatesOptions *ListRoleTemplatesOptions) (result *RoleTemplateCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listRoleTemplatesOptions, "listRoleTemplatesOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "external_account_identity_interaction-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(listRoleTemplatesOptions, "listRoleTemplatesOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// ActionControlAssignment : The set of properties associated with the assigned action control template. -type ActionControlAssignment struct { - // Action control assignment ID. - ID *string `json:"id,omitempty"` - - // The account GUID that the action control assignments belong to. - AccountID *string `json:"account_id,omitempty"` - - // The href URL that links to the action control assignments API by action control assignment ID. - Href *string `json:"href,omitempty"` - - // The UTC timestamp when the action control assignment was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - - // The IAM ID of the entity that created the action control assignment. - CreatedByID *string `json:"created_by_id,omitempty"` - // The UTC timestamp when the action control assignment was last modified. - LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates`, nil) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } - // The IAM ID of the entity that last modified the action control assignment. - LastModifiedByID *string `json:"last_modified_by_id,omitempty"` + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "ListRoleTemplates") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } - // The current operation of the action control assignment. - Operation *string `json:"operation,omitempty"` + for headerName, headerValue := range listRoleTemplatesOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + if listRoleTemplatesOptions.AcceptLanguage != nil { + builder.AddHeader("Accept-Language", fmt.Sprint(*listRoleTemplatesOptions.AcceptLanguage)) + } - // Resources created when action control template is assigned. - Resources []ActionControlAssignmentResource `json:"resources,omitempty"` + builder.AddQuery("account_id", fmt.Sprint(*listRoleTemplatesOptions.AccountID)) + if listRoleTemplatesOptions.Name != nil { + builder.AddQuery("name", fmt.Sprint(*listRoleTemplatesOptions.Name)) + } + if listRoleTemplatesOptions.RoleName != nil { + builder.AddQuery("role_name", fmt.Sprint(*listRoleTemplatesOptions.RoleName)) + } + if listRoleTemplatesOptions.RoleServiceName != nil { + builder.AddQuery("role_service_name", fmt.Sprint(*listRoleTemplatesOptions.RoleServiceName)) + } + if listRoleTemplatesOptions.State != nil { + builder.AddQuery("state", fmt.Sprint(*listRoleTemplatesOptions.State)) + } + if listRoleTemplatesOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listRoleTemplatesOptions.Limit)) + } + if listRoleTemplatesOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listRoleTemplatesOptions.Start)) + } - // The action control template id and version that will be assigned. - Template *ActionControlAssignmentTemplate `json:"template" validate:"required"` + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } - // assignment target account and type. - Target *AssignmentTargetDetails `json:"target" validate:"required"` + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "list_role_templates", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplateCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } - // The action control assignment status. - Status *string `json:"status,omitempty"` + return } -// Constants associated with the ActionControlAssignment.Operation property. -// The current operation of the action control assignment. -const ( - ActionControlAssignmentOperationApplyConst = "apply" - ActionControlAssignmentOperationCreateConst = "create" - ActionControlAssignmentOperationRemoveConst = "remove" - ActionControlAssignmentOperationUpdateConst = "update" -) - -// Constants associated with the ActionControlAssignment.Status property. -// The action control assignment status. -const ( - ActionControlAssignmentStatusAcceptedConst = "accepted" - ActionControlAssignmentStatusFailureConst = "failure" - ActionControlAssignmentStatusInProgressConst = "in_progress" - ActionControlAssignmentStatusSupersededConst = "superseded" -) +// CreateRoleTemplate : Create role template +// Create a role template. Role templates define roles from an existing system or service defined role. +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplate(createRoleTemplateOptions *CreateRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.CreateRoleTemplateWithContext(context.Background(), createRoleTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return +} -// UnmarshalActionControlAssignment unmarshals an instance of ActionControlAssignment from the specified map of raw messages. -func UnmarshalActionControlAssignment(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignment) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) +// CreateRoleTemplateWithContext is an alternate form of the CreateRoleTemplate method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplateWithContext(ctx context.Context, createRoleTemplateOptions *CreateRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createRoleTemplateOptions, "createRoleTemplateOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) + err = core.ValidateStruct(createRoleTemplateOptions, "createRoleTemplateOptions") if err != nil { - err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) + + builder := core.NewRequestBuilder(core.POST) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates`, nil) if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "CreateRoleTemplate") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) } - err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) - if err != nil { - err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) - return + + for headerName, headerValue := range createRoleTemplateOptions.Headers { + builder.AddHeader(headerName, headerValue) } - err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) - if err != nil { - err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) - return + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + if createRoleTemplateOptions.AcceptLanguage != nil { + builder.AddHeader("Accept-Language", fmt.Sprint(*createRoleTemplateOptions.AcceptLanguage)) } - err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) - if err != nil { - err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) - return + + body := make(map[string]interface{}) + if createRoleTemplateOptions.Name != nil { + body["name"] = createRoleTemplateOptions.Name } - err = core.UnmarshalPrimitive(m, "operation", &obj.Operation) - if err != nil { - err = core.SDKErrorf(err, "", "operation-error", common.GetComponentInfo()) - return + if createRoleTemplateOptions.AccountID != nil { + body["account_id"] = createRoleTemplateOptions.AccountID } - err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalActionControlAssignmentResource) - if err != nil { - err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) - return + if createRoleTemplateOptions.Description != nil { + body["description"] = createRoleTemplateOptions.Description } - err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalActionControlAssignmentTemplate) + if createRoleTemplateOptions.Committed != nil { + body["committed"] = createRoleTemplateOptions.Committed + } + if createRoleTemplateOptions.Role != nil { + body["role"] = createRoleTemplateOptions.Role + } + _, err = builder.SetBodyContentJSON(body) if err != nil { - err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "status", &obj.Status) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "create_role_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// ActionControlAssignmentCollection : A collection of action control assignments. -type ActionControlAssignmentCollection struct { - // The number of documents to include per each page of the collection. - Limit *int64 `json:"limit,omitempty"` - - // Details with linking href to first page of requested collection. - First *First `json:"first,omitempty"` - - // Details with href linking to the following page of requested collection. - Next *Next `json:"next,omitempty"` - - // Details with linking href to previous page of requested collection. - Previous *Previous `json:"previous,omitempty"` - - // List of action control assignments. - Assignments []ActionControlAssignment `json:"assignments" validate:"required"` +// GetRoleTemplate : Retrieve the latest version of a role template +// Retrieve the latest version of a role template by providing a role template ID. +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleTemplate(getRoleTemplateOptions *GetRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.GetRoleTemplateWithContext(context.Background(), getRoleTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalActionControlAssignmentCollection unmarshals an instance of ActionControlAssignmentCollection from the specified map of raw messages. -func UnmarshalActionControlAssignmentCollection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignmentCollection) - err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) +// GetRoleTemplateWithContext is an alternate form of the GetRoleTemplate method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleTemplateWithContext(ctx context.Context, getRoleTemplateOptions *GetRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getRoleTemplateOptions, "getRoleTemplateOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + err = core.ValidateStruct(getRoleTemplateOptions, "getRoleTemplateOptions") if err != nil { - err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + + pathParamsMap := map[string]string{ + "role_template_id": *getRoleTemplateOptions.RoleTemplateID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "GetRoleTemplate") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range getRoleTemplateOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + if getRoleTemplateOptions.State != nil { + builder.AddQuery("state", fmt.Sprint(*getRoleTemplateOptions.State)) + } + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "assignments", &obj.Assignments, UnmarshalActionControlAssignment) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "assignments-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "get_role_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// Retrieve the value to be passed to a request to access the next page of results -func (resp *ActionControlAssignmentCollection) GetNextStart() (*string, error) { - if core.IsNil(resp.Next) { - return nil, nil - } - return resp.Next.Start, nil +// DeleteRoleTemplate : Delete a Role template +// Delete a role template by providing the role template ID. This deletes all versions of this template. A role template +// can't be deleted if any version of the template is assigned to one or more child accounts. You must remove the role +// assignments first. +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleTemplate(deleteRoleTemplateOptions *DeleteRoleTemplateOptions) (response *core.DetailedResponse, err error) { + response, err = iamPolicyManagement.DeleteRoleTemplateWithContext(context.Background(), deleteRoleTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// ActionControlAssignmentResource : The action control assignment resources and target where the template is assigned. -type ActionControlAssignmentResource struct { - // assignment target account and type. - Target *AssignmentTargetDetails `json:"target" validate:"required"` +// DeleteRoleTemplateWithContext is an alternate form of the DeleteRoleTemplate method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleTemplateWithContext(ctx context.Context, deleteRoleTemplateOptions *DeleteRoleTemplateOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteRoleTemplateOptions, "deleteRoleTemplateOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(deleteRoleTemplateOptions, "deleteRoleTemplateOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } - // Set of properties of the assigned resource or error message if assignment failed. - ActionControl *ActionControlAssignmentResourceActionControl `json:"action_control,omitempty"` -} + pathParamsMap := map[string]string{ + "role_template_id": *deleteRoleTemplateOptions.RoleTemplateID, + } -// UnmarshalActionControlAssignmentResource unmarshals an instance of ActionControlAssignmentResource from the specified map of raw messages. -func UnmarshalActionControlAssignmentResource(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignmentResource) - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "action_control", &obj.ActionControl, UnmarshalActionControlAssignmentResourceActionControl) + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "DeleteRoleTemplate") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range deleteRoleTemplateOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "action_control-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + + response, err = iamPolicyManagement.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_role_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + return } -// ActionControlAssignmentResourceActionControl : Set of properties of the assigned resource or error message if assignment failed. -type ActionControlAssignmentResourceActionControl struct { - // On success, it includes the action control assigned. - ResourceCreated *ActionControlAssignmentResourceCreated `json:"resource_created,omitempty"` - - // Body parameters for assignment error. - ErrorMessage *AssignmentResourceError `json:"error_message,omitempty"` +// CreateRoleTemplateVersion : Create a new role template version +// Create a new version of a role template. Use this if you need to make updates to a role template that is committed. +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplateVersion(createRoleTemplateVersionOptions *CreateRoleTemplateVersionOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.CreateRoleTemplateVersionWithContext(context.Background(), createRoleTemplateVersionOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalActionControlAssignmentResourceActionControl unmarshals an instance of ActionControlAssignmentResourceActionControl from the specified map of raw messages. -func UnmarshalActionControlAssignmentResourceActionControl(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignmentResourceActionControl) - err = core.UnmarshalModel(m, "resource_created", &obj.ResourceCreated, UnmarshalActionControlAssignmentResourceCreated) +// CreateRoleTemplateVersionWithContext is an alternate form of the CreateRoleTemplateVersion method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplateVersionWithContext(ctx context.Context, createRoleTemplateVersionOptions *CreateRoleTemplateVersionOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createRoleTemplateVersionOptions, "createRoleTemplateVersionOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "resource_created-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "error_message", &obj.ErrorMessage, UnmarshalAssignmentResourceError) + err = core.ValidateStruct(createRoleTemplateVersionOptions, "createRoleTemplateVersionOptions") if err != nil { - err = core.SDKErrorf(err, "", "error_message-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// ActionControlAssignmentResourceCreated : On success, it includes the action control assigned. -type ActionControlAssignmentResourceCreated struct { - // action control id. - ID *string `json:"id,omitempty"` -} + pathParamsMap := map[string]string{ + "role_template_id": *createRoleTemplateVersionOptions.RoleTemplateID, + } -// UnmarshalActionControlAssignmentResourceCreated unmarshals an instance of ActionControlAssignmentResourceCreated from the specified map of raw messages. -func UnmarshalActionControlAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignmentResourceCreated) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + builder := core.NewRequestBuilder(core.POST) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// ActionControlAssignmentTemplate : The action control template id and version that will be assigned. -type ActionControlAssignmentTemplate struct { - // Action control template ID. - ID *string `json:"id" validate:"required"` + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "CreateRoleTemplateVersion") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } - // Action control template version. - Version *string `json:"version" validate:"required"` -} + for headerName, headerValue := range createRoleTemplateVersionOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") -// NewActionControlAssignmentTemplate : Instantiate ActionControlAssignmentTemplate (Generic Model Constructor) -func (*IamPolicyManagementV1) NewActionControlAssignmentTemplate(id string, version string) (_model *ActionControlAssignmentTemplate, err error) { - _model = &ActionControlAssignmentTemplate{ - ID: core.StringPtr(id), - Version: core.StringPtr(version), + body := make(map[string]interface{}) + if createRoleTemplateVersionOptions.Name != nil { + body["name"] = createRoleTemplateVersionOptions.Name } - err = core.ValidateStruct(_model, "required parameters") + if createRoleTemplateVersionOptions.Description != nil { + body["description"] = createRoleTemplateVersionOptions.Description + } + if createRoleTemplateVersionOptions.Role != nil { + body["role"] = createRoleTemplateVersionOptions.Role + } + if createRoleTemplateVersionOptions.Committed != nil { + body["committed"] = createRoleTemplateVersionOptions.Committed + } + _, err = builder.SetBodyContentJSON(body) if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) + return } - return -} -// UnmarshalActionControlAssignmentTemplate unmarshals an instance of ActionControlAssignmentTemplate from the specified map of raw messages. -func UnmarshalActionControlAssignmentTemplate(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlAssignmentTemplate) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "version", &obj.Version) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "create_role_template_version", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// ActionControlTemplate : The set of properties associated with the action control template. -type ActionControlTemplate struct { - // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes - // the name value for all existing versions of the template. - Name *string `json:"name" validate:"required"` - - // Description of the action control template. This is shown to users in the enterprise account. Use this to describe - // the purpose or context of the action control for enterprise users managing IAM templates. - Description *string `json:"description" validate:"required"` - - // Enterprise account ID where this template is created. - AccountID *string `json:"account_id" validate:"required"` - - // Committed status of the template. If committed is set to true, then the template version can no longer be updated. - Committed *bool `json:"committed,omitempty"` - - // The action control properties that are created in an action resource when the template is assigned. - ActionControl *TemplateActionControl `json:"action_control,omitempty"` - - // The action control template ID. - ID *string `json:"id,omitempty"` - - // The href URL that links to the action control templates API by action control template ID. - Href *string `json:"href,omitempty"` - - // The UTC timestamp when the action control template was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - - // The IAM ID of the entity that created the action control template. - CreatedByID *string `json:"created_by_id,omitempty"` - - // The UTC timestamp when the action control template was last modified. - LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` - - // The IAM ID of the entity that last modified the action control template. - LastModifiedByID *string `json:"last_modified_by_id,omitempty"` - - // The version number of the template used to identify different versions of same template. - Version *string `json:"version" validate:"required"` - - // State of action control template. - State *string `json:"state" validate:"required"` +// ListRoleTemplateVersions : Retrieve role template versions +// Retrieve the versions of a role template by providing a role template ID. +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleTemplateVersions(listRoleTemplateVersionsOptions *ListRoleTemplateVersionsOptions) (result *RoleTemplateVersionsCollection, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.ListRoleTemplateVersionsWithContext(context.Background(), listRoleTemplateVersionsOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// Constants associated with the ActionControlTemplate.State property. -// State of action control template. -const ( - ActionControlTemplateStateActiveConst = "active" - ActionControlTemplateStateDeletedConst = "deleted" -) - -// UnmarshalActionControlTemplate unmarshals an instance of ActionControlTemplate from the specified map of raw messages. -func UnmarshalActionControlTemplate(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlTemplate) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) +// ListRoleTemplateVersionsWithContext is an alternate form of the ListRoleTemplateVersions method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleTemplateVersionsWithContext(ctx context.Context, listRoleTemplateVersionsOptions *ListRoleTemplateVersionsOptions) (result *RoleTemplateVersionsCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listRoleTemplateVersionsOptions, "listRoleTemplateVersionsOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "description", &obj.Description) + err = core.ValidateStruct(listRoleTemplateVersionsOptions, "listRoleTemplateVersionsOptions") if err != nil { - err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) - if err != nil { - err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) - return + + pathParamsMap := map[string]string{ + "role_template_id": *listRoleTemplateVersionsOptions.RoleTemplateID, } - err = core.UnmarshalPrimitive(m, "committed", &obj.Committed) + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "committed-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "action_control", &obj.ActionControl, UnmarshalTemplateActionControl) - if err != nil { - err = core.SDKErrorf(err, "", "action_control-error", common.GetComponentInfo()) - return + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "ListRoleTemplateVersions") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return + + for headerName, headerValue := range listRoleTemplateVersionsOptions.Headers { + builder.AddHeader(headerName, headerValue) } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return + builder.AddHeader("Accept", "application/json") + + if listRoleTemplateVersionsOptions.State != nil { + builder.AddQuery("state", fmt.Sprint(*listRoleTemplateVersionsOptions.State)) } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return + if listRoleTemplateVersionsOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listRoleTemplateVersionsOptions.Limit)) } - err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) - if err != nil { - err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) - return + if listRoleTemplateVersionsOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listRoleTemplateVersionsOptions.Start)) } - err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "list_role_template_versions", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "version", &obj.Version) - if err != nil { - err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "state", &obj.State) - if err != nil { - err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) - return + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplateVersionsCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// ActionControlTemplateCollection : A collection of action control templates. -type ActionControlTemplateCollection struct { - // The number of documents to include per each page of the collection. - Limit *int64 `json:"limit,omitempty"` - - // Details with linking href to first page of requested collection. - First *First `json:"first,omitempty"` - - // Details with href linking to the following page of requested collection. - Next *Next `json:"next,omitempty"` - - // Details with linking href to previous page of requested collection. - Previous *Previous `json:"previous,omitempty"` - - // List of action control templates. - ActionControlTemplates []ActionControlTemplate `json:"action_control_templates" validate:"required"` +// ReplaceRoleTemplate : Update a role template version +// Update a specific version of a role template. You can use this only if the version isn't committed. +func (iamPolicyManagement *IamPolicyManagementV1) ReplaceRoleTemplate(replaceRoleTemplateOptions *ReplaceRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.ReplaceRoleTemplateWithContext(context.Background(), replaceRoleTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalActionControlTemplateCollection unmarshals an instance of ActionControlTemplateCollection from the specified map of raw messages. -func UnmarshalActionControlTemplateCollection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlTemplateCollection) - err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) +// ReplaceRoleTemplateWithContext is an alternate form of the ReplaceRoleTemplate method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) ReplaceRoleTemplateWithContext(ctx context.Context, replaceRoleTemplateOptions *ReplaceRoleTemplateOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(replaceRoleTemplateOptions, "replaceRoleTemplateOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + err = core.ValidateStruct(replaceRoleTemplateOptions, "replaceRoleTemplateOptions") if err != nil { - err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + + pathParamsMap := map[string]string{ + "role_template_id": *replaceRoleTemplateOptions.RoleTemplateID, + "version": *replaceRoleTemplateOptions.Version, + } + + builder := core.NewRequestBuilder(core.PUT) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions/{version}`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "ReplaceRoleTemplate") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range replaceRoleTemplateOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + if replaceRoleTemplateOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*replaceRoleTemplateOptions.IfMatch)) + } + + body := make(map[string]interface{}) + if replaceRoleTemplateOptions.Name != nil { + body["name"] = replaceRoleTemplateOptions.Name + } + if replaceRoleTemplateOptions.Description != nil { + body["description"] = replaceRoleTemplateOptions.Description + } + if replaceRoleTemplateOptions.Role != nil { + body["role"] = replaceRoleTemplateOptions.Role + } + if replaceRoleTemplateOptions.Committed != nil { + body["committed"] = replaceRoleTemplateOptions.Committed + } + _, err = builder.SetBodyContentJSON(body) if err != nil { - err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "action_control_templates", &obj.ActionControlTemplates, UnmarshalActionControlTemplate) + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "action_control_templates-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// Retrieve the value to be passed to a request to access the next page of results -func (resp *ActionControlTemplateCollection) GetNextStart() (*string, error) { - if core.IsNil(resp.Next) { - return nil, nil + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "replace_role_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result } - return resp.Next.Start, nil -} - -// ActionControlTemplateVersionsCollection : A collection of versions for a specific action control template. -type ActionControlTemplateVersionsCollection struct { - // The number of documents to include per each page of the collection. - Limit *int64 `json:"limit,omitempty"` - - // Details with linking href to first page of requested collection. - First *First `json:"first,omitempty"` - - // Details with href linking to the following page of requested collection. - Next *Next `json:"next,omitempty"` - // Details with linking href to previous page of requested collection. - Previous *Previous `json:"previous,omitempty"` + return +} - // List of action control templates versions. - Versions []ActionControlTemplate `json:"versions" validate:"required"` +// DeleteRoleTemplateVersion : Delete a role template version +// Delete a specific version of a role template by providing a role template ID and version number. You can't delete a +// role template version that is assigned to one or more child accounts. You must remove the role assignments first. +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleTemplateVersion(deleteRoleTemplateVersionOptions *DeleteRoleTemplateVersionOptions) (response *core.DetailedResponse, err error) { + response, err = iamPolicyManagement.DeleteRoleTemplateVersionWithContext(context.Background(), deleteRoleTemplateVersionOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalActionControlTemplateVersionsCollection unmarshals an instance of ActionControlTemplateVersionsCollection from the specified map of raw messages. -func UnmarshalActionControlTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ActionControlTemplateVersionsCollection) - err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) +// DeleteRoleTemplateVersionWithContext is an alternate form of the DeleteRoleTemplateVersion method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleTemplateVersionWithContext(ctx context.Context, deleteRoleTemplateVersionOptions *DeleteRoleTemplateVersionOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteRoleTemplateVersionOptions, "deleteRoleTemplateVersionOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + err = core.ValidateStruct(deleteRoleTemplateVersionOptions, "deleteRoleTemplateVersionOptions") if err != nil { - err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) - if err != nil { - err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) - return + + pathParamsMap := map[string]string{ + "role_template_id": *deleteRoleTemplateVersionOptions.RoleTemplateID, + "version": *deleteRoleTemplateVersionOptions.Version, } - err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions/{version}`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "versions", &obj.Versions, UnmarshalActionControlTemplate) - if err != nil { - err = core.SDKErrorf(err, "", "versions-error", common.GetComponentInfo()) - return + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "DeleteRoleTemplateVersion") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// Retrieve the value to be passed to a request to access the next page of results -func (resp *ActionControlTemplateVersionsCollection) GetNextStart() (*string, error) { - if core.IsNil(resp.Next) { - return nil, nil + for headerName, headerValue := range deleteRoleTemplateVersionOptions.Headers { + builder.AddHeader(headerName, headerValue) } - return resp.Next.Start, nil -} -// AssignmentResourceCreated : On success, includes the policy that is assigned. -type AssignmentResourceCreated struct { - // Policy id. - ID *string `json:"id,omitempty"` -} + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } -// UnmarshalAssignmentResourceCreated unmarshals an instance of AssignmentResourceCreated from the specified map of raw messages. -func UnmarshalAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AssignmentResourceCreated) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + response, err = iamPolicyManagement.Service.Request(request, nil) if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "delete_role_template_version", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// AssignmentResourceError : Body parameters for assignment error. -type AssignmentResourceError struct { - // Name of the error. - Name *string `json:"name,omitempty"` - - // error code. - ErrorCode *string `json:"errorCode,omitempty"` - - // Error message detailing the nature of the error. - Message *string `json:"message,omitempty"` - - // Internal status code for the error. - Code *string `json:"code,omitempty"` - - // The errors encountered during the response. - Errors []ErrorObject `json:"errors,omitempty"` +// GetRoleTemplateVersion : Retrieve a role template version +// Retrieve a role template by providing a role template ID and version number. +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleTemplateVersion(getRoleTemplateVersionOptions *GetRoleTemplateVersionOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.GetRoleTemplateVersionWithContext(context.Background(), getRoleTemplateVersionOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// UnmarshalAssignmentResourceError unmarshals an instance of AssignmentResourceError from the specified map of raw messages. -func UnmarshalAssignmentResourceError(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AssignmentResourceError) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) +// GetRoleTemplateVersionWithContext is an alternate form of the GetRoleTemplateVersion method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleTemplateVersionWithContext(ctx context.Context, getRoleTemplateVersionOptions *GetRoleTemplateVersionOptions) (result *RoleTemplate, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getRoleTemplateVersionOptions, "getRoleTemplateVersionOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "errorCode", &obj.ErrorCode) + err = core.ValidateStruct(getRoleTemplateVersionOptions, "getRoleTemplateVersionOptions") if err != nil { - err = core.SDKErrorf(err, "", "errorCode-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "message", &obj.Message) + + pathParamsMap := map[string]string{ + "role_template_id": *getRoleTemplateVersionOptions.RoleTemplateID, + "version": *getRoleTemplateVersionOptions.Version, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions/{version}`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "code", &obj.Code) + + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "GetRoleTemplateVersion") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range getRoleTemplateVersionOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "errors", &obj.Errors, UnmarshalErrorObject) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "errors-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "get_role_template_version", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// AssignmentTargetDetails : assignment target account and type. -type AssignmentTargetDetails struct { - // Assignment target type. - Type *string `json:"type" validate:"required"` - - // ID of the target account. - ID *string `json:"id" validate:"required"` +// CommitRoleTemplate : Commit a role template version +// Commit a role template version. You cannot make any further changes to the role template once it's committed. If you +// have to make updates after committing a version, create a new version. +func (iamPolicyManagement *IamPolicyManagementV1) CommitRoleTemplate(commitRoleTemplateOptions *CommitRoleTemplateOptions) (response *core.DetailedResponse, err error) { + response, err = iamPolicyManagement.CommitRoleTemplateWithContext(context.Background(), commitRoleTemplateOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// Constants associated with the AssignmentTargetDetails.Type property. -// Assignment target type. -const ( - AssignmentTargetDetailsTypeAccountConst = "Account" -) - -// NewAssignmentTargetDetails : Instantiate AssignmentTargetDetails (Generic Model Constructor) -func (*IamPolicyManagementV1) NewAssignmentTargetDetails(typeVar string, id string) (_model *AssignmentTargetDetails, err error) { - _model = &AssignmentTargetDetails{ - Type: core.StringPtr(typeVar), - ID: core.StringPtr(id), - } - err = core.ValidateStruct(_model, "required parameters") +// CommitRoleTemplateWithContext is an alternate form of the CommitRoleTemplate method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) CommitRoleTemplateWithContext(ctx context.Context, commitRoleTemplateOptions *CommitRoleTemplateOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(commitRoleTemplateOptions, "commitRoleTemplateOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return } - return -} - -// UnmarshalAssignmentTargetDetails unmarshals an instance of AssignmentTargetDetails from the specified map of raw messages. -func UnmarshalAssignmentTargetDetails(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AssignmentTargetDetails) - err = core.UnmarshalPrimitive(m, "type", &obj.Type) + err = core.ValidateStruct(commitRoleTemplateOptions, "commitRoleTemplateOptions") if err != nil { - err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + + pathParamsMap := map[string]string{ + "role_template_id": *commitRoleTemplateOptions.RoleTemplateID, + "version": *commitRoleTemplateOptions.Version, + } + + builder := core.NewRequestBuilder(core.POST) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_templates/{role_template_id}/versions/{version}/commit`, pathParamsMap) if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// AssignmentTemplateDetails : policy template details. -type AssignmentTemplateDetails struct { - // Policy template ID. - ID *string `json:"id,omitempty"` + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "CommitRoleTemplate") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } - // Policy template version. - Version *string `json:"version,omitempty"` -} + for headerName, headerValue := range commitRoleTemplateOptions.Headers { + builder.AddHeader(headerName, headerValue) + } -// UnmarshalAssignmentTemplateDetails unmarshals an instance of AssignmentTemplateDetails from the specified map of raw messages. -func UnmarshalAssignmentTemplateDetails(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AssignmentTemplateDetails) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "version", &obj.Version) + + response, err = iamPolicyManagement.Service.Request(request, nil) if err != nil { - err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "commit_role_template", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// CommitActionControlTemplateOptions : The CommitActionControlTemplate options. -type CommitActionControlTemplateOptions struct { - // Action control template ID. - ActionControlTemplateID *string `json:"action_control_template_id" validate:"required,ne="` - - // The action control template version. - Version *string `json:"version" validate:"required,ne="` - - // Allows users to set headers on API requests. - Headers map[string]string +// ListRoleAssignments : Get role template assignments +// Get role template assignments by attributes. The following attributes are supported: +// `account_id`, `template_id`, `template_version`, `target`, `target_type`, `limit`, `start`. +// `account_id` is a required query parameter. Only role template assignments with the specified attributes and +// accessible by the caller are returned. If the caller does not have read access to any role template assignments, an +// empty array is returned. +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleAssignments(listRoleAssignmentsOptions *ListRoleAssignmentsOptions) (result *RoleAssignmentCollection, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.ListRoleAssignmentsWithContext(context.Background(), listRoleAssignmentsOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// NewCommitActionControlTemplateOptions : Instantiate CommitActionControlTemplateOptions -func (*IamPolicyManagementV1) NewCommitActionControlTemplateOptions(actionControlTemplateID string, version string) *CommitActionControlTemplateOptions { - return &CommitActionControlTemplateOptions{ - ActionControlTemplateID: core.StringPtr(actionControlTemplateID), - Version: core.StringPtr(version), +// ListRoleAssignmentsWithContext is an alternate form of the ListRoleAssignments method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) ListRoleAssignmentsWithContext(ctx context.Context, listRoleAssignmentsOptions *ListRoleAssignmentsOptions) (result *RoleAssignmentCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listRoleAssignmentsOptions, "listRoleAssignmentsOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(listRoleAssignmentsOptions, "listRoleAssignmentsOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return } -} - -// SetActionControlTemplateID : Allow user to set ActionControlTemplateID -func (_options *CommitActionControlTemplateOptions) SetActionControlTemplateID(actionControlTemplateID string) *CommitActionControlTemplateOptions { - _options.ActionControlTemplateID = core.StringPtr(actionControlTemplateID) - return _options -} -// SetVersion : Allow user to set Version -func (_options *CommitActionControlTemplateOptions) SetVersion(version string) *CommitActionControlTemplateOptions { - _options.Version = core.StringPtr(version) - return _options -} + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_assignments`, nil) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } -// SetHeaders : Allow user to set Headers -func (options *CommitActionControlTemplateOptions) SetHeaders(param map[string]string) *CommitActionControlTemplateOptions { - options.Headers = param - return options -} + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "ListRoleAssignments") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } -// CommitPolicyTemplateOptions : The CommitPolicyTemplate options. -type CommitPolicyTemplateOptions struct { - // The policy template ID. - PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="` + for headerName, headerValue := range listRoleAssignmentsOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + if listRoleAssignmentsOptions.AcceptLanguage != nil { + builder.AddHeader("Accept-Language", fmt.Sprint(*listRoleAssignmentsOptions.AcceptLanguage)) + } - // The policy template version. - Version *string `json:"version" validate:"required,ne="` + builder.AddQuery("account_id", fmt.Sprint(*listRoleAssignmentsOptions.AccountID)) + if listRoleAssignmentsOptions.TemplateID != nil { + builder.AddQuery("template_id", fmt.Sprint(*listRoleAssignmentsOptions.TemplateID)) + } + if listRoleAssignmentsOptions.TemplateVersion != nil { + builder.AddQuery("template_version", fmt.Sprint(*listRoleAssignmentsOptions.TemplateVersion)) + } + if listRoleAssignmentsOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listRoleAssignmentsOptions.Limit)) + } + if listRoleAssignmentsOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listRoleAssignmentsOptions.Start)) + } - // Allows users to set headers on API requests. - Headers map[string]string -} + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } -// NewCommitPolicyTemplateOptions : Instantiate CommitPolicyTemplateOptions -func (*IamPolicyManagementV1) NewCommitPolicyTemplateOptions(policyTemplateID string, version string) *CommitPolicyTemplateOptions { - return &CommitPolicyTemplateOptions{ - PolicyTemplateID: core.StringPtr(policyTemplateID), - Version: core.StringPtr(version), + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "list_role_assignments", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleAssignmentCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result } -} -// SetPolicyTemplateID : Allow user to set PolicyTemplateID -func (_options *CommitPolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *CommitPolicyTemplateOptions { - _options.PolicyTemplateID = core.StringPtr(policyTemplateID) - return _options + return } -// SetVersion : Allow user to set Version -func (_options *CommitPolicyTemplateOptions) SetVersion(version string) *CommitPolicyTemplateOptions { - _options.Version = core.StringPtr(version) - return _options +// CreateRoleTemplateAssignment : Create a role template assignment +// Assign a role template to child accounts and account groups. This creates the role in the accounts and account groups +// that you specify. +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplateAssignment(createRoleTemplateAssignmentOptions *CreateRoleTemplateAssignmentOptions) (result *RoleAssignmentCollection, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.CreateRoleTemplateAssignmentWithContext(context.Background(), createRoleTemplateAssignmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// SetHeaders : Allow user to set Headers -func (options *CommitPolicyTemplateOptions) SetHeaders(param map[string]string) *CommitPolicyTemplateOptions { - options.Headers = param - return options -} +// CreateRoleTemplateAssignmentWithContext is an alternate form of the CreateRoleTemplateAssignment method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) CreateRoleTemplateAssignmentWithContext(ctx context.Context, createRoleTemplateAssignmentOptions *CreateRoleTemplateAssignmentOptions) (result *RoleAssignmentCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createRoleTemplateAssignmentOptions, "createRoleTemplateAssignmentOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(createRoleTemplateAssignmentOptions, "createRoleTemplateAssignmentOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } -// ConflictsWith : Details of conflicting resource. -type ConflictsWith struct { - // The revision number of the resource. - Etag *string `json:"etag,omitempty"` + builder := core.NewRequestBuilder(core.POST) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_assignments`, nil) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } - // The conflicting role of ID. - Role *string `json:"role,omitempty"` + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "CreateRoleTemplateAssignment") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } - // The conflicting policy ID. - Policy *string `json:"policy,omitempty"` -} + for headerName, headerValue := range createRoleTemplateAssignmentOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + if createRoleTemplateAssignmentOptions.AcceptLanguage != nil { + builder.AddHeader("Accept-Language", fmt.Sprint(*createRoleTemplateAssignmentOptions.AcceptLanguage)) + } -// UnmarshalConflictsWith unmarshals an instance of ConflictsWith from the specified map of raw messages. -func UnmarshalConflictsWith(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ConflictsWith) - err = core.UnmarshalPrimitive(m, "etag", &obj.Etag) + body := make(map[string]interface{}) + if createRoleTemplateAssignmentOptions.Target != nil { + body["target"] = createRoleTemplateAssignmentOptions.Target + } + if createRoleTemplateAssignmentOptions.Templates != nil { + body["templates"] = createRoleTemplateAssignmentOptions.Templates + } + _, err = builder.SetBodyContentJSON(body) if err != nil { - err = core.SDKErrorf(err, "", "etag-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "role", &obj.Role) + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "role-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "policy", &obj.Policy) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) if err != nil { - err = core.SDKErrorf(err, "", "policy-error", common.GetComponentInfo()) + core.EnrichHTTPProblem(err, "create_role_template_assignment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleAssignmentCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// Control : Specifies the type of access that is granted by the policy. -type Control struct { - // Permission is granted by the policy. - Grant *Grant `json:"grant" validate:"required"` +// GetRoleAssignment : Retrieve a role assignment +// Retrieve a role template assignment by providing a role assignment ID. +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleAssignment(getRoleAssignmentOptions *GetRoleAssignmentOptions) (result *RoleAssignment, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.GetRoleAssignmentWithContext(context.Background(), getRoleAssignmentOptions) + err = core.RepurposeSDKProblem(err, "") + return } -// NewControl : Instantiate Control (Generic Model Constructor) -func (*IamPolicyManagementV1) NewControl(grant *Grant) (_model *Control, err error) { - _model = &Control{ - Grant: grant, - } - err = core.ValidateStruct(_model, "required parameters") +// GetRoleAssignmentWithContext is an alternate form of the GetRoleAssignment method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) GetRoleAssignmentWithContext(ctx context.Context, getRoleAssignmentOptions *GetRoleAssignmentOptions) (result *RoleAssignment, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getRoleAssignmentOptions, "getRoleAssignmentOptions cannot be nil") if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return } - return -} - -// UnmarshalControl unmarshals an instance of Control from the specified map of raw messages. -func UnmarshalControl(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(Control) - err = core.UnmarshalModel(m, "grant", &obj.Grant, UnmarshalGrant) + err = core.ValidateStruct(getRoleAssignmentOptions, "getRoleAssignmentOptions") if err != nil { - err = core.SDKErrorf(err, "", "grant-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} -// ControlResponse : ControlResponse struct -// Models which "extend" this model: -// - ControlResponseControl -// - ControlResponseControlWithEnrichedRoles -type ControlResponse struct { - // Permission is granted by the policy. - Grant *Grant `json:"grant,omitempty"` -} -func (*ControlResponse) isaControlResponse() bool { - return true -} + pathParamsMap := map[string]string{ + "assignment_id": *getRoleAssignmentOptions.AssignmentID, + } -type ControlResponseIntf interface { - isaControlResponse() bool -} + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_assignments/{assignment_id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } -// UnmarshalControlResponse unmarshals an instance of ControlResponse from the specified map of raw messages. -func UnmarshalControlResponse(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ControlResponse) - err = core.UnmarshalModel(m, "grant", &obj.Grant, UnmarshalGrant) + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "GetRoleAssignment") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range getRoleAssignmentOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + request, err := builder.Build() if err != nil { - err = core.SDKErrorf(err, "", "grant-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "get_role_assignment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleAssignment) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + return } -// CreateActionControlTemplateAssignmentOptions : The CreateActionControlTemplateAssignment options. -type CreateActionControlTemplateAssignmentOptions struct { - // assignment target account and type. - Target *AssignmentTargetDetails `json:"target" validate:"required"` +// UpdateRoleAssignment : Update a role assignment +// Update a role assignment by providing a role assignment ID. +func (iamPolicyManagement *IamPolicyManagementV1) UpdateRoleAssignment(updateRoleAssignmentOptions *UpdateRoleAssignmentOptions) (result *RoleAssignment, response *core.DetailedResponse, err error) { + result, response, err = iamPolicyManagement.UpdateRoleAssignmentWithContext(context.Background(), updateRoleAssignmentOptions) + err = core.RepurposeSDKProblem(err, "") + return +} - // List of action control template details for action control assignment. - Templates []ActionControlAssignmentTemplate `json:"templates" validate:"required"` +// UpdateRoleAssignmentWithContext is an alternate form of the UpdateRoleAssignment method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) UpdateRoleAssignmentWithContext(ctx context.Context, updateRoleAssignmentOptions *UpdateRoleAssignmentOptions) (result *RoleAssignment, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(updateRoleAssignmentOptions, "updateRoleAssignmentOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(updateRoleAssignmentOptions, "updateRoleAssignmentOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } - // Language code for translations - // * `default` - English - // * `de` - German (Standard) - // * `en` - English - // * `es` - Spanish (Spain) - // * `fr` - French (Standard) - // * `it` - Italian (Standard) - // * `ja` - Japanese - // * `ko` - Korean - // * `pt-br` - Portuguese (Brazil) - // * `zh-cn` - Chinese (Simplified, PRC) - // * `zh-tw` - (Chinese, Taiwan). - AcceptLanguage *string `json:"Accept-Language,omitempty"` + pathParamsMap := map[string]string{ + "assignment_id": *updateRoleAssignmentOptions.AssignmentID, + } - // Allows users to set headers on API requests. - Headers map[string]string -} + builder := core.NewRequestBuilder(core.PATCH) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_assignments/{assignment_id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } -// NewCreateActionControlTemplateAssignmentOptions : Instantiate CreateActionControlTemplateAssignmentOptions -func (*IamPolicyManagementV1) NewCreateActionControlTemplateAssignmentOptions(target *AssignmentTargetDetails, templates []ActionControlAssignmentTemplate) *CreateActionControlTemplateAssignmentOptions { - return &CreateActionControlTemplateAssignmentOptions{ - Target: target, - Templates: templates, + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "UpdateRoleAssignment") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) } -} -// SetTarget : Allow user to set Target -func (_options *CreateActionControlTemplateAssignmentOptions) SetTarget(target *AssignmentTargetDetails) *CreateActionControlTemplateAssignmentOptions { - _options.Target = target - return _options -} + for headerName, headerValue := range updateRoleAssignmentOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + if updateRoleAssignmentOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*updateRoleAssignmentOptions.IfMatch)) + } -// SetTemplates : Allow user to set Templates -func (_options *CreateActionControlTemplateAssignmentOptions) SetTemplates(templates []ActionControlAssignmentTemplate) *CreateActionControlTemplateAssignmentOptions { - _options.Templates = templates - return _options -} + body := make(map[string]interface{}) + if updateRoleAssignmentOptions.TemplateVersion != nil { + body["template_version"] = updateRoleAssignmentOptions.TemplateVersion + } + _, err = builder.SetBodyContentJSON(body) + if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) + return + } -// SetAcceptLanguage : Allow user to set AcceptLanguage -func (_options *CreateActionControlTemplateAssignmentOptions) SetAcceptLanguage(acceptLanguage string) *CreateActionControlTemplateAssignmentOptions { - _options.AcceptLanguage = core.StringPtr(acceptLanguage) - return _options -} + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } -// SetHeaders : Allow user to set Headers -func (options *CreateActionControlTemplateAssignmentOptions) SetHeaders(param map[string]string) *CreateActionControlTemplateAssignmentOptions { - options.Headers = param - return options + var rawResponse map[string]json.RawMessage + response, err = iamPolicyManagement.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "update_role_assignment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoleAssignment) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return } -// CreateActionControlTemplateOptions : The CreateActionControlTemplate options. -type CreateActionControlTemplateOptions struct { - // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes - // the name value for all existing versions of the template. - Name *string `json:"name" validate:"required"` +// DeleteRoleAssignment : Remove a role assignment +// Remove a role template assignment by providing a role assignment ID. You can't delete a role assignment if the status +// is "in_progress". +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleAssignment(deleteRoleAssignmentOptions *DeleteRoleAssignmentOptions) (response *core.DetailedResponse, err error) { + response, err = iamPolicyManagement.DeleteRoleAssignmentWithContext(context.Background(), deleteRoleAssignmentOptions) + err = core.RepurposeSDKProblem(err, "") + return +} - // Enterprise account ID where this template is created. - AccountID *string `json:"account_id" validate:"required"` +// DeleteRoleAssignmentWithContext is an alternate form of the DeleteRoleAssignment method which supports a Context parameter +func (iamPolicyManagement *IamPolicyManagementV1) DeleteRoleAssignmentWithContext(ctx context.Context, deleteRoleAssignmentOptions *DeleteRoleAssignmentOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteRoleAssignmentOptions, "deleteRoleAssignmentOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(deleteRoleAssignmentOptions, "deleteRoleAssignmentOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } - // Description of the action control template. This is shown to users in the enterprise account. Use this to describe - // the purpose or context of the action control for enterprise users managing IAM templates. - Description *string `json:"description,omitempty"` + pathParamsMap := map[string]string{ + "assignment_id": *deleteRoleAssignmentOptions.AssignmentID, + } - // Committed status of the template. If committed is set to true, then the template version can no longer be updated. - Committed *bool `json:"committed,omitempty"` + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = iamPolicyManagement.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(iamPolicyManagement.Service.Options.URL, `/v1/role_assignments/{assignment_id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } - // The action control properties that are created in an action resource when the template is assigned. - ActionControl *TemplateActionControl `json:"action_control,omitempty"` + sdkHeaders := common.GetSdkHeaders("iam_policy_management", "V1", "DeleteRoleAssignment") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } - // Language code for translations - // * `default` - English - // * `de` - German (Standard) - // * `en` - English - // * `es` - Spanish (Spain) - // * `fr` - French (Standard) - // * `it` - Italian (Standard) - // * `ja` - Japanese - // * `ko` - Korean - // * `pt-br` - Portuguese (Brazil) - // * `zh-cn` - Chinese (Simplified, PRC) - // * `zh-tw` - (Chinese, Taiwan). - AcceptLanguage *string `json:"Accept-Language,omitempty"` + for headerName, headerValue := range deleteRoleAssignmentOptions.Headers { + builder.AddHeader(headerName, headerValue) + } - // Allows users to set headers on API requests. - Headers map[string]string -} + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } -// NewCreateActionControlTemplateOptions : Instantiate CreateActionControlTemplateOptions -func (*IamPolicyManagementV1) NewCreateActionControlTemplateOptions(name string, accountID string) *CreateActionControlTemplateOptions { - return &CreateActionControlTemplateOptions{ - Name: core.StringPtr(name), - AccountID: core.StringPtr(accountID), + response, err = iamPolicyManagement.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_role_assignment", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return } -} -// SetName : Allow user to set Name -func (_options *CreateActionControlTemplateOptions) SetName(name string) *CreateActionControlTemplateOptions { - _options.Name = core.StringPtr(name) - return _options + return +} +func getServiceComponentInfo() *core.ProblemComponent { + return core.NewProblemComponent(DefaultServiceName, "1.0.1") } -// SetAccountID : Allow user to set AccountID -func (_options *CreateActionControlTemplateOptions) SetAccountID(accountID string) *CreateActionControlTemplateOptions { - _options.AccountID = core.StringPtr(accountID) - return _options +// AccountSettingsAccessManagement : The Access Management Account Settings that are currently set for the requested account. +type AccountSettingsAccessManagement struct { + // How external accounts can interact in relation to the requested account. + ExternalAccountIdentityInteraction *ExternalAccountIdentityInteraction `json:"external_account_identity_interaction" validate:"required"` } -// SetDescription : Allow user to set Description -func (_options *CreateActionControlTemplateOptions) SetDescription(description string) *CreateActionControlTemplateOptions { - _options.Description = core.StringPtr(description) - return _options +// UnmarshalAccountSettingsAccessManagement unmarshals an instance of AccountSettingsAccessManagement from the specified map of raw messages. +func UnmarshalAccountSettingsAccessManagement(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AccountSettingsAccessManagement) + err = core.UnmarshalModel(m, "external_account_identity_interaction", &obj.ExternalAccountIdentityInteraction, UnmarshalExternalAccountIdentityInteraction) + if err != nil { + err = core.SDKErrorf(err, "", "external_account_identity_interaction-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetCommitted : Allow user to set Committed -func (_options *CreateActionControlTemplateOptions) SetCommitted(committed bool) *CreateActionControlTemplateOptions { - _options.Committed = core.BoolPtr(committed) +// ActionControlAssignment : The set of properties associated with the assigned action control template. +type ActionControlAssignment struct { + // Action control assignment ID. + ID *string `json:"id,omitempty"` + + // The account GUID that the action control assignments belong to. + AccountID *string `json:"account_id,omitempty"` + + // The href URL that links to the action control assignments API by action control assignment ID. + Href *string `json:"href,omitempty"` + + // The UTC timestamp when the action control assignment was created. + CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` + + // The IAM ID of the entity that created the action control assignment. + CreatedByID *string `json:"created_by_id,omitempty"` + + // The UTC timestamp when the action control assignment was last modified. + LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` + + // The IAM ID of the entity that last modified the action control assignment. + LastModifiedByID *string `json:"last_modified_by_id,omitempty"` + + // The current operation of the action control assignment. + Operation *string `json:"operation,omitempty"` + + // Resources created when action control template is assigned. + Resources []ActionControlAssignmentResource `json:"resources,omitempty"` + + // The action control template id and version that will be assigned. + Template *ActionControlAssignmentTemplate `json:"template" validate:"required"` + + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` + + // The action control assignment status. + Status *string `json:"status,omitempty"` +} + +// Constants associated with the ActionControlAssignment.Operation property. +// The current operation of the action control assignment. +const ( + ActionControlAssignmentOperationApplyConst = "apply" + ActionControlAssignmentOperationCreateConst = "create" + ActionControlAssignmentOperationRemoveConst = "remove" + ActionControlAssignmentOperationUpdateConst = "update" +) + +// Constants associated with the ActionControlAssignment.Status property. +// The action control assignment status. +const ( + ActionControlAssignmentStatusAcceptedConst = "accepted" + ActionControlAssignmentStatusFailureConst = "failure" + ActionControlAssignmentStatusInProgressConst = "in_progress" + ActionControlAssignmentStatusSupersededConst = "superseded" +) + +// UnmarshalActionControlAssignment unmarshals an instance of ActionControlAssignment from the specified map of raw messages. +func UnmarshalActionControlAssignment(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignment) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) + if err != nil { + err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) + if err != nil { + err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "operation", &obj.Operation) + if err != nil { + err = core.SDKErrorf(err, "", "operation-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalActionControlAssignmentResource) + if err != nil { + err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalActionControlAssignmentTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlAssignmentCollection : A collection of action control assignments. +type ActionControlAssignmentCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` + + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` + + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of action control assignments. + Assignments []ActionControlAssignment `json:"assignments" validate:"required"` +} + +// UnmarshalActionControlAssignmentCollection unmarshals an instance of ActionControlAssignmentCollection from the specified map of raw messages. +func UnmarshalActionControlAssignmentCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignmentCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "assignments", &obj.Assignments, UnmarshalActionControlAssignment) + if err != nil { + err = core.SDKErrorf(err, "", "assignments-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ActionControlAssignmentCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + +// ActionControlAssignmentResource : The action control assignment resources and target where the template is assigned. +type ActionControlAssignmentResource struct { + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` + + // Set of properties of the assigned resource or error message if assignment failed. + ActionControl *ActionControlAssignmentResourceActionControl `json:"action_control,omitempty"` +} + +// UnmarshalActionControlAssignmentResource unmarshals an instance of ActionControlAssignmentResource from the specified map of raw messages. +func UnmarshalActionControlAssignmentResource(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignmentResource) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "action_control", &obj.ActionControl, UnmarshalActionControlAssignmentResourceActionControl) + if err != nil { + err = core.SDKErrorf(err, "", "action_control-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlAssignmentResourceActionControl : Set of properties of the assigned resource or error message if assignment failed. +type ActionControlAssignmentResourceActionControl struct { + // On success, it includes the action control assigned. + ResourceCreated *ActionControlAssignmentResourceCreated `json:"resource_created,omitempty"` + + // Body parameters for assignment error. + ErrorMessage *AssignmentResourceError `json:"error_message,omitempty"` +} + +// UnmarshalActionControlAssignmentResourceActionControl unmarshals an instance of ActionControlAssignmentResourceActionControl from the specified map of raw messages. +func UnmarshalActionControlAssignmentResourceActionControl(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignmentResourceActionControl) + err = core.UnmarshalModel(m, "resource_created", &obj.ResourceCreated, UnmarshalActionControlAssignmentResourceCreated) + if err != nil { + err = core.SDKErrorf(err, "", "resource_created-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "error_message", &obj.ErrorMessage, UnmarshalAssignmentResourceError) + if err != nil { + err = core.SDKErrorf(err, "", "error_message-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlAssignmentResourceCreated : On success, it includes the action control assigned. +type ActionControlAssignmentResourceCreated struct { + // action control id. + ID *string `json:"id,omitempty"` +} + +// UnmarshalActionControlAssignmentResourceCreated unmarshals an instance of ActionControlAssignmentResourceCreated from the specified map of raw messages. +func UnmarshalActionControlAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignmentResourceCreated) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlAssignmentTemplate : The action control template id and version that will be assigned. +type ActionControlAssignmentTemplate struct { + // Action control template ID. + ID *string `json:"id" validate:"required"` + + // Action control template version. + Version *string `json:"version" validate:"required"` +} + +// NewActionControlAssignmentTemplate : Instantiate ActionControlAssignmentTemplate (Generic Model Constructor) +func (*IamPolicyManagementV1) NewActionControlAssignmentTemplate(id string, version string) (_model *ActionControlAssignmentTemplate, err error) { + _model = &ActionControlAssignmentTemplate{ + ID: core.StringPtr(id), + Version: core.StringPtr(version), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalActionControlAssignmentTemplate unmarshals an instance of ActionControlAssignmentTemplate from the specified map of raw messages. +func UnmarshalActionControlAssignmentTemplate(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlAssignmentTemplate) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "version", &obj.Version) + if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlTemplate : The set of properties associated with the action control template. +type ActionControlTemplate struct { + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes + // the name value for all existing versions of the template. + Name *string `json:"name" validate:"required"` + + // Description of the action control template. This is shown to users in the enterprise account. Use this to describe + // the purpose or context of the action control for enterprise users managing IAM templates. + Description *string `json:"description" validate:"required"` + + // Enterprise account ID where this template is created. + AccountID *string `json:"account_id" validate:"required"` + + // Committed status of the template. If committed is set to true, then the template version can no longer be updated. + Committed *bool `json:"committed,omitempty"` + + // The action control properties that are created in an action resource when the template is assigned. + ActionControl *TemplateActionControl `json:"action_control,omitempty"` + + // The action control template ID. + ID *string `json:"id,omitempty"` + + // The href URL that links to the action control templates API by action control template ID. + Href *string `json:"href,omitempty"` + + // The UTC timestamp when the action control template was created. + CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` + + // The IAM ID of the entity that created the action control template. + CreatedByID *string `json:"created_by_id,omitempty"` + + // The UTC timestamp when the action control template was last modified. + LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` + + // The IAM ID of the entity that last modified the action control template. + LastModifiedByID *string `json:"last_modified_by_id,omitempty"` + + // The version number of the template used to identify different versions of same template. + Version *string `json:"version" validate:"required"` + + // State of action control template. + State *string `json:"state" validate:"required"` +} + +// Constants associated with the ActionControlTemplate.State property. +// State of action control template. +const ( + ActionControlTemplateStateActiveConst = "active" + ActionControlTemplateStateDeletedConst = "deleted" +) + +// UnmarshalActionControlTemplate unmarshals an instance of ActionControlTemplate from the specified map of raw messages. +func UnmarshalActionControlTemplate(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlTemplate) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) + if err != nil { + err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "committed", &obj.Committed) + if err != nil { + err = core.SDKErrorf(err, "", "committed-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "action_control", &obj.ActionControl, UnmarshalTemplateActionControl) + if err != nil { + err = core.SDKErrorf(err, "", "action_control-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) + if err != nil { + err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "version", &obj.Version) + if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "state", &obj.State) + if err != nil { + err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ActionControlTemplateCollection : A collection of action control templates. +type ActionControlTemplateCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` + + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` + + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of action control templates. + ActionControlTemplates []ActionControlTemplate `json:"action_control_templates" validate:"required"` +} + +// UnmarshalActionControlTemplateCollection unmarshals an instance of ActionControlTemplateCollection from the specified map of raw messages. +func UnmarshalActionControlTemplateCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlTemplateCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "action_control_templates", &obj.ActionControlTemplates, UnmarshalActionControlTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "action_control_templates-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ActionControlTemplateCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + +// ActionControlTemplateVersionsCollection : A collection of versions for a specific action control template. +type ActionControlTemplateVersionsCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` + + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` + + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of action control templates versions. + Versions []ActionControlTemplate `json:"versions" validate:"required"` +} + +// UnmarshalActionControlTemplateVersionsCollection unmarshals an instance of ActionControlTemplateVersionsCollection from the specified map of raw messages. +func UnmarshalActionControlTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ActionControlTemplateVersionsCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "versions", &obj.Versions, UnmarshalActionControlTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "versions-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ActionControlTemplateVersionsCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + +// AssignmentResourceCreated : On success, includes the policy that is assigned. +type AssignmentResourceCreated struct { + // Policy id. + ID *string `json:"id,omitempty"` +} + +// UnmarshalAssignmentResourceCreated unmarshals an instance of AssignmentResourceCreated from the specified map of raw messages. +func UnmarshalAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AssignmentResourceCreated) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AssignmentResourceError : Body parameters for assignment error. +type AssignmentResourceError struct { + // Name of the error. + Name *string `json:"name,omitempty"` + + // error code. + ErrorCode *string `json:"errorCode,omitempty"` + + // Error message detailing the nature of the error. + Message *string `json:"message,omitempty"` + + // Internal status code for the error. + Code *string `json:"code,omitempty"` + + // The errors encountered during the response. + Errors []ErrorObject `json:"errors,omitempty"` +} + +// UnmarshalAssignmentResourceError unmarshals an instance of AssignmentResourceError from the specified map of raw messages. +func UnmarshalAssignmentResourceError(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AssignmentResourceError) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "errorCode", &obj.ErrorCode) + if err != nil { + err = core.SDKErrorf(err, "", "errorCode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "message", &obj.Message) + if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "errors", &obj.Errors, UnmarshalErrorObject) + if err != nil { + err = core.SDKErrorf(err, "", "errors-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AssignmentTargetDetails : assignment target account and type. +type AssignmentTargetDetails struct { + // Assignment target type. + Type *string `json:"type" validate:"required"` + + // ID of the target account. + ID *string `json:"id" validate:"required"` +} + +// Constants associated with the AssignmentTargetDetails.Type property. +// Assignment target type. +const ( + AssignmentTargetDetailsTypeAccountConst = "Account" +) + +// NewAssignmentTargetDetails : Instantiate AssignmentTargetDetails (Generic Model Constructor) +func (*IamPolicyManagementV1) NewAssignmentTargetDetails(typeVar string, id string) (_model *AssignmentTargetDetails, err error) { + _model = &AssignmentTargetDetails{ + Type: core.StringPtr(typeVar), + ID: core.StringPtr(id), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalAssignmentTargetDetails unmarshals an instance of AssignmentTargetDetails from the specified map of raw messages. +func UnmarshalAssignmentTargetDetails(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AssignmentTargetDetails) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AssignmentTemplateDetails : policy template details. +type AssignmentTemplateDetails struct { + // Policy template ID. + ID *string `json:"id,omitempty"` + + // Policy template version. + Version *string `json:"version,omitempty"` +} + +// UnmarshalAssignmentTemplateDetails unmarshals an instance of AssignmentTemplateDetails from the specified map of raw messages. +func UnmarshalAssignmentTemplateDetails(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AssignmentTemplateDetails) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "version", &obj.Version) + if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// CommitActionControlTemplateOptions : The CommitActionControlTemplate options. +type CommitActionControlTemplateOptions struct { + // Action control template ID. + ActionControlTemplateID *string `json:"action_control_template_id" validate:"required,ne="` + + // The action control template version. + Version *string `json:"version" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCommitActionControlTemplateOptions : Instantiate CommitActionControlTemplateOptions +func (*IamPolicyManagementV1) NewCommitActionControlTemplateOptions(actionControlTemplateID string, version string) *CommitActionControlTemplateOptions { + return &CommitActionControlTemplateOptions{ + ActionControlTemplateID: core.StringPtr(actionControlTemplateID), + Version: core.StringPtr(version), + } +} + +// SetActionControlTemplateID : Allow user to set ActionControlTemplateID +func (_options *CommitActionControlTemplateOptions) SetActionControlTemplateID(actionControlTemplateID string) *CommitActionControlTemplateOptions { + _options.ActionControlTemplateID = core.StringPtr(actionControlTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *CommitActionControlTemplateOptions) SetVersion(version string) *CommitActionControlTemplateOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CommitActionControlTemplateOptions) SetHeaders(param map[string]string) *CommitActionControlTemplateOptions { + options.Headers = param + return options +} + +// CommitPolicyTemplateOptions : The CommitPolicyTemplate options. +type CommitPolicyTemplateOptions struct { + // The policy template ID. + PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="` + + // The policy template version. + Version *string `json:"version" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCommitPolicyTemplateOptions : Instantiate CommitPolicyTemplateOptions +func (*IamPolicyManagementV1) NewCommitPolicyTemplateOptions(policyTemplateID string, version string) *CommitPolicyTemplateOptions { + return &CommitPolicyTemplateOptions{ + PolicyTemplateID: core.StringPtr(policyTemplateID), + Version: core.StringPtr(version), + } +} + +// SetPolicyTemplateID : Allow user to set PolicyTemplateID +func (_options *CommitPolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *CommitPolicyTemplateOptions { + _options.PolicyTemplateID = core.StringPtr(policyTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *CommitPolicyTemplateOptions) SetVersion(version string) *CommitPolicyTemplateOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CommitPolicyTemplateOptions) SetHeaders(param map[string]string) *CommitPolicyTemplateOptions { + options.Headers = param + return options +} + +// CommitRoleTemplateOptions : The CommitRoleTemplate options. +type CommitRoleTemplateOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // The role template version. + Version *string `json:"version" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCommitRoleTemplateOptions : Instantiate CommitRoleTemplateOptions +func (*IamPolicyManagementV1) NewCommitRoleTemplateOptions(roleTemplateID string, version string) *CommitRoleTemplateOptions { + return &CommitRoleTemplateOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + Version: core.StringPtr(version), + } +} + +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *CommitRoleTemplateOptions) SetRoleTemplateID(roleTemplateID string) *CommitRoleTemplateOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *CommitRoleTemplateOptions) SetVersion(version string) *CommitRoleTemplateOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CommitRoleTemplateOptions) SetHeaders(param map[string]string) *CommitRoleTemplateOptions { + options.Headers = param + return options +} + +// ConflictsWith : Details of conflicting resource. +type ConflictsWith struct { + // The revision number of the resource. + Etag *string `json:"etag,omitempty"` + + // The conflicting role of ID. + Role *string `json:"role,omitempty"` + + // The conflicting policy ID. + Policy *string `json:"policy,omitempty"` +} + +// UnmarshalConflictsWith unmarshals an instance of ConflictsWith from the specified map of raw messages. +func UnmarshalConflictsWith(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ConflictsWith) + err = core.UnmarshalPrimitive(m, "etag", &obj.Etag) + if err != nil { + err = core.SDKErrorf(err, "", "etag-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "role", &obj.Role) + if err != nil { + err = core.SDKErrorf(err, "", "role-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "policy", &obj.Policy) + if err != nil { + err = core.SDKErrorf(err, "", "policy-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Control : Specifies the type of access that is granted by the policy. +type Control struct { + // Permission is granted by the policy. + Grant *Grant `json:"grant" validate:"required"` +} + +// NewControl : Instantiate Control (Generic Model Constructor) +func (*IamPolicyManagementV1) NewControl(grant *Grant) (_model *Control, err error) { + _model = &Control{ + Grant: grant, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalControl unmarshals an instance of Control from the specified map of raw messages. +func UnmarshalControl(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(Control) + err = core.UnmarshalModel(m, "grant", &obj.Grant, UnmarshalGrant) + if err != nil { + err = core.SDKErrorf(err, "", "grant-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ControlResponse : ControlResponse struct +// Models which "extend" this model: +// - ControlResponseControl +// - ControlResponseControlWithEnrichedRoles +type ControlResponse struct { + // Permission is granted by the policy. + Grant *Grant `json:"grant,omitempty"` +} +func (*ControlResponse) isaControlResponse() bool { + return true +} + +type ControlResponseIntf interface { + isaControlResponse() bool +} + +// UnmarshalControlResponse unmarshals an instance of ControlResponse from the specified map of raw messages. +func UnmarshalControlResponse(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ControlResponse) + err = core.UnmarshalModel(m, "grant", &obj.Grant, UnmarshalGrant) + if err != nil { + err = core.SDKErrorf(err, "", "grant-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// CreateActionControlTemplateAssignmentOptions : The CreateActionControlTemplateAssignment options. +type CreateActionControlTemplateAssignmentOptions struct { + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` + + // List of action control template details for action control assignment. + Templates []ActionControlAssignmentTemplate `json:"templates" validate:"required"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateActionControlTemplateAssignmentOptions : Instantiate CreateActionControlTemplateAssignmentOptions +func (*IamPolicyManagementV1) NewCreateActionControlTemplateAssignmentOptions(target *AssignmentTargetDetails, templates []ActionControlAssignmentTemplate) *CreateActionControlTemplateAssignmentOptions { + return &CreateActionControlTemplateAssignmentOptions{ + Target: target, + Templates: templates, + } +} + +// SetTarget : Allow user to set Target +func (_options *CreateActionControlTemplateAssignmentOptions) SetTarget(target *AssignmentTargetDetails) *CreateActionControlTemplateAssignmentOptions { + _options.Target = target + return _options +} + +// SetTemplates : Allow user to set Templates +func (_options *CreateActionControlTemplateAssignmentOptions) SetTemplates(templates []ActionControlAssignmentTemplate) *CreateActionControlTemplateAssignmentOptions { + _options.Templates = templates + return _options +} + +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *CreateActionControlTemplateAssignmentOptions) SetAcceptLanguage(acceptLanguage string) *CreateActionControlTemplateAssignmentOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CreateActionControlTemplateAssignmentOptions) SetHeaders(param map[string]string) *CreateActionControlTemplateAssignmentOptions { + options.Headers = param + return options +} + +// CreateActionControlTemplateOptions : The CreateActionControlTemplate options. +type CreateActionControlTemplateOptions struct { + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes + // the name value for all existing versions of the template. + Name *string `json:"name" validate:"required"` + + // Enterprise account ID where this template is created. + AccountID *string `json:"account_id" validate:"required"` + + // Description of the action control template. This is shown to users in the enterprise account. Use this to describe + // the purpose or context of the action control for enterprise users managing IAM templates. + Description *string `json:"description,omitempty"` + + // Committed status of the template. If committed is set to true, then the template version can no longer be updated. + Committed *bool `json:"committed,omitempty"` + + // The action control properties that are created in an action resource when the template is assigned. + ActionControl *TemplateActionControl `json:"action_control,omitempty"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateActionControlTemplateOptions : Instantiate CreateActionControlTemplateOptions +func (*IamPolicyManagementV1) NewCreateActionControlTemplateOptions(name string, accountID string) *CreateActionControlTemplateOptions { + return &CreateActionControlTemplateOptions{ + Name: core.StringPtr(name), + AccountID: core.StringPtr(accountID), + } +} + +// SetName : Allow user to set Name +func (_options *CreateActionControlTemplateOptions) SetName(name string) *CreateActionControlTemplateOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetAccountID : Allow user to set AccountID +func (_options *CreateActionControlTemplateOptions) SetAccountID(accountID string) *CreateActionControlTemplateOptions { + _options.AccountID = core.StringPtr(accountID) + return _options +} + +// SetDescription : Allow user to set Description +func (_options *CreateActionControlTemplateOptions) SetDescription(description string) *CreateActionControlTemplateOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetCommitted : Allow user to set Committed +func (_options *CreateActionControlTemplateOptions) SetCommitted(committed bool) *CreateActionControlTemplateOptions { + _options.Committed = core.BoolPtr(committed) return _options } @@ -5673,51 +6862,205 @@ func (_options *CreatePolicyTemplateVersionOptions) SetPolicy(policy *TemplatePo return _options } -// SetName : Allow user to set Name -func (_options *CreatePolicyTemplateVersionOptions) SetName(name string) *CreatePolicyTemplateVersionOptions { - _options.Name = core.StringPtr(name) +// SetName : Allow user to set Name +func (_options *CreatePolicyTemplateVersionOptions) SetName(name string) *CreatePolicyTemplateVersionOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetDescription : Allow user to set Description +func (_options *CreatePolicyTemplateVersionOptions) SetDescription(description string) *CreatePolicyTemplateVersionOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetCommitted : Allow user to set Committed +func (_options *CreatePolicyTemplateVersionOptions) SetCommitted(committed bool) *CreatePolicyTemplateVersionOptions { + _options.Committed = core.BoolPtr(committed) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CreatePolicyTemplateVersionOptions) SetHeaders(param map[string]string) *CreatePolicyTemplateVersionOptions { + options.Headers = param + return options +} + +// CreateRoleOptions : The CreateRole options. +type CreateRoleOptions struct { + // The display the name of the role that is shown in the console. + DisplayName *string `json:"display_name" validate:"required"` + + // The actions of the role. For more information, see [IAM roles and + // actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions). + Actions []string `json:"actions" validate:"required"` + + // The name of the role that is used in the CRN. This must be alphanumeric and capitalized. + Name *string `json:"name" validate:"required"` + + // The account GUID. + AccountID *string `json:"account_id" validate:"required"` + + // The service name. + ServiceName *string `json:"service_name" validate:"required"` + + // The description of the role. + Description *string `json:"description,omitempty"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateRoleOptions : Instantiate CreateRoleOptions +func (*IamPolicyManagementV1) NewCreateRoleOptions(displayName string, actions []string, name string, accountID string, serviceName string) *CreateRoleOptions { + return &CreateRoleOptions{ + DisplayName: core.StringPtr(displayName), + Actions: actions, + Name: core.StringPtr(name), + AccountID: core.StringPtr(accountID), + ServiceName: core.StringPtr(serviceName), + } +} + +// SetDisplayName : Allow user to set DisplayName +func (_options *CreateRoleOptions) SetDisplayName(displayName string) *CreateRoleOptions { + _options.DisplayName = core.StringPtr(displayName) + return _options +} + +// SetActions : Allow user to set Actions +func (_options *CreateRoleOptions) SetActions(actions []string) *CreateRoleOptions { + _options.Actions = actions + return _options +} + +// SetName : Allow user to set Name +func (_options *CreateRoleOptions) SetName(name string) *CreateRoleOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetAccountID : Allow user to set AccountID +func (_options *CreateRoleOptions) SetAccountID(accountID string) *CreateRoleOptions { + _options.AccountID = core.StringPtr(accountID) + return _options +} + +// SetServiceName : Allow user to set ServiceName +func (_options *CreateRoleOptions) SetServiceName(serviceName string) *CreateRoleOptions { + _options.ServiceName = core.StringPtr(serviceName) + return _options +} + +// SetDescription : Allow user to set Description +func (_options *CreateRoleOptions) SetDescription(description string) *CreateRoleOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *CreateRoleOptions) SetAcceptLanguage(acceptLanguage string) *CreateRoleOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CreateRoleOptions) SetHeaders(param map[string]string) *CreateRoleOptions { + options.Headers = param + return options +} + +// CreateRoleTemplateAssignmentOptions : The CreateRoleTemplateAssignment options. +type CreateRoleTemplateAssignmentOptions struct { + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` + + // List of role template details for role assignment. + Templates []RoleAssignmentTemplate `json:"templates" validate:"required"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateRoleTemplateAssignmentOptions : Instantiate CreateRoleTemplateAssignmentOptions +func (*IamPolicyManagementV1) NewCreateRoleTemplateAssignmentOptions(target *AssignmentTargetDetails, templates []RoleAssignmentTemplate) *CreateRoleTemplateAssignmentOptions { + return &CreateRoleTemplateAssignmentOptions{ + Target: target, + Templates: templates, + } +} + +// SetTarget : Allow user to set Target +func (_options *CreateRoleTemplateAssignmentOptions) SetTarget(target *AssignmentTargetDetails) *CreateRoleTemplateAssignmentOptions { + _options.Target = target return _options } -// SetDescription : Allow user to set Description -func (_options *CreatePolicyTemplateVersionOptions) SetDescription(description string) *CreatePolicyTemplateVersionOptions { - _options.Description = core.StringPtr(description) +// SetTemplates : Allow user to set Templates +func (_options *CreateRoleTemplateAssignmentOptions) SetTemplates(templates []RoleAssignmentTemplate) *CreateRoleTemplateAssignmentOptions { + _options.Templates = templates return _options } -// SetCommitted : Allow user to set Committed -func (_options *CreatePolicyTemplateVersionOptions) SetCommitted(committed bool) *CreatePolicyTemplateVersionOptions { - _options.Committed = core.BoolPtr(committed) +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *CreateRoleTemplateAssignmentOptions) SetAcceptLanguage(acceptLanguage string) *CreateRoleTemplateAssignmentOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) return _options } // SetHeaders : Allow user to set Headers -func (options *CreatePolicyTemplateVersionOptions) SetHeaders(param map[string]string) *CreatePolicyTemplateVersionOptions { +func (options *CreateRoleTemplateAssignmentOptions) SetHeaders(param map[string]string) *CreateRoleTemplateAssignmentOptions { options.Headers = param return options } -// CreateRoleOptions : The CreateRole options. -type CreateRoleOptions struct { - // The display the name of the role that is shown in the console. - DisplayName *string `json:"display_name" validate:"required"` - - // The actions of the role. For more information, see [IAM roles and - // actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions). - Actions []string `json:"actions" validate:"required"` - - // The name of the role that is used in the CRN. This must be alphanumeric and capitalized. +// CreateRoleTemplateOptions : The CreateRoleTemplate options. +type CreateRoleTemplateOptions struct { + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes + // the name value for all existing versions of the template. Name *string `json:"name" validate:"required"` - // The account GUID. + // Enterprise account ID where this template is created. AccountID *string `json:"account_id" validate:"required"` - // The service name. - ServiceName *string `json:"service_name" validate:"required"` - - // The description of the role. + // Description of the role template. This is shown to users in the enterprise account. Use this to describe the purpose + // or context of the role for enterprise users managing IAM templates. Description *string `json:"description,omitempty"` + // Committed status of the template. If committed is set to true, then the template version can no longer be updated. + Committed *bool `json:"committed,omitempty"` + + // The role properties that are created in an action resource when the template is assigned. + Role *RoleTemplatePrototypeRole `json:"role,omitempty"` + // Language code for translations // * `default` - English // * `de` - German (Standard) @@ -5736,61 +7079,119 @@ type CreateRoleOptions struct { Headers map[string]string } -// NewCreateRoleOptions : Instantiate CreateRoleOptions -func (*IamPolicyManagementV1) NewCreateRoleOptions(displayName string, actions []string, name string, accountID string, serviceName string) *CreateRoleOptions { - return &CreateRoleOptions{ - DisplayName: core.StringPtr(displayName), - Actions: actions, +// NewCreateRoleTemplateOptions : Instantiate CreateRoleTemplateOptions +func (*IamPolicyManagementV1) NewCreateRoleTemplateOptions(name string, accountID string) *CreateRoleTemplateOptions { + return &CreateRoleTemplateOptions{ Name: core.StringPtr(name), AccountID: core.StringPtr(accountID), - ServiceName: core.StringPtr(serviceName), } } -// SetDisplayName : Allow user to set DisplayName -func (_options *CreateRoleOptions) SetDisplayName(displayName string) *CreateRoleOptions { - _options.DisplayName = core.StringPtr(displayName) +// SetName : Allow user to set Name +func (_options *CreateRoleTemplateOptions) SetName(name string) *CreateRoleTemplateOptions { + _options.Name = core.StringPtr(name) return _options } -// SetActions : Allow user to set Actions -func (_options *CreateRoleOptions) SetActions(actions []string) *CreateRoleOptions { - _options.Actions = actions +// SetAccountID : Allow user to set AccountID +func (_options *CreateRoleTemplateOptions) SetAccountID(accountID string) *CreateRoleTemplateOptions { + _options.AccountID = core.StringPtr(accountID) return _options } -// SetName : Allow user to set Name -func (_options *CreateRoleOptions) SetName(name string) *CreateRoleOptions { - _options.Name = core.StringPtr(name) +// SetDescription : Allow user to set Description +func (_options *CreateRoleTemplateOptions) SetDescription(description string) *CreateRoleTemplateOptions { + _options.Description = core.StringPtr(description) return _options } -// SetAccountID : Allow user to set AccountID -func (_options *CreateRoleOptions) SetAccountID(accountID string) *CreateRoleOptions { - _options.AccountID = core.StringPtr(accountID) +// SetCommitted : Allow user to set Committed +func (_options *CreateRoleTemplateOptions) SetCommitted(committed bool) *CreateRoleTemplateOptions { + _options.Committed = core.BoolPtr(committed) return _options } -// SetServiceName : Allow user to set ServiceName -func (_options *CreateRoleOptions) SetServiceName(serviceName string) *CreateRoleOptions { - _options.ServiceName = core.StringPtr(serviceName) +// SetRole : Allow user to set Role +func (_options *CreateRoleTemplateOptions) SetRole(role *RoleTemplatePrototypeRole) *CreateRoleTemplateOptions { + _options.Role = role + return _options +} + +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *CreateRoleTemplateOptions) SetAcceptLanguage(acceptLanguage string) *CreateRoleTemplateOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CreateRoleTemplateOptions) SetHeaders(param map[string]string) *CreateRoleTemplateOptions { + options.Headers = param + return options +} + +// CreateRoleTemplateVersionOptions : The CreateRoleTemplateVersion options. +type CreateRoleTemplateVersionOptions struct { + // The role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it will + // change the name value for all existing versions of the template. + Name *string `json:"name,omitempty"` + + // Description of the role template. This is shown to users in the enterprise account. Use this to describe the purpose + // or context of the role for enterprise users managing IAM templates. + Description *string `json:"description,omitempty"` + + // The role properties that are created in an action resource when the template is assigned. + Role *TemplateRole `json:"role,omitempty"` + + // Committed status of the template version. If committed is set to true, then the template version can no longer be + // updated. + Committed *bool `json:"committed,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateRoleTemplateVersionOptions : Instantiate CreateRoleTemplateVersionOptions +func (*IamPolicyManagementV1) NewCreateRoleTemplateVersionOptions(roleTemplateID string) *CreateRoleTemplateVersionOptions { + return &CreateRoleTemplateVersionOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + } +} + +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *CreateRoleTemplateVersionOptions) SetRoleTemplateID(roleTemplateID string) *CreateRoleTemplateVersionOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetName : Allow user to set Name +func (_options *CreateRoleTemplateVersionOptions) SetName(name string) *CreateRoleTemplateVersionOptions { + _options.Name = core.StringPtr(name) return _options } // SetDescription : Allow user to set Description -func (_options *CreateRoleOptions) SetDescription(description string) *CreateRoleOptions { +func (_options *CreateRoleTemplateVersionOptions) SetDescription(description string) *CreateRoleTemplateVersionOptions { _options.Description = core.StringPtr(description) return _options } -// SetAcceptLanguage : Allow user to set AcceptLanguage -func (_options *CreateRoleOptions) SetAcceptLanguage(acceptLanguage string) *CreateRoleOptions { - _options.AcceptLanguage = core.StringPtr(acceptLanguage) +// SetRole : Allow user to set Role +func (_options *CreateRoleTemplateVersionOptions) SetRole(role *TemplateRole) *CreateRoleTemplateVersionOptions { + _options.Role = role + return _options +} + +// SetCommitted : Allow user to set Committed +func (_options *CreateRoleTemplateVersionOptions) SetCommitted(committed bool) *CreateRoleTemplateVersionOptions { + _options.Committed = core.BoolPtr(committed) return _options } // SetHeaders : Allow user to set Headers -func (options *CreateRoleOptions) SetHeaders(param map[string]string) *CreateRoleOptions { +func (options *CreateRoleTemplateVersionOptions) SetHeaders(param map[string]string) *CreateRoleTemplateVersionOptions { options.Headers = param return options } @@ -6238,6 +7639,34 @@ func (options *DeletePolicyTemplateVersionOptions) SetHeaders(param map[string]s return options } +// DeleteRoleAssignmentOptions : The DeleteRoleAssignment options. +type DeleteRoleAssignmentOptions struct { + // Role template assignment ID. + AssignmentID *string `json:"assignment_id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewDeleteRoleAssignmentOptions : Instantiate DeleteRoleAssignmentOptions +func (*IamPolicyManagementV1) NewDeleteRoleAssignmentOptions(assignmentID string) *DeleteRoleAssignmentOptions { + return &DeleteRoleAssignmentOptions{ + AssignmentID: core.StringPtr(assignmentID), + } +} + +// SetAssignmentID : Allow user to set AssignmentID +func (_options *DeleteRoleAssignmentOptions) SetAssignmentID(assignmentID string) *DeleteRoleAssignmentOptions { + _options.AssignmentID = core.StringPtr(assignmentID) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *DeleteRoleAssignmentOptions) SetHeaders(param map[string]string) *DeleteRoleAssignmentOptions { + options.Headers = param + return options +} + // DeleteRoleOptions : The DeleteRole options. type DeleteRoleOptions struct { // The role ID. @@ -6266,6 +7695,72 @@ func (options *DeleteRoleOptions) SetHeaders(param map[string]string) *DeleteRol return options } +// DeleteRoleTemplateOptions : The DeleteRoleTemplate options. +type DeleteRoleTemplateOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewDeleteRoleTemplateOptions : Instantiate DeleteRoleTemplateOptions +func (*IamPolicyManagementV1) NewDeleteRoleTemplateOptions(roleTemplateID string) *DeleteRoleTemplateOptions { + return &DeleteRoleTemplateOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + } +} + +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *DeleteRoleTemplateOptions) SetRoleTemplateID(roleTemplateID string) *DeleteRoleTemplateOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *DeleteRoleTemplateOptions) SetHeaders(param map[string]string) *DeleteRoleTemplateOptions { + options.Headers = param + return options +} + +// DeleteRoleTemplateVersionOptions : The DeleteRoleTemplateVersion options. +type DeleteRoleTemplateVersionOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Role template version. + Version *string `json:"version" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewDeleteRoleTemplateVersionOptions : Instantiate DeleteRoleTemplateVersionOptions +func (*IamPolicyManagementV1) NewDeleteRoleTemplateVersionOptions(roleTemplateID string, version string) *DeleteRoleTemplateVersionOptions { + return &DeleteRoleTemplateVersionOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + Version: core.StringPtr(version), + } +} + +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *DeleteRoleTemplateVersionOptions) SetRoleTemplateID(roleTemplateID string) *DeleteRoleTemplateVersionOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *DeleteRoleTemplateVersionOptions) SetVersion(version string) *DeleteRoleTemplateVersionOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *DeleteRoleTemplateVersionOptions) SetHeaders(param map[string]string) *DeleteRoleTemplateVersionOptions { + options.Headers = param + return options +} + // DeleteV2PolicyOptions : The DeleteV2Policy options. type DeleteV2PolicyOptions struct { // The policy ID. @@ -6389,8 +7884,11 @@ const ( ErrorObjectCodePolicyTemplateNotFoundConst = "policy_template_not_found" ErrorObjectCodeRequestNotProcessedConst = "request_not_processed" ErrorObjectCodeResourceNotFoundConst = "resource_not_found" + ErrorObjectCodeRoleAssignmentNotFoundConst = "role_assignment_not_found" ErrorObjectCodeRoleConflictErrorConst = "role_conflict_error" ErrorObjectCodeRoleNotFoundConst = "role_not_found" + ErrorObjectCodeRoleTemplateConflictErrorConst = "role_template_conflict_error" + ErrorObjectCodeRoleTemplateNotFoundConst = "role_template_not_found" ErrorObjectCodeTooManyRequestsConst = "too_many_requests" ErrorObjectCodeUnableToProcessConst = "unable_to_process" ErrorObjectCodeUnsupportedContentTypeConst = "unsupported_content_type" @@ -6702,63 +8200,173 @@ type GetPolicyTemplateVersionOptions struct { // The policy template ID. PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="` - // The policy template version. - Version *string `json:"version" validate:"required,ne="` + // The policy template version. + Version *string `json:"version" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewGetPolicyTemplateVersionOptions : Instantiate GetPolicyTemplateVersionOptions +func (*IamPolicyManagementV1) NewGetPolicyTemplateVersionOptions(policyTemplateID string, version string) *GetPolicyTemplateVersionOptions { + return &GetPolicyTemplateVersionOptions{ + PolicyTemplateID: core.StringPtr(policyTemplateID), + Version: core.StringPtr(version), + } +} + +// SetPolicyTemplateID : Allow user to set PolicyTemplateID +func (_options *GetPolicyTemplateVersionOptions) SetPolicyTemplateID(policyTemplateID string) *GetPolicyTemplateVersionOptions { + _options.PolicyTemplateID = core.StringPtr(policyTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *GetPolicyTemplateVersionOptions) SetVersion(version string) *GetPolicyTemplateVersionOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *GetPolicyTemplateVersionOptions) SetHeaders(param map[string]string) *GetPolicyTemplateVersionOptions { + options.Headers = param + return options +} + +// GetRoleAssignmentOptions : The GetRoleAssignment options. +type GetRoleAssignmentOptions struct { + // Role template assignment ID. + AssignmentID *string `json:"assignment_id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewGetRoleAssignmentOptions : Instantiate GetRoleAssignmentOptions +func (*IamPolicyManagementV1) NewGetRoleAssignmentOptions(assignmentID string) *GetRoleAssignmentOptions { + return &GetRoleAssignmentOptions{ + AssignmentID: core.StringPtr(assignmentID), + } +} + +// SetAssignmentID : Allow user to set AssignmentID +func (_options *GetRoleAssignmentOptions) SetAssignmentID(assignmentID string) *GetRoleAssignmentOptions { + _options.AssignmentID = core.StringPtr(assignmentID) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *GetRoleAssignmentOptions) SetHeaders(param map[string]string) *GetRoleAssignmentOptions { + options.Headers = param + return options +} + +// GetRoleOptions : The GetRole options. +type GetRoleOptions struct { + // The role ID. + RoleID *string `json:"role_id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewGetRoleOptions : Instantiate GetRoleOptions +func (*IamPolicyManagementV1) NewGetRoleOptions(roleID string) *GetRoleOptions { + return &GetRoleOptions{ + RoleID: core.StringPtr(roleID), + } +} + +// SetRoleID : Allow user to set RoleID +func (_options *GetRoleOptions) SetRoleID(roleID string) *GetRoleOptions { + _options.RoleID = core.StringPtr(roleID) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *GetRoleOptions) SetHeaders(param map[string]string) *GetRoleOptions { + options.Headers = param + return options +} + +// GetRoleTemplateOptions : The GetRoleTemplate options. +type GetRoleTemplateOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // The role template state. + State *string `json:"state,omitempty"` // Allows users to set headers on API requests. Headers map[string]string } -// NewGetPolicyTemplateVersionOptions : Instantiate GetPolicyTemplateVersionOptions -func (*IamPolicyManagementV1) NewGetPolicyTemplateVersionOptions(policyTemplateID string, version string) *GetPolicyTemplateVersionOptions { - return &GetPolicyTemplateVersionOptions{ - PolicyTemplateID: core.StringPtr(policyTemplateID), - Version: core.StringPtr(version), +// Constants associated with the GetRoleTemplateOptions.State property. +// The role template state. +const ( + GetRoleTemplateOptionsStateActiveConst = "active" + GetRoleTemplateOptionsStateDeletedConst = "deleted" +) + +// NewGetRoleTemplateOptions : Instantiate GetRoleTemplateOptions +func (*IamPolicyManagementV1) NewGetRoleTemplateOptions(roleTemplateID string) *GetRoleTemplateOptions { + return &GetRoleTemplateOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), } } -// SetPolicyTemplateID : Allow user to set PolicyTemplateID -func (_options *GetPolicyTemplateVersionOptions) SetPolicyTemplateID(policyTemplateID string) *GetPolicyTemplateVersionOptions { - _options.PolicyTemplateID = core.StringPtr(policyTemplateID) +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *GetRoleTemplateOptions) SetRoleTemplateID(roleTemplateID string) *GetRoleTemplateOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) return _options } -// SetVersion : Allow user to set Version -func (_options *GetPolicyTemplateVersionOptions) SetVersion(version string) *GetPolicyTemplateVersionOptions { - _options.Version = core.StringPtr(version) +// SetState : Allow user to set State +func (_options *GetRoleTemplateOptions) SetState(state string) *GetRoleTemplateOptions { + _options.State = core.StringPtr(state) return _options } // SetHeaders : Allow user to set Headers -func (options *GetPolicyTemplateVersionOptions) SetHeaders(param map[string]string) *GetPolicyTemplateVersionOptions { +func (options *GetRoleTemplateOptions) SetHeaders(param map[string]string) *GetRoleTemplateOptions { options.Headers = param return options } -// GetRoleOptions : The GetRole options. -type GetRoleOptions struct { - // The role ID. - RoleID *string `json:"role_id" validate:"required,ne="` +// GetRoleTemplateVersionOptions : The GetRoleTemplateVersion options. +type GetRoleTemplateVersionOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Role template version. + Version *string `json:"version" validate:"required,ne="` // Allows users to set headers on API requests. Headers map[string]string } -// NewGetRoleOptions : Instantiate GetRoleOptions -func (*IamPolicyManagementV1) NewGetRoleOptions(roleID string) *GetRoleOptions { - return &GetRoleOptions{ - RoleID: core.StringPtr(roleID), +// NewGetRoleTemplateVersionOptions : Instantiate GetRoleTemplateVersionOptions +func (*IamPolicyManagementV1) NewGetRoleTemplateVersionOptions(roleTemplateID string, version string) *GetRoleTemplateVersionOptions { + return &GetRoleTemplateVersionOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + Version: core.StringPtr(version), } } -// SetRoleID : Allow user to set RoleID -func (_options *GetRoleOptions) SetRoleID(roleID string) *GetRoleOptions { - _options.RoleID = core.StringPtr(roleID) +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *GetRoleTemplateVersionOptions) SetRoleTemplateID(roleTemplateID string) *GetRoleTemplateVersionOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *GetRoleTemplateVersionOptions) SetVersion(version string) *GetRoleTemplateVersionOptions { + _options.Version = core.StringPtr(version) return _options } // SetHeaders : Allow user to set Headers -func (options *GetRoleOptions) SetHeaders(param map[string]string) *GetRoleOptions { +func (options *GetRoleTemplateVersionOptions) SetHeaders(param map[string]string) *GetRoleTemplateVersionOptions { options.Headers = param return options } @@ -7696,67 +9304,322 @@ func (*IamPolicyManagementV1) NewListPolicyTemplatesOptions(accountID string) *L } // SetAccountID : Allow user to set AccountID -func (_options *ListPolicyTemplatesOptions) SetAccountID(accountID string) *ListPolicyTemplatesOptions { +func (_options *ListPolicyTemplatesOptions) SetAccountID(accountID string) *ListPolicyTemplatesOptions { + _options.AccountID = core.StringPtr(accountID) + return _options +} + +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *ListPolicyTemplatesOptions) SetAcceptLanguage(acceptLanguage string) *ListPolicyTemplatesOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) + return _options +} + +// SetState : Allow user to set State +func (_options *ListPolicyTemplatesOptions) SetState(state string) *ListPolicyTemplatesOptions { + _options.State = core.StringPtr(state) + return _options +} + +// SetName : Allow user to set Name +func (_options *ListPolicyTemplatesOptions) SetName(name string) *ListPolicyTemplatesOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetPolicyServiceType : Allow user to set PolicyServiceType +func (_options *ListPolicyTemplatesOptions) SetPolicyServiceType(policyServiceType string) *ListPolicyTemplatesOptions { + _options.PolicyServiceType = core.StringPtr(policyServiceType) + return _options +} + +// SetPolicyServiceName : Allow user to set PolicyServiceName +func (_options *ListPolicyTemplatesOptions) SetPolicyServiceName(policyServiceName string) *ListPolicyTemplatesOptions { + _options.PolicyServiceName = core.StringPtr(policyServiceName) + return _options +} + +// SetPolicyServiceGroupID : Allow user to set PolicyServiceGroupID +func (_options *ListPolicyTemplatesOptions) SetPolicyServiceGroupID(policyServiceGroupID string) *ListPolicyTemplatesOptions { + _options.PolicyServiceGroupID = core.StringPtr(policyServiceGroupID) + return _options +} + +// SetPolicyType : Allow user to set PolicyType +func (_options *ListPolicyTemplatesOptions) SetPolicyType(policyType string) *ListPolicyTemplatesOptions { + _options.PolicyType = core.StringPtr(policyType) + return _options +} + +// SetLimit : Allow user to set Limit +func (_options *ListPolicyTemplatesOptions) SetLimit(limit int64) *ListPolicyTemplatesOptions { + _options.Limit = core.Int64Ptr(limit) + return _options +} + +// SetStart : Allow user to set Start +func (_options *ListPolicyTemplatesOptions) SetStart(start string) *ListPolicyTemplatesOptions { + _options.Start = core.StringPtr(start) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListPolicyTemplatesOptions) SetHeaders(param map[string]string) *ListPolicyTemplatesOptions { + options.Headers = param + return options +} + +// ListRoleAssignmentsOptions : The ListRoleAssignments options. +type ListRoleAssignmentsOptions struct { + // The account GUID in which the role assignment belongs to. + AccountID *string `json:"account_id" validate:"required"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // Optional template ID. + TemplateID *string `json:"template_id,omitempty"` + + // Optional role template version. + TemplateVersion *string `json:"template_version,omitempty"` + + // The number of documents to include in the collection. + Limit *int64 `json:"limit,omitempty"` + + // Page token that refers to the page of the collection to return. + Start *string `json:"start,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewListRoleAssignmentsOptions : Instantiate ListRoleAssignmentsOptions +func (*IamPolicyManagementV1) NewListRoleAssignmentsOptions(accountID string) *ListRoleAssignmentsOptions { + return &ListRoleAssignmentsOptions{ + AccountID: core.StringPtr(accountID), + } +} + +// SetAccountID : Allow user to set AccountID +func (_options *ListRoleAssignmentsOptions) SetAccountID(accountID string) *ListRoleAssignmentsOptions { + _options.AccountID = core.StringPtr(accountID) + return _options +} + +// SetAcceptLanguage : Allow user to set AcceptLanguage +func (_options *ListRoleAssignmentsOptions) SetAcceptLanguage(acceptLanguage string) *ListRoleAssignmentsOptions { + _options.AcceptLanguage = core.StringPtr(acceptLanguage) + return _options +} + +// SetTemplateID : Allow user to set TemplateID +func (_options *ListRoleAssignmentsOptions) SetTemplateID(templateID string) *ListRoleAssignmentsOptions { + _options.TemplateID = core.StringPtr(templateID) + return _options +} + +// SetTemplateVersion : Allow user to set TemplateVersion +func (_options *ListRoleAssignmentsOptions) SetTemplateVersion(templateVersion string) *ListRoleAssignmentsOptions { + _options.TemplateVersion = core.StringPtr(templateVersion) + return _options +} + +// SetLimit : Allow user to set Limit +func (_options *ListRoleAssignmentsOptions) SetLimit(limit int64) *ListRoleAssignmentsOptions { + _options.Limit = core.Int64Ptr(limit) + return _options +} + +// SetStart : Allow user to set Start +func (_options *ListRoleAssignmentsOptions) SetStart(start string) *ListRoleAssignmentsOptions { + _options.Start = core.StringPtr(start) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListRoleAssignmentsOptions) SetHeaders(param map[string]string) *ListRoleAssignmentsOptions { + options.Headers = param + return options +} + +// ListRoleTemplateVersionsOptions : The ListRoleTemplateVersions options. +type ListRoleTemplateVersionsOptions struct { + // The role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Role template state. + State *string `json:"state,omitempty"` + + // The number of documents to include in the collection. + Limit *int64 `json:"limit,omitempty"` + + // Page token that refers to the page of the collection to return. + Start *string `json:"start,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// Constants associated with the ListRoleTemplateVersionsOptions.State property. +// Role template state. +const ( + ListRoleTemplateVersionsOptionsStateActiveConst = "active" + ListRoleTemplateVersionsOptionsStateDeletedConst = "deleted" +) + +// NewListRoleTemplateVersionsOptions : Instantiate ListRoleTemplateVersionsOptions +func (*IamPolicyManagementV1) NewListRoleTemplateVersionsOptions(roleTemplateID string) *ListRoleTemplateVersionsOptions { + return &ListRoleTemplateVersionsOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), + } +} + +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *ListRoleTemplateVersionsOptions) SetRoleTemplateID(roleTemplateID string) *ListRoleTemplateVersionsOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) + return _options +} + +// SetState : Allow user to set State +func (_options *ListRoleTemplateVersionsOptions) SetState(state string) *ListRoleTemplateVersionsOptions { + _options.State = core.StringPtr(state) + return _options +} + +// SetLimit : Allow user to set Limit +func (_options *ListRoleTemplateVersionsOptions) SetLimit(limit int64) *ListRoleTemplateVersionsOptions { + _options.Limit = core.Int64Ptr(limit) + return _options +} + +// SetStart : Allow user to set Start +func (_options *ListRoleTemplateVersionsOptions) SetStart(start string) *ListRoleTemplateVersionsOptions { + _options.Start = core.StringPtr(start) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListRoleTemplateVersionsOptions) SetHeaders(param map[string]string) *ListRoleTemplateVersionsOptions { + options.Headers = param + return options +} + +// ListRoleTemplatesOptions : The ListRoleTemplates options. +type ListRoleTemplatesOptions struct { + // The account GUID that the role templates belong to. + AccountID *string `json:"account_id" validate:"required"` + + // Language code for translations + // * `default` - English + // * `de` - German (Standard) + // * `en` - English + // * `es` - Spanish (Spain) + // * `fr` - French (Standard) + // * `it` - Italian (Standard) + // * `ja` - Japanese + // * `ko` - Korean + // * `pt-br` - Portuguese (Brazil) + // * `zh-cn` - Chinese (Simplified, PRC) + // * `zh-tw` - (Chinese, Taiwan). + AcceptLanguage *string `json:"Accept-Language,omitempty"` + + // The role template name. + Name *string `json:"name,omitempty"` + + // The template role name. + RoleName *string `json:"role_name,omitempty"` + + // The template role service name. + RoleServiceName *string `json:"role_service_name,omitempty"` + + // The role template state. + State *string `json:"state,omitempty"` + + // The number of documents to include in the collection. + Limit *int64 `json:"limit,omitempty"` + + // Page token that refers to the page of the collection to return. + Start *string `json:"start,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// Constants associated with the ListRoleTemplatesOptions.State property. +// The role template state. +const ( + ListRoleTemplatesOptionsStateActiveConst = "active" + ListRoleTemplatesOptionsStateDeletedConst = "deleted" +) + +// NewListRoleTemplatesOptions : Instantiate ListRoleTemplatesOptions +func (*IamPolicyManagementV1) NewListRoleTemplatesOptions(accountID string) *ListRoleTemplatesOptions { + return &ListRoleTemplatesOptions{ + AccountID: core.StringPtr(accountID), + } +} + +// SetAccountID : Allow user to set AccountID +func (_options *ListRoleTemplatesOptions) SetAccountID(accountID string) *ListRoleTemplatesOptions { _options.AccountID = core.StringPtr(accountID) return _options } // SetAcceptLanguage : Allow user to set AcceptLanguage -func (_options *ListPolicyTemplatesOptions) SetAcceptLanguage(acceptLanguage string) *ListPolicyTemplatesOptions { +func (_options *ListRoleTemplatesOptions) SetAcceptLanguage(acceptLanguage string) *ListRoleTemplatesOptions { _options.AcceptLanguage = core.StringPtr(acceptLanguage) return _options } -// SetState : Allow user to set State -func (_options *ListPolicyTemplatesOptions) SetState(state string) *ListPolicyTemplatesOptions { - _options.State = core.StringPtr(state) - return _options -} - // SetName : Allow user to set Name -func (_options *ListPolicyTemplatesOptions) SetName(name string) *ListPolicyTemplatesOptions { +func (_options *ListRoleTemplatesOptions) SetName(name string) *ListRoleTemplatesOptions { _options.Name = core.StringPtr(name) return _options } -// SetPolicyServiceType : Allow user to set PolicyServiceType -func (_options *ListPolicyTemplatesOptions) SetPolicyServiceType(policyServiceType string) *ListPolicyTemplatesOptions { - _options.PolicyServiceType = core.StringPtr(policyServiceType) - return _options -} - -// SetPolicyServiceName : Allow user to set PolicyServiceName -func (_options *ListPolicyTemplatesOptions) SetPolicyServiceName(policyServiceName string) *ListPolicyTemplatesOptions { - _options.PolicyServiceName = core.StringPtr(policyServiceName) +// SetRoleName : Allow user to set RoleName +func (_options *ListRoleTemplatesOptions) SetRoleName(roleName string) *ListRoleTemplatesOptions { + _options.RoleName = core.StringPtr(roleName) return _options } -// SetPolicyServiceGroupID : Allow user to set PolicyServiceGroupID -func (_options *ListPolicyTemplatesOptions) SetPolicyServiceGroupID(policyServiceGroupID string) *ListPolicyTemplatesOptions { - _options.PolicyServiceGroupID = core.StringPtr(policyServiceGroupID) +// SetRoleServiceName : Allow user to set RoleServiceName +func (_options *ListRoleTemplatesOptions) SetRoleServiceName(roleServiceName string) *ListRoleTemplatesOptions { + _options.RoleServiceName = core.StringPtr(roleServiceName) return _options } -// SetPolicyType : Allow user to set PolicyType -func (_options *ListPolicyTemplatesOptions) SetPolicyType(policyType string) *ListPolicyTemplatesOptions { - _options.PolicyType = core.StringPtr(policyType) +// SetState : Allow user to set State +func (_options *ListRoleTemplatesOptions) SetState(state string) *ListRoleTemplatesOptions { + _options.State = core.StringPtr(state) return _options } // SetLimit : Allow user to set Limit -func (_options *ListPolicyTemplatesOptions) SetLimit(limit int64) *ListPolicyTemplatesOptions { +func (_options *ListRoleTemplatesOptions) SetLimit(limit int64) *ListRoleTemplatesOptions { _options.Limit = core.Int64Ptr(limit) return _options } // SetStart : Allow user to set Start -func (_options *ListPolicyTemplatesOptions) SetStart(start string) *ListPolicyTemplatesOptions { +func (_options *ListRoleTemplatesOptions) SetStart(start string) *ListRoleTemplatesOptions { _options.Start = core.StringPtr(start) return _options } // SetHeaders : Allow user to set Headers -func (options *ListPolicyTemplatesOptions) SetHeaders(param map[string]string) *ListPolicyTemplatesOptions { +func (options *ListRoleTemplatesOptions) SetHeaders(param map[string]string) *ListRoleTemplatesOptions { options.Headers = param return options } @@ -9247,21 +11110,317 @@ func UnmarshalPolicyTemplateLimitData(m map[string]json.RawMessage, result inter err = core.SDKErrorf(err, "", "counts-error", common.GetComponentInfo()) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// PolicyTemplateMetaData : The core set of properties associated with a policy. +type PolicyTemplateMetaData struct { + // The policy ID. + ID *string `json:"id,omitempty"` + + // The policy type; either 'access' or 'authorization'. + Type *string `json:"type" validate:"required"` + + // Customer-defined description. + Description *string `json:"description,omitempty"` + + // The subjects associated with a policy. + Subjects []PolicySubject `json:"subjects" validate:"required"` + + // A set of role Cloud Resource Names (CRNs) granted by the policy. + Roles []PolicyRole `json:"roles" validate:"required"` + + // The resources associated with a policy. + Resources []PolicyResource `json:"resources" validate:"required"` + + // The href links back to the policy. + Href *string `json:"href,omitempty"` + + // The UTC timestamp when the policy was created. + CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` + + // The IAM ID of the entity that created the policy. + CreatedByID *string `json:"created_by_id,omitempty"` + + // The UTC timestamp when the policy was last modified. + LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` + + // The IAM ID of the entity that last modified the policy. + LastModifiedByID *string `json:"last_modified_by_id,omitempty"` + + // The policy state. + State *string `json:"state,omitempty"` + + // The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned, + // this indicates that the policy is created from and managed by a template in the root enterprise account. + Template *TemplateMetadata `json:"template,omitempty"` +} + +// Constants associated with the PolicyTemplateMetaData.State property. +// The policy state. +const ( + PolicyTemplateMetaDataStateActiveConst = "active" + PolicyTemplateMetaDataStateDeletedConst = "deleted" +) + +// UnmarshalPolicyTemplateMetaData unmarshals an instance of PolicyTemplateMetaData from the specified map of raw messages. +func UnmarshalPolicyTemplateMetaData(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(PolicyTemplateMetaData) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "subjects", &obj.Subjects, UnmarshalPolicySubject) + if err != nil { + err = core.SDKErrorf(err, "", "subjects-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "roles", &obj.Roles, UnmarshalPolicyRole) + if err != nil { + err = core.SDKErrorf(err, "", "roles-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalPolicyResource) + if err != nil { + err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) + if err != nil { + err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "state", &obj.State) + if err != nil { + err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalTemplateMetadata) + if err != nil { + err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// PolicyTemplateVersionsCollection : A collection of versions for a specific policy template. +type PolicyTemplateVersionsCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` + + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` + + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of policy templates versions. + Versions []PolicyTemplate `json:"versions" validate:"required"` +} + +// UnmarshalPolicyTemplateVersionsCollection unmarshals an instance of PolicyTemplateVersionsCollection from the specified map of raw messages. +func UnmarshalPolicyTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(PolicyTemplateVersionsCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "versions", &obj.Versions, UnmarshalPolicyTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "versions-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *PolicyTemplateVersionsCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + +// Previous : Details with linking href to previous page of requested collection. +type Previous struct { + // The href linking to the page of requested collection. + Href *string `json:"href,omitempty"` + + // Page token that refers to the page of the collection. + Start *string `json:"start,omitempty"` +} + +// UnmarshalPrevious unmarshals an instance of Previous from the specified map of raw messages. +func UnmarshalPrevious(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(Previous) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "start", &obj.Start) + if err != nil { + err = core.SDKErrorf(err, "", "start-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ReplaceActionControlTemplateOptions : The ReplaceActionControlTemplate options. +type ReplaceActionControlTemplateOptions struct { + // Action control template ID. + ActionControlTemplateID *string `json:"action_control_template_id" validate:"required,ne="` + + // Action control template version. + Version *string `json:"version" validate:"required,ne="` + + // The revision number for updating an action control template version must match the Etag value of the existing action + // control template version. The Etag can be retrieved using the GET + // /v1/action_control_templates/{template_id}/versions/{version} API and looking at the Etag response header. + IfMatch *string `json:"If-Match" validate:"required"` + + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it will + // change the name value for all existing versions of the template. + Name *string `json:"name,omitempty"` + + // Description of the action control template. This is shown to users in the enterprise account. Use this to describe + // the purpose or context of the action control for enterprise users managing IAM templates. + Description *string `json:"description,omitempty"` + + // The action control properties that are created in an action resource when the template is assigned. + ActionControl *TemplateActionControl `json:"action_control,omitempty"` + + // Committed status of the template version. If committed is set to true, then the template version can no longer be + // updated. + Committed *bool `json:"committed,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewReplaceActionControlTemplateOptions : Instantiate ReplaceActionControlTemplateOptions +func (*IamPolicyManagementV1) NewReplaceActionControlTemplateOptions(actionControlTemplateID string, version string, ifMatch string) *ReplaceActionControlTemplateOptions { + return &ReplaceActionControlTemplateOptions{ + ActionControlTemplateID: core.StringPtr(actionControlTemplateID), + Version: core.StringPtr(version), + IfMatch: core.StringPtr(ifMatch), + } } -// PolicyTemplateMetaData : The core set of properties associated with a policy. -type PolicyTemplateMetaData struct { +// SetActionControlTemplateID : Allow user to set ActionControlTemplateID +func (_options *ReplaceActionControlTemplateOptions) SetActionControlTemplateID(actionControlTemplateID string) *ReplaceActionControlTemplateOptions { + _options.ActionControlTemplateID = core.StringPtr(actionControlTemplateID) + return _options +} + +// SetVersion : Allow user to set Version +func (_options *ReplaceActionControlTemplateOptions) SetVersion(version string) *ReplaceActionControlTemplateOptions { + _options.Version = core.StringPtr(version) + return _options +} + +// SetIfMatch : Allow user to set IfMatch +func (_options *ReplaceActionControlTemplateOptions) SetIfMatch(ifMatch string) *ReplaceActionControlTemplateOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + +// SetName : Allow user to set Name +func (_options *ReplaceActionControlTemplateOptions) SetName(name string) *ReplaceActionControlTemplateOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetDescription : Allow user to set Description +func (_options *ReplaceActionControlTemplateOptions) SetDescription(description string) *ReplaceActionControlTemplateOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetActionControl : Allow user to set ActionControl +func (_options *ReplaceActionControlTemplateOptions) SetActionControl(actionControl *TemplateActionControl) *ReplaceActionControlTemplateOptions { + _options.ActionControl = actionControl + return _options +} + +// SetCommitted : Allow user to set Committed +func (_options *ReplaceActionControlTemplateOptions) SetCommitted(committed bool) *ReplaceActionControlTemplateOptions { + _options.Committed = core.BoolPtr(committed) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ReplaceActionControlTemplateOptions) SetHeaders(param map[string]string) *ReplaceActionControlTemplateOptions { + options.Headers = param + return options +} + +// ReplacePolicyOptions : The ReplacePolicy options. +type ReplacePolicyOptions struct { // The policy ID. - ID *string `json:"id,omitempty"` + PolicyID *string `json:"policy_id" validate:"required,ne="` + + // The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be + // retrieved using the GET /v1/policies/{policy_id} API and looking at the ETag response header. + IfMatch *string `json:"If-Match" validate:"required"` // The policy type; either 'access' or 'authorization'. Type *string `json:"type" validate:"required"` - // Customer-defined description. - Description *string `json:"description,omitempty"` - // The subjects associated with a policy. Subjects []PolicySubject `json:"subjects" validate:"required"` @@ -9271,215 +11430,254 @@ type PolicyTemplateMetaData struct { // The resources associated with a policy. Resources []PolicyResource `json:"resources" validate:"required"` - // The href links back to the policy. - Href *string `json:"href,omitempty"` + // Customer-defined description. + Description *string `json:"description,omitempty"` - // The UTC timestamp when the policy was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` + // Allows users to set headers on API requests. + Headers map[string]string +} - // The IAM ID of the entity that created the policy. - CreatedByID *string `json:"created_by_id,omitempty"` +// NewReplacePolicyOptions : Instantiate ReplacePolicyOptions +func (*IamPolicyManagementV1) NewReplacePolicyOptions(policyID string, ifMatch string, typeVar string, subjects []PolicySubject, roles []PolicyRole, resources []PolicyResource) *ReplacePolicyOptions { + return &ReplacePolicyOptions{ + PolicyID: core.StringPtr(policyID), + IfMatch: core.StringPtr(ifMatch), + Type: core.StringPtr(typeVar), + Subjects: subjects, + Roles: roles, + Resources: resources, + } +} - // The UTC timestamp when the policy was last modified. - LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` +// SetPolicyID : Allow user to set PolicyID +func (_options *ReplacePolicyOptions) SetPolicyID(policyID string) *ReplacePolicyOptions { + _options.PolicyID = core.StringPtr(policyID) + return _options +} - // The IAM ID of the entity that last modified the policy. - LastModifiedByID *string `json:"last_modified_by_id,omitempty"` +// SetIfMatch : Allow user to set IfMatch +func (_options *ReplacePolicyOptions) SetIfMatch(ifMatch string) *ReplacePolicyOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} - // The policy state. - State *string `json:"state,omitempty"` +// SetType : Allow user to set Type +func (_options *ReplacePolicyOptions) SetType(typeVar string) *ReplacePolicyOptions { + _options.Type = core.StringPtr(typeVar) + return _options +} - // The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned, - // this indicates that the policy is created from and managed by a template in the root enterprise account. - Template *TemplateMetadata `json:"template,omitempty"` +// SetSubjects : Allow user to set Subjects +func (_options *ReplacePolicyOptions) SetSubjects(subjects []PolicySubject) *ReplacePolicyOptions { + _options.Subjects = subjects + return _options } -// Constants associated with the PolicyTemplateMetaData.State property. -// The policy state. -const ( - PolicyTemplateMetaDataStateActiveConst = "active" - PolicyTemplateMetaDataStateDeletedConst = "deleted" -) +// SetRoles : Allow user to set Roles +func (_options *ReplacePolicyOptions) SetRoles(roles []PolicyRole) *ReplacePolicyOptions { + _options.Roles = roles + return _options +} -// UnmarshalPolicyTemplateMetaData unmarshals an instance of PolicyTemplateMetaData from the specified map of raw messages. -func UnmarshalPolicyTemplateMetaData(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(PolicyTemplateMetaData) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "type", &obj.Type) - if err != nil { - err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "description", &obj.Description) - if err != nil { - err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "subjects", &obj.Subjects, UnmarshalPolicySubject) - if err != nil { - err = core.SDKErrorf(err, "", "subjects-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "roles", &obj.Roles, UnmarshalPolicyRole) - if err != nil { - err = core.SDKErrorf(err, "", "roles-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalPolicyResource) - if err != nil { - err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) - if err != nil { - err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) - if err != nil { - err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) - if err != nil { - err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "state", &obj.State) - if err != nil { - err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalTemplateMetadata) - if err != nil { - err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) - return +// SetResources : Allow user to set Resources +func (_options *ReplacePolicyOptions) SetResources(resources []PolicyResource) *ReplacePolicyOptions { + _options.Resources = resources + return _options +} + +// SetDescription : Allow user to set Description +func (_options *ReplacePolicyOptions) SetDescription(description string) *ReplacePolicyOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ReplacePolicyOptions) SetHeaders(param map[string]string) *ReplacePolicyOptions { + options.Headers = param + return options +} + +// ReplacePolicyTemplateOptions : The ReplacePolicyTemplate options. +type ReplacePolicyTemplateOptions struct { + // The policy template ID. + PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="` + + // The policy template version. + Version *string `json:"version" validate:"required,ne="` + + // The revision number for updating a policy template version and must match the Etag value of the existing policy + // template version. The Etag can be retrieved using the GET + // /v1/policy_templates/{policy_template_id}/versions/{version} API and looking at the Etag response header. + IfMatch *string `json:"If-Match" validate:"required"` + + // The core set of properties associated with the template's policy object. + Policy *TemplatePolicy `json:"policy" validate:"required"` + + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes + // the name value for all existing versions of the template. + Name *string `json:"name,omitempty"` + + // Description of the policy template. This is shown to users in the enterprise account. Use this to describe the + // purpose or context of the policy for enterprise users managing IAM templates. + Description *string `json:"description,omitempty"` + + // Committed status of the template version. + Committed *bool `json:"committed,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewReplacePolicyTemplateOptions : Instantiate ReplacePolicyTemplateOptions +func (*IamPolicyManagementV1) NewReplacePolicyTemplateOptions(policyTemplateID string, version string, ifMatch string, policy *TemplatePolicy) *ReplacePolicyTemplateOptions { + return &ReplacePolicyTemplateOptions{ + PolicyTemplateID: core.StringPtr(policyTemplateID), + Version: core.StringPtr(version), + IfMatch: core.StringPtr(ifMatch), + Policy: policy, } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return } -// PolicyTemplateVersionsCollection : A collection of versions for a specific policy template. -type PolicyTemplateVersionsCollection struct { - // The number of documents to include per each page of the collection. - Limit *int64 `json:"limit,omitempty"` +// SetPolicyTemplateID : Allow user to set PolicyTemplateID +func (_options *ReplacePolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *ReplacePolicyTemplateOptions { + _options.PolicyTemplateID = core.StringPtr(policyTemplateID) + return _options +} - // Details with linking href to first page of requested collection. - First *First `json:"first,omitempty"` +// SetVersion : Allow user to set Version +func (_options *ReplacePolicyTemplateOptions) SetVersion(version string) *ReplacePolicyTemplateOptions { + _options.Version = core.StringPtr(version) + return _options +} - // Details with href linking to the following page of requested collection. - Next *Next `json:"next,omitempty"` +// SetIfMatch : Allow user to set IfMatch +func (_options *ReplacePolicyTemplateOptions) SetIfMatch(ifMatch string) *ReplacePolicyTemplateOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} - // Details with linking href to previous page of requested collection. - Previous *Previous `json:"previous,omitempty"` +// SetPolicy : Allow user to set Policy +func (_options *ReplacePolicyTemplateOptions) SetPolicy(policy *TemplatePolicy) *ReplacePolicyTemplateOptions { + _options.Policy = policy + return _options +} - // List of policy templates versions. - Versions []PolicyTemplate `json:"versions" validate:"required"` +// SetName : Allow user to set Name +func (_options *ReplacePolicyTemplateOptions) SetName(name string) *ReplacePolicyTemplateOptions { + _options.Name = core.StringPtr(name) + return _options } -// UnmarshalPolicyTemplateVersionsCollection unmarshals an instance of PolicyTemplateVersionsCollection from the specified map of raw messages. -func UnmarshalPolicyTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(PolicyTemplateVersionsCollection) - err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) - if err != nil { - err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) - if err != nil { - err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) - if err != nil { - err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) - if err != nil { - err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "versions", &obj.Versions, UnmarshalPolicyTemplate) - if err != nil { - err = core.SDKErrorf(err, "", "versions-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return +// SetDescription : Allow user to set Description +func (_options *ReplacePolicyTemplateOptions) SetDescription(description string) *ReplacePolicyTemplateOptions { + _options.Description = core.StringPtr(description) + return _options } -// Retrieve the value to be passed to a request to access the next page of results -func (resp *PolicyTemplateVersionsCollection) GetNextStart() (*string, error) { - if core.IsNil(resp.Next) { - return nil, nil - } - return resp.Next.Start, nil +// SetCommitted : Allow user to set Committed +func (_options *ReplacePolicyTemplateOptions) SetCommitted(committed bool) *ReplacePolicyTemplateOptions { + _options.Committed = core.BoolPtr(committed) + return _options } -// Previous : Details with linking href to previous page of requested collection. -type Previous struct { - // The href linking to the page of requested collection. - Href *string `json:"href,omitempty"` +// SetHeaders : Allow user to set Headers +func (options *ReplacePolicyTemplateOptions) SetHeaders(param map[string]string) *ReplacePolicyTemplateOptions { + options.Headers = param + return options +} - // Page token that refers to the page of the collection. - Start *string `json:"start,omitempty"` +// ReplaceRoleOptions : The ReplaceRole options. +type ReplaceRoleOptions struct { + // The role ID. + RoleID *string `json:"role_id" validate:"required,ne="` + + // The revision number for updating a role and must match the ETag value of the existing role. The Etag can be + // retrieved using the GET /v2/roles/{role_id} API and looking at the ETag response header. + IfMatch *string `json:"If-Match" validate:"required"` + + // The display the name of the role that is shown in the console. + DisplayName *string `json:"display_name" validate:"required"` + + // The actions of the role. For more information, see [IAM roles and + // actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions). + Actions []string `json:"actions" validate:"required"` + + // The description of the role. + Description *string `json:"description,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string } -// UnmarshalPrevious unmarshals an instance of Previous from the specified map of raw messages. -func UnmarshalPrevious(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(Previous) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "start", &obj.Start) - if err != nil { - err = core.SDKErrorf(err, "", "start-error", common.GetComponentInfo()) - return +// NewReplaceRoleOptions : Instantiate ReplaceRoleOptions +func (*IamPolicyManagementV1) NewReplaceRoleOptions(roleID string, ifMatch string, displayName string, actions []string) *ReplaceRoleOptions { + return &ReplaceRoleOptions{ + RoleID: core.StringPtr(roleID), + IfMatch: core.StringPtr(ifMatch), + DisplayName: core.StringPtr(displayName), + Actions: actions, } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return } -// ReplaceActionControlTemplateOptions : The ReplaceActionControlTemplate options. -type ReplaceActionControlTemplateOptions struct { - // Action control template ID. - ActionControlTemplateID *string `json:"action_control_template_id" validate:"required,ne="` +// SetRoleID : Allow user to set RoleID +func (_options *ReplaceRoleOptions) SetRoleID(roleID string) *ReplaceRoleOptions { + _options.RoleID = core.StringPtr(roleID) + return _options +} - // Action control template version. +// SetIfMatch : Allow user to set IfMatch +func (_options *ReplaceRoleOptions) SetIfMatch(ifMatch string) *ReplaceRoleOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + +// SetDisplayName : Allow user to set DisplayName +func (_options *ReplaceRoleOptions) SetDisplayName(displayName string) *ReplaceRoleOptions { + _options.DisplayName = core.StringPtr(displayName) + return _options +} + +// SetActions : Allow user to set Actions +func (_options *ReplaceRoleOptions) SetActions(actions []string) *ReplaceRoleOptions { + _options.Actions = actions + return _options +} + +// SetDescription : Allow user to set Description +func (_options *ReplaceRoleOptions) SetDescription(description string) *ReplaceRoleOptions { + _options.Description = core.StringPtr(description) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ReplaceRoleOptions) SetHeaders(param map[string]string) *ReplaceRoleOptions { + options.Headers = param + return options +} + +// ReplaceRoleTemplateOptions : The ReplaceRoleTemplate options. +type ReplaceRoleTemplateOptions struct { + // Role template ID. + RoleTemplateID *string `json:"role_template_id" validate:"required,ne="` + + // Role template version. Version *string `json:"version" validate:"required,ne="` - // The revision number for updating an action control template version must match the Etag value of the existing action - // control template version. The Etag can be retrieved using the GET - // /v1/action_control_templates/{template_id}/versions/{version} API and looking at the Etag response header. + // The revision number for updating a role template version must match the Etag value of the existing role template + // version. The Etag can be retrieved using the GET /v1/role_templates/{template_id}/versions/{version} API and looking + // at the Etag response header. IfMatch *string `json:"If-Match" validate:"required"` // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it will // change the name value for all existing versions of the template. Name *string `json:"name,omitempty"` - // Description of the action control template. This is shown to users in the enterprise account. Use this to describe - // the purpose or context of the action control for enterprise users managing IAM templates. + // Description of the role template. This is shown to users in the enterprise account. Use this to describe the purpose + // or context of the role for enterprise users managing IAM templates. Description *string `json:"description,omitempty"` - // The action control properties that are created in an action resource when the template is assigned. - ActionControl *TemplateActionControl `json:"action_control,omitempty"` + // The role properties that are created in an action resource when the template is assigned. + Role *TemplateRole `json:"role,omitempty"` // Committed status of the template version. If committed is set to true, then the template version can no longer be // updated. @@ -9489,438 +11687,626 @@ type ReplaceActionControlTemplateOptions struct { Headers map[string]string } -// NewReplaceActionControlTemplateOptions : Instantiate ReplaceActionControlTemplateOptions -func (*IamPolicyManagementV1) NewReplaceActionControlTemplateOptions(actionControlTemplateID string, version string, ifMatch string) *ReplaceActionControlTemplateOptions { - return &ReplaceActionControlTemplateOptions{ - ActionControlTemplateID: core.StringPtr(actionControlTemplateID), +// NewReplaceRoleTemplateOptions : Instantiate ReplaceRoleTemplateOptions +func (*IamPolicyManagementV1) NewReplaceRoleTemplateOptions(roleTemplateID string, version string, ifMatch string) *ReplaceRoleTemplateOptions { + return &ReplaceRoleTemplateOptions{ + RoleTemplateID: core.StringPtr(roleTemplateID), Version: core.StringPtr(version), IfMatch: core.StringPtr(ifMatch), } } -// SetActionControlTemplateID : Allow user to set ActionControlTemplateID -func (_options *ReplaceActionControlTemplateOptions) SetActionControlTemplateID(actionControlTemplateID string) *ReplaceActionControlTemplateOptions { - _options.ActionControlTemplateID = core.StringPtr(actionControlTemplateID) +// SetRoleTemplateID : Allow user to set RoleTemplateID +func (_options *ReplaceRoleTemplateOptions) SetRoleTemplateID(roleTemplateID string) *ReplaceRoleTemplateOptions { + _options.RoleTemplateID = core.StringPtr(roleTemplateID) return _options } // SetVersion : Allow user to set Version -func (_options *ReplaceActionControlTemplateOptions) SetVersion(version string) *ReplaceActionControlTemplateOptions { +func (_options *ReplaceRoleTemplateOptions) SetVersion(version string) *ReplaceRoleTemplateOptions { _options.Version = core.StringPtr(version) return _options } // SetIfMatch : Allow user to set IfMatch -func (_options *ReplaceActionControlTemplateOptions) SetIfMatch(ifMatch string) *ReplaceActionControlTemplateOptions { +func (_options *ReplaceRoleTemplateOptions) SetIfMatch(ifMatch string) *ReplaceRoleTemplateOptions { _options.IfMatch = core.StringPtr(ifMatch) return _options } // SetName : Allow user to set Name -func (_options *ReplaceActionControlTemplateOptions) SetName(name string) *ReplaceActionControlTemplateOptions { +func (_options *ReplaceRoleTemplateOptions) SetName(name string) *ReplaceRoleTemplateOptions { _options.Name = core.StringPtr(name) return _options } // SetDescription : Allow user to set Description -func (_options *ReplaceActionControlTemplateOptions) SetDescription(description string) *ReplaceActionControlTemplateOptions { +func (_options *ReplaceRoleTemplateOptions) SetDescription(description string) *ReplaceRoleTemplateOptions { _options.Description = core.StringPtr(description) return _options } -// SetActionControl : Allow user to set ActionControl -func (_options *ReplaceActionControlTemplateOptions) SetActionControl(actionControl *TemplateActionControl) *ReplaceActionControlTemplateOptions { - _options.ActionControl = actionControl +// SetRole : Allow user to set Role +func (_options *ReplaceRoleTemplateOptions) SetRole(role *TemplateRole) *ReplaceRoleTemplateOptions { + _options.Role = role return _options } // SetCommitted : Allow user to set Committed -func (_options *ReplaceActionControlTemplateOptions) SetCommitted(committed bool) *ReplaceActionControlTemplateOptions { +func (_options *ReplaceRoleTemplateOptions) SetCommitted(committed bool) *ReplaceRoleTemplateOptions { _options.Committed = core.BoolPtr(committed) return _options } // SetHeaders : Allow user to set Headers -func (options *ReplaceActionControlTemplateOptions) SetHeaders(param map[string]string) *ReplaceActionControlTemplateOptions { +func (options *ReplaceRoleTemplateOptions) SetHeaders(param map[string]string) *ReplaceRoleTemplateOptions { options.Headers = param return options } -// ReplacePolicyOptions : The ReplacePolicy options. -type ReplacePolicyOptions struct { +// ReplaceV2PolicyOptions : The ReplaceV2Policy options. +type ReplaceV2PolicyOptions struct { // The policy ID. - PolicyID *string `json:"policy_id" validate:"required,ne="` + ID *string `json:"id" validate:"required,ne="` // The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be - // retrieved using the GET /v1/policies/{policy_id} API and looking at the ETag response header. + // retrieved using the GET /v2/policies/{id} API and looking at the ETag response header. IfMatch *string `json:"If-Match" validate:"required"` + // Specifies the type of access that is granted by the policy. + Control *Control `json:"control" validate:"required"` + // The policy type; either 'access' or 'authorization'. Type *string `json:"type" validate:"required"` - // The subjects associated with a policy. - Subjects []PolicySubject `json:"subjects" validate:"required"` + // Description of the policy. + Description *string `json:"description,omitempty"` - // A set of role Cloud Resource Names (CRNs) granted by the policy. - Roles []PolicyRole `json:"roles" validate:"required"` + // The subject attributes for whom the policy grants access. + Subject *V2PolicySubject `json:"subject,omitempty"` - // The resources associated with a policy. - Resources []PolicyResource `json:"resources" validate:"required"` + // The resource attributes to which the policy grants access. + Resource *V2PolicyResource `json:"resource,omitempty"` - // Customer-defined description. - Description *string `json:"description,omitempty"` + // Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or + // 'time-based-conditions:weekly:custom-hours'. + Pattern *string `json:"pattern,omitempty"` + + // Additional access conditions associated with the policy. + Rule V2PolicyRuleIntf `json:"rule,omitempty"` // Allows users to set headers on API requests. Headers map[string]string } -// NewReplacePolicyOptions : Instantiate ReplacePolicyOptions -func (*IamPolicyManagementV1) NewReplacePolicyOptions(policyID string, ifMatch string, typeVar string, subjects []PolicySubject, roles []PolicyRole, resources []PolicyResource) *ReplacePolicyOptions { - return &ReplacePolicyOptions{ - PolicyID: core.StringPtr(policyID), +// Constants associated with the ReplaceV2PolicyOptions.Type property. +// The policy type; either 'access' or 'authorization'. +const ( + ReplaceV2PolicyOptionsTypeAccessConst = "access" + ReplaceV2PolicyOptionsTypeAuthorizationConst = "authorization" +) + +// NewReplaceV2PolicyOptions : Instantiate ReplaceV2PolicyOptions +func (*IamPolicyManagementV1) NewReplaceV2PolicyOptions(id string, ifMatch string, control *Control, typeVar string) *ReplaceV2PolicyOptions { + return &ReplaceV2PolicyOptions{ + ID: core.StringPtr(id), IfMatch: core.StringPtr(ifMatch), + Control: control, Type: core.StringPtr(typeVar), - Subjects: subjects, - Roles: roles, - Resources: resources, } } -// SetPolicyID : Allow user to set PolicyID -func (_options *ReplacePolicyOptions) SetPolicyID(policyID string) *ReplacePolicyOptions { - _options.PolicyID = core.StringPtr(policyID) +// SetID : Allow user to set ID +func (_options *ReplaceV2PolicyOptions) SetID(id string) *ReplaceV2PolicyOptions { + _options.ID = core.StringPtr(id) return _options } // SetIfMatch : Allow user to set IfMatch -func (_options *ReplacePolicyOptions) SetIfMatch(ifMatch string) *ReplacePolicyOptions { +func (_options *ReplaceV2PolicyOptions) SetIfMatch(ifMatch string) *ReplaceV2PolicyOptions { _options.IfMatch = core.StringPtr(ifMatch) return _options } +// SetControl : Allow user to set Control +func (_options *ReplaceV2PolicyOptions) SetControl(control *Control) *ReplaceV2PolicyOptions { + _options.Control = control + return _options +} + // SetType : Allow user to set Type -func (_options *ReplacePolicyOptions) SetType(typeVar string) *ReplacePolicyOptions { +func (_options *ReplaceV2PolicyOptions) SetType(typeVar string) *ReplaceV2PolicyOptions { _options.Type = core.StringPtr(typeVar) return _options } -// SetSubjects : Allow user to set Subjects -func (_options *ReplacePolicyOptions) SetSubjects(subjects []PolicySubject) *ReplacePolicyOptions { - _options.Subjects = subjects +// SetDescription : Allow user to set Description +func (_options *ReplaceV2PolicyOptions) SetDescription(description string) *ReplaceV2PolicyOptions { + _options.Description = core.StringPtr(description) return _options } -// SetRoles : Allow user to set Roles -func (_options *ReplacePolicyOptions) SetRoles(roles []PolicyRole) *ReplacePolicyOptions { - _options.Roles = roles +// SetSubject : Allow user to set Subject +func (_options *ReplaceV2PolicyOptions) SetSubject(subject *V2PolicySubject) *ReplaceV2PolicyOptions { + _options.Subject = subject return _options } -// SetResources : Allow user to set Resources -func (_options *ReplacePolicyOptions) SetResources(resources []PolicyResource) *ReplacePolicyOptions { - _options.Resources = resources +// SetResource : Allow user to set Resource +func (_options *ReplaceV2PolicyOptions) SetResource(resource *V2PolicyResource) *ReplaceV2PolicyOptions { + _options.Resource = resource return _options } -// SetDescription : Allow user to set Description -func (_options *ReplacePolicyOptions) SetDescription(description string) *ReplacePolicyOptions { - _options.Description = core.StringPtr(description) +// SetPattern : Allow user to set Pattern +func (_options *ReplaceV2PolicyOptions) SetPattern(pattern string) *ReplaceV2PolicyOptions { + _options.Pattern = core.StringPtr(pattern) + return _options +} + +// SetRule : Allow user to set Rule +func (_options *ReplaceV2PolicyOptions) SetRule(rule V2PolicyRuleIntf) *ReplaceV2PolicyOptions { + _options.Rule = rule return _options } // SetHeaders : Allow user to set Headers -func (options *ReplacePolicyOptions) SetHeaders(param map[string]string) *ReplacePolicyOptions { +func (options *ReplaceV2PolicyOptions) SetHeaders(param map[string]string) *ReplaceV2PolicyOptions { options.Headers = param return options } -// ReplacePolicyTemplateOptions : The ReplacePolicyTemplate options. -type ReplacePolicyTemplateOptions struct { - // The policy template ID. - PolicyTemplateID *string `json:"policy_template_id" validate:"required,ne="` - - // The policy template version. - Version *string `json:"version" validate:"required,ne="` - - // The revision number for updating a policy template version and must match the ETag value of the existing policy - // template version. The Etag can be retrieved using the GET - // /v1/policy_templates/{policy_template_id}/versions/{version} API and looking at the ETag response header. - IfMatch *string `json:"If-Match" validate:"required"` - - // The core set of properties associated with the template's policy object. - Policy *TemplatePolicy `json:"policy" validate:"required"` - - // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes - // the name value for all existing versions of the template. - Name *string `json:"name,omitempty"` - - // Description of the policy template. This is shown to users in the enterprise account. Use this to describe the - // purpose or context of the policy for enterprise users managing IAM templates. - Description *string `json:"description,omitempty"` +// ResourceAttribute : An attribute associated with a resource. +type ResourceAttribute struct { + // The name of an attribute. + Name *string `json:"name" validate:"required"` - // Committed status of the template version. - Committed *bool `json:"committed,omitempty"` + // The value of an attribute. + Value *string `json:"value" validate:"required"` - // Allows users to set headers on API requests. - Headers map[string]string + // The operator of an attribute. + Operator *string `json:"operator,omitempty"` } -// NewReplacePolicyTemplateOptions : Instantiate ReplacePolicyTemplateOptions -func (*IamPolicyManagementV1) NewReplacePolicyTemplateOptions(policyTemplateID string, version string, ifMatch string, policy *TemplatePolicy) *ReplacePolicyTemplateOptions { - return &ReplacePolicyTemplateOptions{ - PolicyTemplateID: core.StringPtr(policyTemplateID), - Version: core.StringPtr(version), - IfMatch: core.StringPtr(ifMatch), - Policy: policy, +// NewResourceAttribute : Instantiate ResourceAttribute (Generic Model Constructor) +func (*IamPolicyManagementV1) NewResourceAttribute(name string, value string) (_model *ResourceAttribute, err error) { + _model = &ResourceAttribute{ + Name: core.StringPtr(name), + Value: core.StringPtr(value), } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return } -// SetPolicyTemplateID : Allow user to set PolicyTemplateID -func (_options *ReplacePolicyTemplateOptions) SetPolicyTemplateID(policyTemplateID string) *ReplacePolicyTemplateOptions { - _options.PolicyTemplateID = core.StringPtr(policyTemplateID) - return _options -} - -// SetVersion : Allow user to set Version -func (_options *ReplacePolicyTemplateOptions) SetVersion(version string) *ReplacePolicyTemplateOptions { - _options.Version = core.StringPtr(version) - return _options -} - -// SetIfMatch : Allow user to set IfMatch -func (_options *ReplacePolicyTemplateOptions) SetIfMatch(ifMatch string) *ReplacePolicyTemplateOptions { - _options.IfMatch = core.StringPtr(ifMatch) - return _options +// UnmarshalResourceAttribute unmarshals an instance of ResourceAttribute from the specified map of raw messages. +func UnmarshalResourceAttribute(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ResourceAttribute) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "operator", &obj.Operator) + if err != nil { + err = core.SDKErrorf(err, "", "operator-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetPolicy : Allow user to set Policy -func (_options *ReplacePolicyTemplateOptions) SetPolicy(policy *TemplatePolicy) *ReplacePolicyTemplateOptions { - _options.Policy = policy - return _options -} +// ResourceTag : A tag associated with a resource. +type ResourceTag struct { + // The name of an access management tag. + Name *string `json:"name" validate:"required"` -// SetName : Allow user to set Name -func (_options *ReplacePolicyTemplateOptions) SetName(name string) *ReplacePolicyTemplateOptions { - _options.Name = core.StringPtr(name) - return _options -} + // The value of an access management tag. + Value *string `json:"value" validate:"required"` -// SetDescription : Allow user to set Description -func (_options *ReplacePolicyTemplateOptions) SetDescription(description string) *ReplacePolicyTemplateOptions { - _options.Description = core.StringPtr(description) - return _options + // The operator of an access management tag. + Operator *string `json:"operator,omitempty"` } -// SetCommitted : Allow user to set Committed -func (_options *ReplacePolicyTemplateOptions) SetCommitted(committed bool) *ReplacePolicyTemplateOptions { - _options.Committed = core.BoolPtr(committed) - return _options +// NewResourceTag : Instantiate ResourceTag (Generic Model Constructor) +func (*IamPolicyManagementV1) NewResourceTag(name string, value string) (_model *ResourceTag, err error) { + _model = &ResourceTag{ + Name: core.StringPtr(name), + Value: core.StringPtr(value), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return } -// SetHeaders : Allow user to set Headers -func (options *ReplacePolicyTemplateOptions) SetHeaders(param map[string]string) *ReplacePolicyTemplateOptions { - options.Headers = param - return options +// UnmarshalResourceTag unmarshals an instance of ResourceTag from the specified map of raw messages. +func UnmarshalResourceTag(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ResourceTag) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "operator", &obj.Operator) + if err != nil { + err = core.SDKErrorf(err, "", "operator-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// ReplaceRoleOptions : The ReplaceRole options. -type ReplaceRoleOptions struct { - // The role ID. - RoleID *string `json:"role_id" validate:"required,ne="` - - // The revision number for updating a role and must match the ETag value of the existing role. The Etag can be - // retrieved using the GET /v2/roles/{role_id} API and looking at the ETag response header. - IfMatch *string `json:"If-Match" validate:"required"` - +// Role : A role resource. +type Role struct { // The display the name of the role that is shown in the console. DisplayName *string `json:"display_name" validate:"required"` + // The description of the role. + Description *string `json:"description,omitempty"` + // The actions of the role. For more information, see [IAM roles and // actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions). Actions []string `json:"actions" validate:"required"` - // The description of the role. - Description *string `json:"description,omitempty"` - - // Allows users to set headers on API requests. - Headers map[string]string + // The role Cloud Resource Name (CRN). Example CRN: + // 'crn:v1:ibmcloud:public:iam-access-management::a/exampleAccountId::customRole:ExampleRoleName'. + CRN *string `json:"crn,omitempty"` } -// NewReplaceRoleOptions : Instantiate ReplaceRoleOptions -func (*IamPolicyManagementV1) NewReplaceRoleOptions(roleID string, ifMatch string, displayName string, actions []string) *ReplaceRoleOptions { - return &ReplaceRoleOptions{ - RoleID: core.StringPtr(roleID), - IfMatch: core.StringPtr(ifMatch), +// NewRole : Instantiate Role (Generic Model Constructor) +func (*IamPolicyManagementV1) NewRole(displayName string, actions []string) (_model *Role, err error) { + _model = &Role{ DisplayName: core.StringPtr(displayName), Actions: actions, } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalRole unmarshals an instance of Role from the specified map of raw messages. +func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(Role) + err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) + if err != nil { + err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "actions", &obj.Actions) + if err != nil { + err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetRoleID : Allow user to set RoleID -func (_options *ReplaceRoleOptions) SetRoleID(roleID string) *ReplaceRoleOptions { - _options.RoleID = core.StringPtr(roleID) - return _options -} +// RoleAction : An action that can be performed by the policy subject when assigned a role. +type RoleAction struct { + // Unique identifier for action with structure service.resource.action. For example, cbr.rule.read. + ID *string `json:"id" validate:"required"` -// SetIfMatch : Allow user to set IfMatch -func (_options *ReplaceRoleOptions) SetIfMatch(ifMatch string) *ReplaceRoleOptions { - _options.IfMatch = core.StringPtr(ifMatch) - return _options -} + // Services defined display name for action. + DisplayName *string `json:"display_name" validate:"required"` -// SetDisplayName : Allow user to set DisplayName -func (_options *ReplaceRoleOptions) SetDisplayName(displayName string) *ReplaceRoleOptions { - _options.DisplayName = core.StringPtr(displayName) - return _options + // Service defined description for action. + Description *string `json:"description" validate:"required"` } -// SetActions : Allow user to set Actions -func (_options *ReplaceRoleOptions) SetActions(actions []string) *ReplaceRoleOptions { - _options.Actions = actions - return _options +// UnmarshalRoleAction unmarshals an instance of RoleAction from the specified map of raw messages. +func UnmarshalRoleAction(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAction) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) + if err != nil { + err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetDescription : Allow user to set Description -func (_options *ReplaceRoleOptions) SetDescription(description string) *ReplaceRoleOptions { - _options.Description = core.StringPtr(description) - return _options -} +// RoleAssignment : The set of properties associated with the assigned role template. +type RoleAssignment struct { + // Action control assignment ID. + ID *string `json:"id,omitempty"` -// SetHeaders : Allow user to set Headers -func (options *ReplaceRoleOptions) SetHeaders(param map[string]string) *ReplaceRoleOptions { - options.Headers = param - return options -} + // The account GUID that the role assignments belong to. + AccountID *string `json:"account_id,omitempty"` -// ReplaceV2PolicyOptions : The ReplaceV2Policy options. -type ReplaceV2PolicyOptions struct { - // The policy ID. - ID *string `json:"id" validate:"required,ne="` + // The href URL that links to the role assignments API by role assignment ID. + Href *string `json:"href,omitempty"` - // The revision number for updating a policy and must match the ETag value of the existing policy. The Etag can be - // retrieved using the GET /v2/policies/{id} API and looking at the ETag response header. - IfMatch *string `json:"If-Match" validate:"required"` + // The UTC timestamp when the role assignment was created. + CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - // Specifies the type of access that is granted by the policy. - Control *Control `json:"control" validate:"required"` + // The IAM ID of the entity that created the role assignment. + CreatedByID *string `json:"created_by_id,omitempty"` - // The policy type; either 'access' or 'authorization'. - Type *string `json:"type" validate:"required"` + // The UTC timestamp when the role assignment was last modified. + LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` - // Description of the policy. - Description *string `json:"description,omitempty"` + // The IAM ID of the entity that last modified the role assignment. + LastModifiedByID *string `json:"last_modified_by_id,omitempty"` - // The subject attributes for whom the policy grants access. - Subject *V2PolicySubject `json:"subject,omitempty"` + // The current operation of the role assignment. + Operation *string `json:"operation,omitempty"` - // The resource attributes to which the policy grants access. - Resource *V2PolicyResource `json:"resource,omitempty"` + // Resources created when role template is assigned. + Resources []RoleAssignmentResource `json:"resources,omitempty"` - // Indicates pattern of rule, either 'time-based-conditions:once', 'time-based-conditions:weekly:all-day', or - // 'time-based-conditions:weekly:custom-hours'. - Pattern *string `json:"pattern,omitempty"` + // The role template id and version that will be assigned. + Template *RoleAssignmentTemplate `json:"template" validate:"required"` - // Additional access conditions associated with the policy. - Rule V2PolicyRuleIntf `json:"rule,omitempty"` + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` - // Allows users to set headers on API requests. - Headers map[string]string + // The role assignment status. + Status *string `json:"status,omitempty"` } -// Constants associated with the ReplaceV2PolicyOptions.Type property. -// The policy type; either 'access' or 'authorization'. +// Constants associated with the RoleAssignment.Operation property. +// The current operation of the role assignment. const ( - ReplaceV2PolicyOptionsTypeAccessConst = "access" - ReplaceV2PolicyOptionsTypeAuthorizationConst = "authorization" + RoleAssignmentOperationApplyConst = "apply" + RoleAssignmentOperationCreateConst = "create" + RoleAssignmentOperationRemoveConst = "remove" + RoleAssignmentOperationUpdateConst = "update" ) -// NewReplaceV2PolicyOptions : Instantiate ReplaceV2PolicyOptions -func (*IamPolicyManagementV1) NewReplaceV2PolicyOptions(id string, ifMatch string, control *Control, typeVar string) *ReplaceV2PolicyOptions { - return &ReplaceV2PolicyOptions{ - ID: core.StringPtr(id), - IfMatch: core.StringPtr(ifMatch), - Control: control, - Type: core.StringPtr(typeVar), +// Constants associated with the RoleAssignment.Status property. +// The role assignment status. +const ( + RoleAssignmentStatusAcceptedConst = "accepted" + RoleAssignmentStatusFailureConst = "failure" + RoleAssignmentStatusInProgressConst = "in_progress" + RoleAssignmentStatusSupersededConst = "superseded" +) + +// UnmarshalRoleAssignment unmarshals an instance of RoleAssignment from the specified map of raw messages. +func UnmarshalRoleAssignment(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignment) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) + if err != nil { + err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) + if err != nil { + err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "operation", &obj.Operation) + if err != nil { + err = core.SDKErrorf(err, "", "operation-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalRoleAssignmentResource) + if err != nil { + err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalRoleAssignmentTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) + return } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetID : Allow user to set ID -func (_options *ReplaceV2PolicyOptions) SetID(id string) *ReplaceV2PolicyOptions { - _options.ID = core.StringPtr(id) - return _options -} +// RoleAssignmentCollection : A collection of role assignments. +type RoleAssignmentCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` -// SetIfMatch : Allow user to set IfMatch -func (_options *ReplaceV2PolicyOptions) SetIfMatch(ifMatch string) *ReplaceV2PolicyOptions { - _options.IfMatch = core.StringPtr(ifMatch) - return _options -} + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` -// SetControl : Allow user to set Control -func (_options *ReplaceV2PolicyOptions) SetControl(control *Control) *ReplaceV2PolicyOptions { - _options.Control = control - return _options + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of role assignments. + Assignments []RoleAssignment `json:"assignments" validate:"required"` } -// SetType : Allow user to set Type -func (_options *ReplaceV2PolicyOptions) SetType(typeVar string) *ReplaceV2PolicyOptions { - _options.Type = core.StringPtr(typeVar) - return _options +// UnmarshalRoleAssignmentCollection unmarshals an instance of RoleAssignmentCollection from the specified map of raw messages. +func UnmarshalRoleAssignmentCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignmentCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "assignments", &obj.Assignments, UnmarshalRoleAssignment) + if err != nil { + err = core.SDKErrorf(err, "", "assignments-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetDescription : Allow user to set Description -func (_options *ReplaceV2PolicyOptions) SetDescription(description string) *ReplaceV2PolicyOptions { - _options.Description = core.StringPtr(description) - return _options +// Retrieve the value to be passed to a request to access the next page of results +func (resp *RoleAssignmentCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil } -// SetSubject : Allow user to set Subject -func (_options *ReplaceV2PolicyOptions) SetSubject(subject *V2PolicySubject) *ReplaceV2PolicyOptions { - _options.Subject = subject - return _options +// RoleAssignmentResource : The role assignment resources and target where the template is assigned. +type RoleAssignmentResource struct { + // assignment target account and type. + Target *AssignmentTargetDetails `json:"target" validate:"required"` + + // Set of properties of the assigned resource or error message if assignment failed. + Role *RoleAssignmentResourceRole `json:"role,omitempty"` } -// SetResource : Allow user to set Resource -func (_options *ReplaceV2PolicyOptions) SetResource(resource *V2PolicyResource) *ReplaceV2PolicyOptions { - _options.Resource = resource - return _options +// UnmarshalRoleAssignmentResource unmarshals an instance of RoleAssignmentResource from the specified map of raw messages. +func UnmarshalRoleAssignmentResource(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignmentResource) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalAssignmentTargetDetails) + if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "role", &obj.Role, UnmarshalRoleAssignmentResourceRole) + if err != nil { + err = core.SDKErrorf(err, "", "role-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetPattern : Allow user to set Pattern -func (_options *ReplaceV2PolicyOptions) SetPattern(pattern string) *ReplaceV2PolicyOptions { - _options.Pattern = core.StringPtr(pattern) - return _options +// RoleAssignmentResourceCreated : On success, it includes the role assigned. +type RoleAssignmentResourceCreated struct { + // role id. + ID *string `json:"id,omitempty"` } -// SetRule : Allow user to set Rule -func (_options *ReplaceV2PolicyOptions) SetRule(rule V2PolicyRuleIntf) *ReplaceV2PolicyOptions { - _options.Rule = rule - return _options +// UnmarshalRoleAssignmentResourceCreated unmarshals an instance of RoleAssignmentResourceCreated from the specified map of raw messages. +func UnmarshalRoleAssignmentResourceCreated(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignmentResourceCreated) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -// SetHeaders : Allow user to set Headers -func (options *ReplaceV2PolicyOptions) SetHeaders(param map[string]string) *ReplaceV2PolicyOptions { - options.Headers = param - return options +// RoleAssignmentResourceRole : Set of properties of the assigned resource or error message if assignment failed. +type RoleAssignmentResourceRole struct { + // On success, it includes the role assigned. + ResourceCreated *RoleAssignmentResourceCreated `json:"resource_created,omitempty"` + + // Body parameters for assignment error. + ErrorMessage *AssignmentResourceError `json:"error_message,omitempty"` } -// ResourceAttribute : An attribute associated with a resource. -type ResourceAttribute struct { - // The name of an attribute. - Name *string `json:"name" validate:"required"` +// UnmarshalRoleAssignmentResourceRole unmarshals an instance of RoleAssignmentResourceRole from the specified map of raw messages. +func UnmarshalRoleAssignmentResourceRole(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignmentResourceRole) + err = core.UnmarshalModel(m, "resource_created", &obj.ResourceCreated, UnmarshalRoleAssignmentResourceCreated) + if err != nil { + err = core.SDKErrorf(err, "", "resource_created-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "error_message", &obj.ErrorMessage, UnmarshalAssignmentResourceError) + if err != nil { + err = core.SDKErrorf(err, "", "error_message-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} - // The value of an attribute. - Value *string `json:"value" validate:"required"` +// RoleAssignmentTemplate : The role template id and version that will be assigned. +type RoleAssignmentTemplate struct { + // Action control template ID. + ID *string `json:"id" validate:"required"` - // The operator of an attribute. - Operator *string `json:"operator,omitempty"` + // Action control template version. + Version *string `json:"version" validate:"required"` } -// NewResourceAttribute : Instantiate ResourceAttribute (Generic Model Constructor) -func (*IamPolicyManagementV1) NewResourceAttribute(name string, value string) (_model *ResourceAttribute, err error) { - _model = &ResourceAttribute{ - Name: core.StringPtr(name), - Value: core.StringPtr(value), +// NewRoleAssignmentTemplate : Instantiate RoleAssignmentTemplate (Generic Model Constructor) +func (*IamPolicyManagementV1) NewRoleAssignmentTemplate(id string, version string) (_model *RoleAssignmentTemplate, err error) { + _model = &RoleAssignmentTemplate{ + ID: core.StringPtr(id), + Version: core.StringPtr(version), } err = core.ValidateStruct(_model, "required parameters") if err != nil { @@ -9929,95 +12315,260 @@ func (*IamPolicyManagementV1) NewResourceAttribute(name string, value string) (_ return } -// UnmarshalResourceAttribute unmarshals an instance of ResourceAttribute from the specified map of raw messages. -func UnmarshalResourceAttribute(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ResourceAttribute) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) +// UnmarshalRoleAssignmentTemplate unmarshals an instance of RoleAssignmentTemplate from the specified map of raw messages. +func UnmarshalRoleAssignmentTemplate(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleAssignmentTemplate) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "value", &obj.Value) + err = core.UnmarshalPrimitive(m, "version", &obj.Version) if err != nil { - err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "operator", &obj.Operator) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// RoleCollection : A collection of roles returned by the 'list roles' operation. +type RoleCollection struct { + // List of custom roles. + CustomRoles []CustomRole `json:"custom_roles" validate:"required"` + + // List of service roles. + ServiceRoles []Role `json:"service_roles" validate:"required"` + + // List of system roles. + SystemRoles []Role `json:"system_roles" validate:"required"` +} + +// UnmarshalRoleCollection unmarshals an instance of RoleCollection from the specified map of raw messages. +func UnmarshalRoleCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleCollection) + err = core.UnmarshalModel(m, "custom_roles", &obj.CustomRoles, UnmarshalCustomRole) if err != nil { - err = core.SDKErrorf(err, "", "operator-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "custom_roles-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "service_roles", &obj.ServiceRoles, UnmarshalRole) + if err != nil { + err = core.SDKErrorf(err, "", "service_roles-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "system_roles", &obj.SystemRoles, UnmarshalRole) + if err != nil { + err = core.SDKErrorf(err, "", "system_roles-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// ResourceTag : A tag associated with a resource. -type ResourceTag struct { - // The name of an access management tag. +// RoleTemplate : The set of properties associated with the role template. +type RoleTemplate struct { + // Required field when creating a new template. Otherwise, this field is optional. If the field is included, it changes + // the name value for all existing versions of the template. Name *string `json:"name" validate:"required"` - // The value of an access management tag. - Value *string `json:"value" validate:"required"` + // Description of the role template. This is shown to users in the enterprise account. Use this to describe the purpose + // or context of the role for enterprise users managing IAM templates. + Description *string `json:"description" validate:"required"` - // The operator of an access management tag. - Operator *string `json:"operator,omitempty"` + // Enterprise account ID where this template is created. + AccountID *string `json:"account_id" validate:"required"` + + // Committed status of the template. If committed is set to true, then the template version can no longer be updated. + Committed *bool `json:"committed,omitempty"` + + // The role properties that are created in an action resource when the template is assigned. + Role *RoleTemplatePrototypeRole `json:"role,omitempty"` + + // The role template ID. + ID *string `json:"id,omitempty"` + + // The href URL that links to the role templates API by role template ID. + Href *string `json:"href,omitempty"` + + // The UTC timestamp when the role template was created. + CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` + + // The IAM ID of the entity that created the role template. + CreatedByID *string `json:"created_by_id,omitempty"` + + // The UTC timestamp when the role template was last modified. + LastModifiedAt *strfmt.DateTime `json:"last_modified_at,omitempty"` + + // The IAM ID of the entity that last modified the role template. + LastModifiedByID *string `json:"last_modified_by_id,omitempty"` + + // The version number of the template used to identify different versions of same template. + Version *string `json:"version" validate:"required"` + + // State of role template. + State *string `json:"state" validate:"required"` } -// NewResourceTag : Instantiate ResourceTag (Generic Model Constructor) -func (*IamPolicyManagementV1) NewResourceTag(name string, value string) (_model *ResourceTag, err error) { - _model = &ResourceTag{ - Name: core.StringPtr(name), - Value: core.StringPtr(value), +// Constants associated with the RoleTemplate.State property. +// State of role template. +const ( + RoleTemplateStateActiveConst = "active" + RoleTemplateStateDeletedConst = "deleted" +) + +// UnmarshalRoleTemplate unmarshals an instance of RoleTemplate from the specified map of raw messages. +func UnmarshalRoleTemplate(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleTemplate) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return } - err = core.ValidateStruct(_model, "required parameters") + err = core.UnmarshalPrimitive(m, "description", &obj.Description) if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "account_id", &obj.AccountID) + if err != nil { + err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "committed", &obj.Committed) + if err != nil { + err = core.SDKErrorf(err, "", "committed-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "role", &obj.Role, UnmarshalRoleTemplatePrototypeRole) + if err != nil { + err = core.SDKErrorf(err, "", "role-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_by_id", &obj.CreatedByID) + if err != nil { + err = core.SDKErrorf(err, "", "created_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_at", &obj.LastModifiedAt) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "last_modified_by_id", &obj.LastModifiedByID) + if err != nil { + err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "version", &obj.Version) + if err != nil { + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "state", &obj.State) + if err != nil { + err = core.SDKErrorf(err, "", "state-error", common.GetComponentInfo()) + return } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// UnmarshalResourceTag unmarshals an instance of ResourceTag from the specified map of raw messages. -func UnmarshalResourceTag(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ResourceTag) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) +// RoleTemplateCollection : A collection of role templates. +type RoleTemplateCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` + + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` + + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of role templates. + RoleTemplates []RoleTemplate `json:"role_templates" validate:"required"` +} + +// UnmarshalRoleTemplateCollection unmarshals an instance of RoleTemplateCollection from the specified map of raw messages. +func UnmarshalRoleTemplateCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleTemplateCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "value", &obj.Value) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) if err != nil { - err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "operator", &obj.Operator) + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) if err != nil { - err = core.SDKErrorf(err, "", "operator-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "role_templates", &obj.RoleTemplates, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "role_templates-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// Role : A role resource. -type Role struct { +// Retrieve the value to be passed to a request to access the next page of results +func (resp *RoleTemplateCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + +// RoleTemplatePrototypeRole : The role properties that are created in an action resource when the template is assigned. +type RoleTemplatePrototypeRole struct { + // The name of the role that is used in the CRN. This must be alphanumeric and capitalized. + Name *string `json:"name" validate:"required"` + // The display the name of the role that is shown in the console. DisplayName *string `json:"display_name" validate:"required"` - // The description of the role. + // The service name that the role refers. + ServiceName *string `json:"service_name,omitempty"` + + // Description of the role. Description *string `json:"description,omitempty"` - // The actions of the role. For more information, see [IAM roles and - // actions](https://cloud.ibm.com/docs/account?topic=account-iam-service-roles-actions). + // The actions of the role. Actions []string `json:"actions" validate:"required"` - - // The role Cloud Resource Name (CRN). Example CRN: - // 'crn:v1:ibmcloud:public:iam-access-management::a/exampleAccountId::customRole:ExampleRoleName'. - CRN *string `json:"crn,omitempty"` } -// NewRole : Instantiate Role (Generic Model Constructor) -func (*IamPolicyManagementV1) NewRole(displayName string, actions []string) (_model *Role, err error) { - _model = &Role{ +// NewRoleTemplatePrototypeRole : Instantiate RoleTemplatePrototypeRole (Generic Model Constructor) +func (*IamPolicyManagementV1) NewRoleTemplatePrototypeRole(name string, displayName string, actions []string) (_model *RoleTemplatePrototypeRole, err error) { + _model = &RoleTemplatePrototypeRole{ + Name: core.StringPtr(name), DisplayName: core.StringPtr(displayName), Actions: actions, } @@ -10028,14 +12579,24 @@ func (*IamPolicyManagementV1) NewRole(displayName string, actions []string) (_mo return } -// UnmarshalRole unmarshals an instance of Role from the specified map of raw messages. -func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(Role) +// UnmarshalRoleTemplatePrototypeRole unmarshals an instance of RoleTemplatePrototypeRole from the specified map of raw messages. +func UnmarshalRoleTemplatePrototypeRole(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleTemplatePrototypeRole) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) if err != nil { err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "service_name", &obj.ServiceName) + if err != nil { + err = core.SDKErrorf(err, "", "service_name-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "description", &obj.Description) if err != nil { err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) @@ -10046,83 +12607,107 @@ func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error) err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) - return - } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// RoleAction : An action that can be performed by the policy subject when assigned a role. -type RoleAction struct { - // Unique identifier for action with structure service.resource.action. For example, cbr.rule.read. +// RoleTemplateReferencesItem : A role template reference associated with a policy template. +type RoleTemplateReferencesItem struct { + // The role template ID. ID *string `json:"id" validate:"required"` - // Services defined display name for action. - DisplayName *string `json:"display_name" validate:"required"` + // Role template version. + Version *string `json:"version" validate:"required"` +} - // Service defined description for action. - Description *string `json:"description" validate:"required"` +// NewRoleTemplateReferencesItem : Instantiate RoleTemplateReferencesItem (Generic Model Constructor) +func (*IamPolicyManagementV1) NewRoleTemplateReferencesItem(id string, version string) (_model *RoleTemplateReferencesItem, err error) { + _model = &RoleTemplateReferencesItem{ + ID: core.StringPtr(id), + Version: core.StringPtr(version), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return } -// UnmarshalRoleAction unmarshals an instance of RoleAction from the specified map of raw messages. -func UnmarshalRoleAction(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(RoleAction) +// UnmarshalRoleTemplateReferencesItem unmarshals an instance of RoleTemplateReferencesItem from the specified map of raw messages. +func UnmarshalRoleTemplateReferencesItem(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleTemplateReferencesItem) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) - if err != nil { - err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "description", &obj.Description) + err = core.UnmarshalPrimitive(m, "version", &obj.Version) if err != nil { - err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "version-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } -// RoleCollection : A collection of roles returned by the 'list roles' operation. -type RoleCollection struct { - // List of custom roles. - CustomRoles []CustomRole `json:"custom_roles" validate:"required"` +// RoleTemplateVersionsCollection : A collection of versions for a specific role template. +type RoleTemplateVersionsCollection struct { + // The number of documents to include per each page of the collection. + Limit *int64 `json:"limit,omitempty"` - // List of service roles. - ServiceRoles []Role `json:"service_roles" validate:"required"` + // Details with linking href to first page of requested collection. + First *First `json:"first,omitempty"` - // List of system roles. - SystemRoles []Role `json:"system_roles" validate:"required"` + // Details with href linking to the following page of requested collection. + Next *Next `json:"next,omitempty"` + + // Details with linking href to previous page of requested collection. + Previous *Previous `json:"previous,omitempty"` + + // List of role templates versions. + Versions []RoleTemplate `json:"versions" validate:"required"` } -// UnmarshalRoleCollection unmarshals an instance of RoleCollection from the specified map of raw messages. -func UnmarshalRoleCollection(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(RoleCollection) - err = core.UnmarshalModel(m, "custom_roles", &obj.CustomRoles, UnmarshalCustomRole) +// UnmarshalRoleTemplateVersionsCollection unmarshals an instance of RoleTemplateVersionsCollection from the specified map of raw messages. +func UnmarshalRoleTemplateVersionsCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoleTemplateVersionsCollection) + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { - err = core.SDKErrorf(err, "", "custom_roles-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "service_roles", &obj.ServiceRoles, UnmarshalRole) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFirst) if err != nil { - err = core.SDKErrorf(err, "", "service_roles-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "system_roles", &obj.SystemRoles, UnmarshalRole) + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNext) if err != nil { - err = core.SDKErrorf(err, "", "system_roles-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "previous", &obj.Previous, UnmarshalPrevious) + if err != nil { + err = core.SDKErrorf(err, "", "previous-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "versions", &obj.Versions, UnmarshalRoleTemplate) + if err != nil { + err = core.SDKErrorf(err, "", "versions-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } +// Retrieve the value to be passed to a request to access the next page of results +func (resp *RoleTemplateVersionsCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + return resp.Next.Start, nil +} + // Roles : A role associated with a policy. type Roles struct { // The role Cloud Resource Name (CRN) granted by the policy. Example CRN: 'crn:v1:bluemix:public:iam::::role:Editor'. @@ -10312,6 +12897,36 @@ func UnmarshalTemplateActionControl(m map[string]json.RawMessage, result interfa return } +// TemplateControl : Specifies the type of access that is granted by the policy. +type TemplateControl struct { + // Permission is granted by the policy. + Grant TemplateGrantIntf `json:"grant" validate:"required"` +} + +// NewTemplateControl : Instantiate TemplateControl (Generic Model Constructor) +func (*IamPolicyManagementV1) NewTemplateControl(grant TemplateGrantIntf) (_model *TemplateControl, err error) { + _model = &TemplateControl{ + Grant: grant, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalTemplateControl unmarshals an instance of TemplateControl from the specified map of raw messages. +func UnmarshalTemplateControl(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateControl) + err = core.UnmarshalModel(m, "grant", &obj.Grant, UnmarshalTemplateGrant) + if err != nil { + err = core.SDKErrorf(err, "", "grant-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // TemplateCountData : policy template count details. type TemplateCountData struct { // policy template current and limit details with in an account. @@ -10338,6 +12953,42 @@ func UnmarshalTemplateCountData(m map[string]json.RawMessage, result interface{} return } +// TemplateGrant : Permission is granted by the policy. +// Models which "extend" this model: +// - TemplateGrantRoles +// - TemplateGrantRoleReferences +type TemplateGrant struct { + // A set of role Cloud Resource Names (CRNs) granted by the policy. + Roles []Roles `json:"roles,omitempty"` + + // A set of role template reference IDs granted by the policy. + RoleTemplateReferences []RoleTemplateReferencesItem `json:"role_template_references,omitempty"` +} +func (*TemplateGrant) isaTemplateGrant() bool { + return true +} + +type TemplateGrantIntf interface { + isaTemplateGrant() bool +} + +// UnmarshalTemplateGrant unmarshals an instance of TemplateGrant from the specified map of raw messages. +func UnmarshalTemplateGrant(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateGrant) + err = core.UnmarshalModel(m, "roles", &obj.Roles, UnmarshalRoles) + if err != nil { + err = core.SDKErrorf(err, "", "roles-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "role_template_references", &obj.RoleTemplateReferences, UnmarshalRoleTemplateReferencesItem) + if err != nil { + err = core.SDKErrorf(err, "", "role_template_references-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // TemplateMetadata : The details of the IAM template that was used to create an enterprise-managed policy in your account. When returned, // this indicates that the policy is created from and managed by a template in the root enterprise account. type TemplateMetadata struct { @@ -10412,7 +13063,7 @@ type TemplatePolicy struct { Rule V2PolicyRuleIntf `json:"rule,omitempty"` // Specifies the type of access that is granted by the policy. - Control *Control `json:"control,omitempty"` + Control *TemplateControl `json:"control,omitempty"` } // Constants associated with the TemplatePolicy.Type property. @@ -10467,7 +13118,7 @@ func UnmarshalTemplatePolicy(m map[string]json.RawMessage, result interface{}) ( err = core.SDKErrorf(err, "", "rule-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "control", &obj.Control, UnmarshalControl) + err = core.UnmarshalModel(m, "control", &obj.Control, UnmarshalTemplateControl) if err != nil { err = core.SDKErrorf(err, "", "control-error", common.GetComponentInfo()) return @@ -10476,6 +13127,61 @@ func UnmarshalTemplatePolicy(m map[string]json.RawMessage, result interface{}) ( return } +// TemplateRole : The role properties that are created in an action resource when the template is assigned. +type TemplateRole struct { + // The display the name of the role that is shown in the console. + DisplayName *string `json:"display_name" validate:"required"` + + // The service name that the role refers. + ServiceName *string `json:"service_name,omitempty"` + + // Description of the role. + Description *string `json:"description,omitempty"` + + // The actions of the role. + Actions []string `json:"actions" validate:"required"` +} + +// NewTemplateRole : Instantiate TemplateRole (Generic Model Constructor) +func (*IamPolicyManagementV1) NewTemplateRole(displayName string, actions []string) (_model *TemplateRole, err error) { + _model = &TemplateRole{ + DisplayName: core.StringPtr(displayName), + Actions: actions, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalTemplateRole unmarshals an instance of TemplateRole from the specified map of raw messages. +func UnmarshalTemplateRole(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateRole) + err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName) + if err != nil { + err = core.SDKErrorf(err, "", "display_name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "service_name", &obj.ServiceName) + if err != nil { + err = core.SDKErrorf(err, "", "service_name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + err = core.SDKErrorf(err, "", "description-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "actions", &obj.Actions) + if err != nil { + err = core.SDKErrorf(err, "", "actions-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // UpdateActionControlAssignmentOptions : The UpdateActionControlAssignment options. type UpdateActionControlAssignmentOptions struct { // Action control template assignment ID. @@ -10641,6 +13347,56 @@ func (options *UpdatePolicyStateOptions) SetHeaders(param map[string]string) *Up return options } +// UpdateRoleAssignmentOptions : The UpdateRoleAssignment options. +type UpdateRoleAssignmentOptions struct { + // Role template assignment ID. + AssignmentID *string `json:"assignment_id" validate:"required,ne="` + + // The revision number for updating a role assignment and must match the Etag value of the existing role assignment. + // The Etag can be retrieved using the GET /v1/role_assignments/{assignment_id} API and looking at the Etag response + // header. + IfMatch *string `json:"If-Match" validate:"required"` + + // The version number of the template used to identify different versions of same template. + TemplateVersion *string `json:"template_version" validate:"required"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewUpdateRoleAssignmentOptions : Instantiate UpdateRoleAssignmentOptions +func (*IamPolicyManagementV1) NewUpdateRoleAssignmentOptions(assignmentID string, ifMatch string, templateVersion string) *UpdateRoleAssignmentOptions { + return &UpdateRoleAssignmentOptions{ + AssignmentID: core.StringPtr(assignmentID), + IfMatch: core.StringPtr(ifMatch), + TemplateVersion: core.StringPtr(templateVersion), + } +} + +// SetAssignmentID : Allow user to set AssignmentID +func (_options *UpdateRoleAssignmentOptions) SetAssignmentID(assignmentID string) *UpdateRoleAssignmentOptions { + _options.AssignmentID = core.StringPtr(assignmentID) + return _options +} + +// SetIfMatch : Allow user to set IfMatch +func (_options *UpdateRoleAssignmentOptions) SetIfMatch(ifMatch string) *UpdateRoleAssignmentOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + +// SetTemplateVersion : Allow user to set TemplateVersion +func (_options *UpdateRoleAssignmentOptions) SetTemplateVersion(templateVersion string) *UpdateRoleAssignmentOptions { + _options.TemplateVersion = core.StringPtr(templateVersion) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *UpdateRoleAssignmentOptions) SetHeaders(param map[string]string) *UpdateRoleAssignmentOptions { + options.Headers = param + return options +} + // UpdateSettingsOptions : The UpdateSettings options. type UpdateSettingsOptions struct { // The account GUID that the settings belong to. @@ -11816,24 +14572,94 @@ func UnmarshalPolicyTemplateAssignmentItemsPolicyAssignmentV1(m map[string]json. err = core.SDKErrorf(err, "", "last_modified_by_id-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalPolicyAssignmentV1Resources) + err = core.UnmarshalModel(m, "resources", &obj.Resources, UnmarshalPolicyAssignmentV1Resources) + if err != nil { + err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "subject", &obj.Subject, UnmarshalPolicyAssignmentV1Subject) + if err != nil { + err = core.SDKErrorf(err, "", "subject-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalAssignmentTemplateDetails) + if err != nil { + err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// TemplateGrantRoleReferences : TemplateGrantRoleReferences struct +// This model "extends" TemplateGrant +type TemplateGrantRoleReferences struct { + // A set of role template reference IDs granted by the policy. + RoleTemplateReferences []RoleTemplateReferencesItem `json:"role_template_references" validate:"required"` +} + +// NewTemplateGrantRoleReferences : Instantiate TemplateGrantRoleReferences (Generic Model Constructor) +func (*IamPolicyManagementV1) NewTemplateGrantRoleReferences(roleTemplateReferences []RoleTemplateReferencesItem) (_model *TemplateGrantRoleReferences, err error) { + _model = &TemplateGrantRoleReferences{ + RoleTemplateReferences: roleTemplateReferences, + } + err = core.ValidateStruct(_model, "required parameters") if err != nil { - err = core.SDKErrorf(err, "", "resources-error", common.GetComponentInfo()) - return + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) } - err = core.UnmarshalModel(m, "subject", &obj.Subject, UnmarshalPolicyAssignmentV1Subject) + return +} + +func (*TemplateGrantRoleReferences) isaTemplateGrant() bool { + return true +} + +// UnmarshalTemplateGrantRoleReferences unmarshals an instance of TemplateGrantRoleReferences from the specified map of raw messages. +func UnmarshalTemplateGrantRoleReferences(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateGrantRoleReferences) + err = core.UnmarshalModel(m, "role_template_references", &obj.RoleTemplateReferences, UnmarshalRoleTemplateReferencesItem) if err != nil { - err = core.SDKErrorf(err, "", "subject-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "role_template_references-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "template", &obj.Template, UnmarshalAssignmentTemplateDetails) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// TemplateGrantRoles : TemplateGrantRoles struct +// This model "extends" TemplateGrant +type TemplateGrantRoles struct { + // A set of role Cloud Resource Names (CRNs) granted by the policy. + Roles []Roles `json:"roles" validate:"required"` +} + +// NewTemplateGrantRoles : Instantiate TemplateGrantRoles (Generic Model Constructor) +func (*IamPolicyManagementV1) NewTemplateGrantRoles(roles []Roles) (_model *TemplateGrantRoles, err error) { + _model = &TemplateGrantRoles{ + Roles: roles, + } + err = core.ValidateStruct(_model, "required parameters") if err != nil { - err = core.SDKErrorf(err, "", "template-error", common.GetComponentInfo()) - return + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) } - err = core.UnmarshalPrimitive(m, "status", &obj.Status) + return +} + +func (*TemplateGrantRoles) isaTemplateGrant() bool { + return true +} + +// UnmarshalTemplateGrantRoles unmarshals an instance of TemplateGrantRoles from the specified map of raw messages. +func UnmarshalTemplateGrantRoles(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(TemplateGrantRoles) + err = core.UnmarshalModel(m, "roles", &obj.Roles, UnmarshalRoles) if err != nil { - err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "roles-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -12666,3 +15492,264 @@ func (pager *ActionControlAssignmentsPager) GetAll() (allItems []ActionControlAs err = core.RepurposeSDKProblem(err, "") return } + +// +// RoleTemplatesPager can be used to simplify the use of the "ListRoleTemplates" method. +// +type RoleTemplatesPager struct { + hasNext bool + options *ListRoleTemplatesOptions + client *IamPolicyManagementV1 + pageContext struct { + next *string + } +} + +// NewRoleTemplatesPager returns a new RoleTemplatesPager instance. +func (iamPolicyManagement *IamPolicyManagementV1) NewRoleTemplatesPager(options *ListRoleTemplatesOptions) (pager *RoleTemplatesPager, err error) { + if options.Start != nil && *options.Start != "" { + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) + return + } + + var optionsCopy ListRoleTemplatesOptions = *options + pager = &RoleTemplatesPager{ + hasNext: true, + options: &optionsCopy, + client: iamPolicyManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *RoleTemplatesPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *RoleTemplatesPager) GetNextWithContext(ctx context.Context) (page []RoleTemplate, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListRoleTemplatesWithContext(ctx, pager.options) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.RoleTemplates + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *RoleTemplatesPager) GetAllWithContext(ctx context.Context) (allItems []RoleTemplate, err error) { + for pager.HasNext() { + var nextPage []RoleTemplate + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *RoleTemplatesPager) GetNext() (page []RoleTemplate, err error) { + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *RoleTemplatesPager) GetAll() (allItems []RoleTemplate, err error) { + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// +// RoleTemplateVersionsPager can be used to simplify the use of the "ListRoleTemplateVersions" method. +// +type RoleTemplateVersionsPager struct { + hasNext bool + options *ListRoleTemplateVersionsOptions + client *IamPolicyManagementV1 + pageContext struct { + next *string + } +} + +// NewRoleTemplateVersionsPager returns a new RoleTemplateVersionsPager instance. +func (iamPolicyManagement *IamPolicyManagementV1) NewRoleTemplateVersionsPager(options *ListRoleTemplateVersionsOptions) (pager *RoleTemplateVersionsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) + return + } + + var optionsCopy ListRoleTemplateVersionsOptions = *options + pager = &RoleTemplateVersionsPager{ + hasNext: true, + options: &optionsCopy, + client: iamPolicyManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *RoleTemplateVersionsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *RoleTemplateVersionsPager) GetNextWithContext(ctx context.Context) (page []RoleTemplate, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListRoleTemplateVersionsWithContext(ctx, pager.options) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Versions + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *RoleTemplateVersionsPager) GetAllWithContext(ctx context.Context) (allItems []RoleTemplate, err error) { + for pager.HasNext() { + var nextPage []RoleTemplate + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *RoleTemplateVersionsPager) GetNext() (page []RoleTemplate, err error) { + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *RoleTemplateVersionsPager) GetAll() (allItems []RoleTemplate, err error) { + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// +// RoleAssignmentsPager can be used to simplify the use of the "ListRoleAssignments" method. +// +type RoleAssignmentsPager struct { + hasNext bool + options *ListRoleAssignmentsOptions + client *IamPolicyManagementV1 + pageContext struct { + next *string + } +} + +// NewRoleAssignmentsPager returns a new RoleAssignmentsPager instance. +func (iamPolicyManagement *IamPolicyManagementV1) NewRoleAssignmentsPager(options *ListRoleAssignmentsOptions) (pager *RoleAssignmentsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) + return + } + + var optionsCopy ListRoleAssignmentsOptions = *options + pager = &RoleAssignmentsPager{ + hasNext: true, + options: &optionsCopy, + client: iamPolicyManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *RoleAssignmentsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *RoleAssignmentsPager) GetNextWithContext(ctx context.Context) (page []RoleAssignment, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListRoleAssignmentsWithContext(ctx, pager.options) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Assignments + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *RoleAssignmentsPager) GetAllWithContext(ctx context.Context) (allItems []RoleAssignment, err error) { + for pager.HasNext() { + var nextPage []RoleAssignment + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *RoleAssignmentsPager) GetNext() (page []RoleAssignment, err error) { + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *RoleAssignmentsPager) GetAll() (allItems []RoleAssignment, err error) { + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} diff --git a/vendor/github.com/IBM/vpc-go-sdk/common/version.go b/vendor/github.com/IBM/vpc-go-sdk/common/version.go index ebbf4bff37..3c187cbe40 100644 --- a/vendor/github.com/IBM/vpc-go-sdk/common/version.go +++ b/vendor/github.com/IBM/vpc-go-sdk/common/version.go @@ -1,4 +1,4 @@ package common // Version of the SDK -const Version = "0.71.2" +const Version = "0.76.2" diff --git a/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go b/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go index 03f546f0f4..cb0425a3bc 100644 --- a/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go +++ b/vendor/github.com/IBM/vpc-go-sdk/vpcv1/vpc_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.105.1-067d600b-20250616-154447 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ // Package vpcv1 : Operations and models for the VpcV1 service @@ -38,7 +38,7 @@ import ( // VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual // server instances, along with subnets, volumes, load balancers, and more. // -// API Version: 2025-09-01 +// API Version: 2025-11-17 type VpcV1 struct { Service *core.BaseService @@ -46,8 +46,8 @@ type VpcV1 struct { // `2`. Generation *int64 - // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-08-26` - // and `2025-09-01`. + // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-09-16` + // and `2025-11-17`. Version *string } @@ -67,8 +67,8 @@ type VpcV1Options struct { // `2`. Generation *int64 - // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-08-26` - // and `2025-09-01`. + // The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-09-16` + // and `2025-11-17`. Version *string } @@ -133,7 +133,7 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { } if options.Version == nil { - options.Version = core.StringPtr("2025-08-26") + options.Version = core.StringPtr("2025-11-17") } service = &VpcV1{ @@ -159,6 +159,7 @@ func GetServiceURLForRegion(region string) (string, error) { "eu-de": "https://eu-de.iaas.cloud.ibm.com/v1", // Germany (Frankfurt) "eu-es": "https://eu-es.iaas.cloud.ibm.com/v1", // Spain (Madrid) "eu-gb": "https://eu-gb.iaas.cloud.ibm.com/v1", // United Kingdom (London) + "in-che": "https://in-che.iaas.cloud.ibm.com/v1", // India (Chennai) "jp-osa": "https://jp-osa.iaas.cloud.ibm.com/v1", // Japan (Osaka) "jp-tok": "https://jp-tok.iaas.cloud.ibm.com/v1", // Japan (Tokyo) "us-east": "https://us-east.iaas.cloud.ibm.com/v1", // US East (Washington DC) @@ -6692,6 +6693,9 @@ func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpo builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + if listEndpointGatewaysOptions.AllowResourceBinding != nil { + builder.AddQuery("allow_resource_binding", fmt.Sprint(*listEndpointGatewaysOptions.AllowResourceBinding)) + } if listEndpointGatewaysOptions.Name != nil { builder.AddQuery("name", fmt.Sprint(*listEndpointGatewaysOptions.Name)) } @@ -6801,6 +6805,9 @@ func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEn if createEndpointGatewayOptions.AllowDnsResolutionBinding != nil { body["allow_dns_resolution_binding"] = createEndpointGatewayOptions.AllowDnsResolutionBinding } + if createEndpointGatewayOptions.AllowResourceBinding != nil { + body["allow_resource_binding"] = createEndpointGatewayOptions.AllowResourceBinding + } if createEndpointGatewayOptions.Ips != nil { body["ips"] = createEndpointGatewayOptions.Ips } @@ -7138,11 +7145,411 @@ func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpoi return } +// ListEndpointGatewayResourceBindings : List resource bindings for an endpoint gateway +// This request lists resource bindings for an endpoint gateway. A resource binding is an association between the +// endpoint gateway and a resource in the endpoint gateway's `target` service. The resource binding provides a fully +// qualified domain name for the +// `service_endpoint` to access the resource from the endpoint gateway's VPC. +// +// The resource bindings will be sorted by their `created_at` property values, with newest resource bindings first. +// Resource bindings with identical `created_at` property values will in turn be sorted by ascending `name` property +// values. +func (vpc *VpcV1) ListEndpointGatewayResourceBindings(listEndpointGatewayResourceBindingsOptions *ListEndpointGatewayResourceBindingsOptions) (result *EndpointGatewayResourceBindingCollection, response *core.DetailedResponse, err error) { + result, response, err = vpc.ListEndpointGatewayResourceBindingsWithContext(context.Background(), listEndpointGatewayResourceBindingsOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// ListEndpointGatewayResourceBindingsWithContext is an alternate form of the ListEndpointGatewayResourceBindings method which supports a Context parameter +func (vpc *VpcV1) ListEndpointGatewayResourceBindingsWithContext(ctx context.Context, listEndpointGatewayResourceBindingsOptions *ListEndpointGatewayResourceBindingsOptions) (result *EndpointGatewayResourceBindingCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listEndpointGatewayResourceBindingsOptions, "listEndpointGatewayResourceBindingsOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(listEndpointGatewayResourceBindingsOptions, "listEndpointGatewayResourceBindingsOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "endpoint_gateway_id": *listEndpointGatewayResourceBindingsOptions.EndpointGatewayID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/resource_bindings`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListEndpointGatewayResourceBindings") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range listEndpointGatewayResourceBindingsOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + if listEndpointGatewayResourceBindingsOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listEndpointGatewayResourceBindingsOptions.Start)) + } + if listEndpointGatewayResourceBindingsOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listEndpointGatewayResourceBindingsOptions.Limit)) + } + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "list_endpoint_gateway_resource_bindings", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayResourceBindingCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + +// CreateEndpointGatewayResourceBinding : Create a resource binding for an endpoint gateway +// This request creates a new resource binding for an endpoint gateway from an endpoint gateway resource binding +// prototype object. The prototype object is structured in the same way as a retrieved endpoint gateway resource +// binding, and contains the information necessary to create the new resource binding. +// +// For this request to succeed, resource binding must be enabled for this endpoint gateway's +// `target` service and this endpoint gateway resource binding must not conflict with another resource binding in the +// [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected topology. +func (vpc *VpcV1) CreateEndpointGatewayResourceBinding(createEndpointGatewayResourceBindingOptions *CreateEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + result, response, err = vpc.CreateEndpointGatewayResourceBindingWithContext(context.Background(), createEndpointGatewayResourceBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// CreateEndpointGatewayResourceBindingWithContext is an alternate form of the CreateEndpointGatewayResourceBinding method which supports a Context parameter +func (vpc *VpcV1) CreateEndpointGatewayResourceBindingWithContext(ctx context.Context, createEndpointGatewayResourceBindingOptions *CreateEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createEndpointGatewayResourceBindingOptions, "createEndpointGatewayResourceBindingOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(createEndpointGatewayResourceBindingOptions, "createEndpointGatewayResourceBindingOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "endpoint_gateway_id": *createEndpointGatewayResourceBindingOptions.EndpointGatewayID, + } + + builder := core.NewRequestBuilder(core.POST) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/resource_bindings`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateEndpointGatewayResourceBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range createEndpointGatewayResourceBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + body := make(map[string]interface{}) + if createEndpointGatewayResourceBindingOptions.Target != nil { + body["target"] = createEndpointGatewayResourceBindingOptions.Target + } + if createEndpointGatewayResourceBindingOptions.Name != nil { + body["name"] = createEndpointGatewayResourceBindingOptions.Name + } + _, err = builder.SetBodyContentJSON(body) + if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) + return + } + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "create_endpoint_gateway_resource_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + +// DeleteEndpointGatewayResourceBinding : Delete a resource binding from an endpoint gateway +// This request deletes the specified resource binding from the specified endpoint gateway. This operation cannot be +// reversed. +func (vpc *VpcV1) DeleteEndpointGatewayResourceBinding(deleteEndpointGatewayResourceBindingOptions *DeleteEndpointGatewayResourceBindingOptions) (response *core.DetailedResponse, err error) { + response, err = vpc.DeleteEndpointGatewayResourceBindingWithContext(context.Background(), deleteEndpointGatewayResourceBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// DeleteEndpointGatewayResourceBindingWithContext is an alternate form of the DeleteEndpointGatewayResourceBinding method which supports a Context parameter +func (vpc *VpcV1) DeleteEndpointGatewayResourceBindingWithContext(ctx context.Context, deleteEndpointGatewayResourceBindingOptions *DeleteEndpointGatewayResourceBindingOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteEndpointGatewayResourceBindingOptions, "deleteEndpointGatewayResourceBindingOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(deleteEndpointGatewayResourceBindingOptions, "deleteEndpointGatewayResourceBindingOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "endpoint_gateway_id": *deleteEndpointGatewayResourceBindingOptions.EndpointGatewayID, + "id": *deleteEndpointGatewayResourceBindingOptions.ID, + } + + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/resource_bindings/{id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteEndpointGatewayResourceBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range deleteEndpointGatewayResourceBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "delete_endpoint_gateway_resource_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + + return +} + +// GetEndpointGatewayResourceBinding : Retrieve an endpoint gateway resource binding +// This request retrieves a single endpoint gateway resource binding specified by the identifier in the URL. +func (vpc *VpcV1) GetEndpointGatewayResourceBinding(getEndpointGatewayResourceBindingOptions *GetEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + result, response, err = vpc.GetEndpointGatewayResourceBindingWithContext(context.Background(), getEndpointGatewayResourceBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetEndpointGatewayResourceBindingWithContext is an alternate form of the GetEndpointGatewayResourceBinding method which supports a Context parameter +func (vpc *VpcV1) GetEndpointGatewayResourceBindingWithContext(ctx context.Context, getEndpointGatewayResourceBindingOptions *GetEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getEndpointGatewayResourceBindingOptions, "getEndpointGatewayResourceBindingOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(getEndpointGatewayResourceBindingOptions, "getEndpointGatewayResourceBindingOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "endpoint_gateway_id": *getEndpointGatewayResourceBindingOptions.EndpointGatewayID, + "id": *getEndpointGatewayResourceBindingOptions.ID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/resource_bindings/{id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetEndpointGatewayResourceBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range getEndpointGatewayResourceBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "get_endpoint_gateway_resource_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + +// UpdateEndpointGatewayResourceBinding : Update an endpoint gateway resource binding +// This request updates an endpoint gateway resource binding with the information in a provided endpoint gateway +// resource binding patch. The endpoint gateway resource binding patch object is structured in the same way as a +// retrieved endpoint gateway resource binding and contains only the information to be updated. +func (vpc *VpcV1) UpdateEndpointGatewayResourceBinding(updateEndpointGatewayResourceBindingOptions *UpdateEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + result, response, err = vpc.UpdateEndpointGatewayResourceBindingWithContext(context.Background(), updateEndpointGatewayResourceBindingOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// UpdateEndpointGatewayResourceBindingWithContext is an alternate form of the UpdateEndpointGatewayResourceBinding method which supports a Context parameter +func (vpc *VpcV1) UpdateEndpointGatewayResourceBindingWithContext(ctx context.Context, updateEndpointGatewayResourceBindingOptions *UpdateEndpointGatewayResourceBindingOptions) (result *EndpointGatewayResourceBinding, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(updateEndpointGatewayResourceBindingOptions, "updateEndpointGatewayResourceBindingOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(updateEndpointGatewayResourceBindingOptions, "updateEndpointGatewayResourceBindingOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "endpoint_gateway_id": *updateEndpointGatewayResourceBindingOptions.EndpointGatewayID, + "id": *updateEndpointGatewayResourceBindingOptions.ID, + } + + builder := core.NewRequestBuilder(core.PATCH) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/resource_bindings/{id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateEndpointGatewayResourceBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range updateEndpointGatewayResourceBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + _, err = builder.SetBodyContentJSON(updateEndpointGatewayResourceBindingOptions.EndpointGatewayResourceBindingPatch) + if err != nil { + err = core.SDKErrorf(err, "", "set-json-body-error", common.GetComponentInfo()) + return + } + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "update_endpoint_gateway_resource_binding", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + // DeleteEndpointGateway : Delete an endpoint gateway // This request deletes an endpoint gateway. This operation cannot be reversed. // // Reserved IPs that were bound to the endpoint gateway will be released if their // `auto_delete` property is set to true. +// +// If the VPC this endpoint gateway resides in has `dns.enable_hub` set to `true`, then no other VPC in the [DNS +// sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) topology must contain an endpoint gateway with the same `target` +// service as this endpoint gateway. func (vpc *VpcV1) DeleteEndpointGateway(deleteEndpointGatewayOptions *DeleteEndpointGatewayOptions) (response *core.DetailedResponse, err error) { response, err = vpc.DeleteEndpointGatewayWithContext(context.Background(), deleteEndpointGatewayOptions) err = core.RepurposeSDKProblem(err, "") @@ -12135,6 +12542,12 @@ func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOpt if listInstancesOptions.DedicatedHostName != nil { builder.AddQuery("dedicated_host.name", fmt.Sprint(*listInstancesOptions.DedicatedHostName)) } + if listInstancesOptions.InstanceGroupMembershipInstanceGroupID != nil { + builder.AddQuery("instance_group_membership.instance_group.id", fmt.Sprint(*listInstancesOptions.InstanceGroupMembershipInstanceGroupID)) + } + if listInstancesOptions.InstanceGroupMembershipInstanceGroupCRN != nil { + builder.AddQuery("instance_group_membership.instance_group.crn", fmt.Sprint(*listInstancesOptions.InstanceGroupMembershipInstanceGroupCRN)) + } if listInstancesOptions.PlacementGroupID != nil { builder.AddQuery("placement_group.id", fmt.Sprint(*listInstancesOptions.PlacementGroupID)) } @@ -24122,7 +24535,8 @@ func (vpc *VpcV1) ListShareSnapshotsWithContext(ctx context.Context, listShareSn // in the same way as a retrieved share snapshot, and contains the information necessary to create the new share // snapshot. // -// The share must have an `access_control_mode` of `security_group` and a `replication_role` of `source` or `none`. +// The share must have an `access_control_mode` of `security_group`, and a +// `replication_role` of `source` or `none`. // // The snapshot will inherit its `resource_group` and encryption settings from the share. // @@ -27377,6 +27791,9 @@ func (vpc *VpcV1) DeleteVirtualNetworkInterfacesWithContext(ctx context.Context, builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") + if deleteVirtualNetworkInterfacesOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*deleteVirtualNetworkInterfacesOptions.IfMatch)) + } builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) @@ -27524,6 +27941,9 @@ func (vpc *VpcV1) UpdateVirtualNetworkInterfaceWithContext(ctx context.Context, } builder.AddHeader("Accept", "application/json") builder.AddHeader("Content-Type", "application/merge-patch+json") + if updateVirtualNetworkInterfaceOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*updateVirtualNetworkInterfaceOptions.IfMatch)) + } builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) @@ -29905,7 +30325,20 @@ func (vpc *VpcV1) ListVPCDnsResolutionBindingsWithContext(ctx context.Context, l // - The VPC specified by the identifier in the URL must have `dns.enable_hub` set to // `false` // - The updated DNS sharing connected topology must not contain more than one endpoint -// gateway with `allow_dns_resolution_binding` set to `true` targeting the same service. +// gateway with `allow_dns_resolution_binding` set to `true` and +// `allow_resource_binding` set to `false` targeting the same service. +// +// Additionally, if the VPC specified by the identifier in the URL has endpoint gateways that have +// `allow_dns_resolution_binding` set to `true`, then those endpoint gateways will participate in [DNS +// sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) with all VPCs in the connected topology. If this VPC contains an +// endpoint gateway targeting a service that has resource binding enabled, then for this request to succeed: +// - The VPC in the topology with `dns.enable_hub` set to `true` must have an endpoint +// gateway with the same `target` as the endpoint gateway in this VPC, and with +// `allow_dns_resolution_binding` set to `true` and `allow_resource_binding` set to +// `false`. +// - No other VPC in the topology can have an endpoint gateway with a resource binding +// using the same `service_endpoint` as a resource binding for the endpoint gateway in +// this VPC. // // See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for more information. func (vpc *VpcV1) CreateVPCDnsResolutionBinding(createVPCDnsResolutionBindingOptions *CreateVPCDnsResolutionBindingOptions) (result *VpcdnsResolutionBinding, response *core.DetailedResponse, err error) { @@ -32746,6 +33179,276 @@ func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGate return } +// ListVPNGatewayAdvertisedCIDRs : List advertised CIDRs for a VPN gateway +// This request lists advertised CIDRs for a VPN gateway. +// +// This request is only supported for route mode VPN gateways. +func (vpc *VpcV1) ListVPNGatewayAdvertisedCIDRs(listVPNGatewayAdvertisedCIDRsOptions *ListVPNGatewayAdvertisedCIDRsOptions) (result *VPNGatewayAdvertisedCIDRCollection, response *core.DetailedResponse, err error) { + result, response, err = vpc.ListVPNGatewayAdvertisedCIDRsWithContext(context.Background(), listVPNGatewayAdvertisedCIDRsOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// ListVPNGatewayAdvertisedCIDRsWithContext is an alternate form of the ListVPNGatewayAdvertisedCIDRs method which supports a Context parameter +func (vpc *VpcV1) ListVPNGatewayAdvertisedCIDRsWithContext(ctx context.Context, listVPNGatewayAdvertisedCIDRsOptions *ListVPNGatewayAdvertisedCIDRsOptions) (result *VPNGatewayAdvertisedCIDRCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayAdvertisedCIDRsOptions, "listVPNGatewayAdvertisedCIDRsOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(listVPNGatewayAdvertisedCIDRsOptions, "listVPNGatewayAdvertisedCIDRsOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayAdvertisedCIDRsOptions.VPNGatewayID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/advertised_cidrs`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayAdvertisedCIDRs") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range listVPNGatewayAdvertisedCIDRsOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateway_advertised_cidrs", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayAdvertisedCIDRCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + +// RemoveVPNGatewayAdvertisedCIDR : Remove an advertised CIDR from a VPN gateway +// This request removes a CIDR from a VPN gateway advertised CIDRs. +// +// This request is only supported for route mode VPN gateways. +func (vpc *VpcV1) RemoveVPNGatewayAdvertisedCIDR(removeVPNGatewayAdvertisedCIDROptions *RemoveVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.RemoveVPNGatewayAdvertisedCIDRWithContext(context.Background(), removeVPNGatewayAdvertisedCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// RemoveVPNGatewayAdvertisedCIDRWithContext is an alternate form of the RemoveVPNGatewayAdvertisedCIDR method which supports a Context parameter +func (vpc *VpcV1) RemoveVPNGatewayAdvertisedCIDRWithContext(ctx context.Context, removeVPNGatewayAdvertisedCIDROptions *RemoveVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(removeVPNGatewayAdvertisedCIDROptions, "removeVPNGatewayAdvertisedCIDROptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(removeVPNGatewayAdvertisedCIDROptions, "removeVPNGatewayAdvertisedCIDROptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *removeVPNGatewayAdvertisedCIDROptions.VPNGatewayID, + "cidr": *removeVPNGatewayAdvertisedCIDROptions.CIDR, + } + + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayAdvertisedCIDR") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range removeVPNGatewayAdvertisedCIDROptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "remove_vpn_gateway_advertised_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + + return +} + +// CheckVPNGatewayAdvertisedCIDR : Check if the specified advertised CIDR exists on a VPN gateway +// This request succeeds if an advertised CIDR exists on the specified VPN gateway, and fails otherwise. +// +// This request is only supported for route mode VPN gateways. +func (vpc *VpcV1) CheckVPNGatewayAdvertisedCIDR(checkVPNGatewayAdvertisedCIDROptions *CheckVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.CheckVPNGatewayAdvertisedCIDRWithContext(context.Background(), checkVPNGatewayAdvertisedCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// CheckVPNGatewayAdvertisedCIDRWithContext is an alternate form of the CheckVPNGatewayAdvertisedCIDR method which supports a Context parameter +func (vpc *VpcV1) CheckVPNGatewayAdvertisedCIDRWithContext(ctx context.Context, checkVPNGatewayAdvertisedCIDROptions *CheckVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(checkVPNGatewayAdvertisedCIDROptions, "checkVPNGatewayAdvertisedCIDROptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(checkVPNGatewayAdvertisedCIDROptions, "checkVPNGatewayAdvertisedCIDROptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *checkVPNGatewayAdvertisedCIDROptions.VPNGatewayID, + "cidr": *checkVPNGatewayAdvertisedCIDROptions.CIDR, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayAdvertisedCIDR") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range checkVPNGatewayAdvertisedCIDROptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "check_vpn_gateway_advertised_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + + return +} + +// AddVPNGatewayAdvertisedCIDR : Set an advertised CIDR on a VPN gateway +// This request adds the specified CIDR to the specified VPN gateway advertised CIDRs. This request succeeds if the +// specified CIDR already exists. A request body is not required, and if provided, is ignored. +// +// This request is only supported for route mode VPN gateways. +func (vpc *VpcV1) AddVPNGatewayAdvertisedCIDR(addVPNGatewayAdvertisedCIDROptions *AddVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + response, err = vpc.AddVPNGatewayAdvertisedCIDRWithContext(context.Background(), addVPNGatewayAdvertisedCIDROptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// AddVPNGatewayAdvertisedCIDRWithContext is an alternate form of the AddVPNGatewayAdvertisedCIDR method which supports a Context parameter +func (vpc *VpcV1) AddVPNGatewayAdvertisedCIDRWithContext(ctx context.Context, addVPNGatewayAdvertisedCIDROptions *AddVPNGatewayAdvertisedCIDROptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(addVPNGatewayAdvertisedCIDROptions, "addVPNGatewayAdvertisedCIDROptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(addVPNGatewayAdvertisedCIDROptions, "addVPNGatewayAdvertisedCIDROptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *addVPNGatewayAdvertisedCIDROptions.VPNGatewayID, + "cidr": *addVPNGatewayAdvertisedCIDROptions.CIDR, + } + + builder := core.NewRequestBuilder(core.PUT) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/advertised_cidrs/{cidr}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayAdvertisedCIDR") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range addVPNGatewayAdvertisedCIDROptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + response, err = vpc.Service.Request(request, nil) + if err != nil { + core.EnrichHTTPProblem(err, "add_vpn_gateway_advertised_cidr", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + + return +} + // ListVPNGatewayConnections : List connections of a VPN gateway // This request lists connections of a VPN gateway. func (vpc *VpcV1) ListVPNGatewayConnections(listVPNGatewayConnectionsOptions *ListVPNGatewayConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) { @@ -32950,6 +33653,9 @@ func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, del for headerName, headerValue := range deleteVPNGatewayConnectionOptions.Headers { builder.AddHeader(headerName, headerValue) } + if deleteVPNGatewayConnectionOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*deleteVPNGatewayConnectionOptions.IfMatch)) + } builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) @@ -33088,6 +33794,9 @@ func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, upd } builder.AddHeader("Accept", "application/json") builder.AddHeader("Content-Type", "application/merge-patch+json") + if updateVPNGatewayConnectionOptions.IfMatch != nil { + builder.AddHeader("If-Match", fmt.Sprint(*updateVPNGatewayConnectionOptions.IfMatch)) + } builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) @@ -33671,6 +34380,160 @@ func (vpc *VpcV1) AddVPNGatewayConnectionsPeerCIDRWithContext(ctx context.Contex return } +// ListVPNGatewayServiceConnections : List VPN gateway service connections +// This request lists service connections on a VPN gateway. The VPN gateway service connections will be sorted by +// ascending `created_at` property values. A VPN gateway service connection connects services such as transit gateway to +// a VPN gateway. This facilitates the propagation of routes learned from VPN gateway peer connections to the connected +// service (for example, a transit gateway). +func (vpc *VpcV1) ListVPNGatewayServiceConnections(listVPNGatewayServiceConnectionsOptions *ListVPNGatewayServiceConnectionsOptions) (result *VPNGatewayServiceConnectionCollection, response *core.DetailedResponse, err error) { + result, response, err = vpc.ListVPNGatewayServiceConnectionsWithContext(context.Background(), listVPNGatewayServiceConnectionsOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// ListVPNGatewayServiceConnectionsWithContext is an alternate form of the ListVPNGatewayServiceConnections method which supports a Context parameter +func (vpc *VpcV1) ListVPNGatewayServiceConnectionsWithContext(ctx context.Context, listVPNGatewayServiceConnectionsOptions *ListVPNGatewayServiceConnectionsOptions) (result *VPNGatewayServiceConnectionCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayServiceConnectionsOptions, "listVPNGatewayServiceConnectionsOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(listVPNGatewayServiceConnectionsOptions, "listVPNGatewayServiceConnectionsOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayServiceConnectionsOptions.VPNGatewayID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/service_connections`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayServiceConnections") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range listVPNGatewayServiceConnectionsOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + if listVPNGatewayServiceConnectionsOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listVPNGatewayServiceConnectionsOptions.Start)) + } + if listVPNGatewayServiceConnectionsOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listVPNGatewayServiceConnectionsOptions.Limit)) + } + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "list_vpn_gateway_service_connections", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayServiceConnectionCollection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + +// GetVPNGatewayServiceConnection : Retrieve a VPN gateway service connection +// This request retrieves VPN gateway service connection specified by the identifier in the URL. +func (vpc *VpcV1) GetVPNGatewayServiceConnection(getVPNGatewayServiceConnectionOptions *GetVPNGatewayServiceConnectionOptions) (result *VPNGatewayServiceConnection, response *core.DetailedResponse, err error) { + result, response, err = vpc.GetVPNGatewayServiceConnectionWithContext(context.Background(), getVPNGatewayServiceConnectionOptions) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetVPNGatewayServiceConnectionWithContext is an alternate form of the GetVPNGatewayServiceConnection method which supports a Context parameter +func (vpc *VpcV1) GetVPNGatewayServiceConnectionWithContext(ctx context.Context, getVPNGatewayServiceConnectionOptions *GetVPNGatewayServiceConnectionOptions) (result *VPNGatewayServiceConnection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getVPNGatewayServiceConnectionOptions, "getVPNGatewayServiceConnectionOptions cannot be nil") + if err != nil { + err = core.SDKErrorf(err, "", "unexpected-nil-param", common.GetComponentInfo()) + return + } + err = core.ValidateStruct(getVPNGatewayServiceConnectionOptions, "getVPNGatewayServiceConnectionOptions") + if err != nil { + err = core.SDKErrorf(err, "", "struct-validation-error", common.GetComponentInfo()) + return + } + + pathParamsMap := map[string]string{ + "vpn_gateway_id": *getVPNGatewayServiceConnectionOptions.VPNGatewayID, + "id": *getVPNGatewayServiceConnectionOptions.ID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/service_connections/{id}`, pathParamsMap) + if err != nil { + err = core.SDKErrorf(err, "", "url-resolve-error", common.GetComponentInfo()) + return + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPNGatewayServiceConnection") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + for headerName, headerValue := range getVPNGatewayServiceConnectionOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.Generation)) + + request, err := builder.Build() + if err != nil { + err = core.SDKErrorf(err, "", "build-error", common.GetComponentInfo()) + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + core.EnrichHTTPProblem(err, "get_vpn_gateway_service_connection", getServiceComponentInfo()) + err = core.SDKErrorf(err, "", "http-request-err", common.GetComponentInfo()) + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayServiceConnection) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-resp-error", common.GetComponentInfo()) + return + } + response.Result = result + } + + return +} + // ListVPNServers : List VPN servers // This request lists VPN servers. func (vpc *VpcV1) ListVPNServers(listVPNServersOptions *ListVPNServersOptions) (result *VPNServerCollection, response *core.DetailedResponse, err error) { @@ -34821,7 +35684,7 @@ func (vpc *VpcV1) UpdateVPNServerRouteWithContext(ctx context.Context, updateVPN return } func getServiceComponentInfo() *core.ProblemComponent { - return core.NewProblemComponent(DefaultServiceName, "2025-08-26") + return core.NewProblemComponent(DefaultServiceName, "2025-11-17") } // AccountIdentity : Identifies an account by a unique property. @@ -35122,6 +35985,44 @@ func (options *AddVirtualNetworkInterfaceIPOptions) SetHeaders(param map[string] return options } +// AddVPNGatewayAdvertisedCIDROptions : The AddVPNGatewayAdvertisedCIDR options. +type AddVPNGatewayAdvertisedCIDROptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewAddVPNGatewayAdvertisedCIDROptions : Instantiate AddVPNGatewayAdvertisedCIDROptions +func (*VpcV1) NewAddVPNGatewayAdvertisedCIDROptions(vpnGatewayID string, cidr string) *AddVPNGatewayAdvertisedCIDROptions { + return &AddVPNGatewayAdvertisedCIDROptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + CIDR: core.StringPtr(cidr), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *AddVPNGatewayAdvertisedCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayAdvertisedCIDROptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetCIDR : Allow user to set CIDR +func (_options *AddVPNGatewayAdvertisedCIDROptions) SetCIDR(cidr string) *AddVPNGatewayAdvertisedCIDROptions { + _options.CIDR = core.StringPtr(cidr) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *AddVPNGatewayAdvertisedCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayAdvertisedCIDROptions { + options.Headers = param + return options +} + // AddVPNGatewayConnectionsLocalCIDROptions : The AddVPNGatewayConnectionsLocalCIDR options. type AddVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. @@ -41256,7 +42157,7 @@ func UnmarshalBareMetalServerProfileReservationTerms(m map[string]json.RawMessag // BareMetalServerProfileSupportedTrustedPlatformModuleModes : The supported trusted platform module modes for this bare metal server profile. type BareMetalServerProfileSupportedTrustedPlatformModuleModes struct { // The default trusted platform module for a bare metal server with this profile. - Default *string `json:"default,omitempty"` + Default *string `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` @@ -42060,6 +42961,44 @@ func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result return } +// CheckVPNGatewayAdvertisedCIDROptions : The CheckVPNGatewayAdvertisedCIDR options. +type CheckVPNGatewayAdvertisedCIDROptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCheckVPNGatewayAdvertisedCIDROptions : Instantiate CheckVPNGatewayAdvertisedCIDROptions +func (*VpcV1) NewCheckVPNGatewayAdvertisedCIDROptions(vpnGatewayID string, cidr string) *CheckVPNGatewayAdvertisedCIDROptions { + return &CheckVPNGatewayAdvertisedCIDROptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + CIDR: core.StringPtr(cidr), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *CheckVPNGatewayAdvertisedCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayAdvertisedCIDROptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetCIDR : Allow user to set CIDR +func (_options *CheckVPNGatewayAdvertisedCIDROptions) SetCIDR(cidr string) *CheckVPNGatewayAdvertisedCIDROptions { + _options.CIDR = core.StringPtr(cidr) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CheckVPNGatewayAdvertisedCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayAdvertisedCIDROptions { + options.Headers = param + return options +} + // CheckVPNGatewayConnectionsLocalCIDROptions : The CheckVPNGatewayConnectionsLocalCIDR options. type CheckVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. @@ -45003,6 +45942,13 @@ type CreateEndpointGatewayOptions struct { // - Has the same `target` as this endpoint gateway // - Has `service_endpoints` that overlap with the `service_endpoints` for this endpoint // gateway. + // + // If `allow_dns_resolution_binding` is `true`, and `allow_resource_binding` is `true`, + // then: + // - The VPC in the topology with `dns.enable_hub` set to `true` must have an endpoint + // gateway with the same `target` as this endpoint gateway. + // - No other VPC in the topology can have an endpoint gateway with a resource binding + // using the same `service_endpoint` as a resource binding for this endpoint gateway. Target EndpointGatewayTargetPrototypeIntf `json:"target" validate:"required"` // The VPC this endpoint gateway will reside in. @@ -45011,17 +45957,28 @@ type CreateEndpointGatewayOptions struct { // Indicates whether to allow DNS resolution for this endpoint gateway when the VPC this endpoint gateway resides in // has a DNS resolution binding to a VPC with `dns.enable_hub` set to `true`. // - // If `true`, then there must not be another endpoint gateway with + // If `true`, and `allow_resource_binding` is `false`, then there must not be another endpoint gateway with // `allow_dns_resolution_binding` set to `true` in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected // topology that: // - Has the same `target` as this endpoint gateway // - Has `service_endpoints` that overlap with the `service_endpoints` for this endpoint // gateway. // + // If `true`, and `allow_resource_binding` is `true`, then: + // - The VPC in the topology with `dns.enable_hub` set to `true` must have an endpoint + // gateway with the same `target` as this endpoint gateway. + // - No other VPC in the topology can have an endpoint gateway with a resource binding + // using the same `service_endpoint` as a resource binding for this endpoint gateway. + // // Must be `true` if the VPC this endpoint gateway resides in has `dns.enable_hub` set to // `true`. AllowDnsResolutionBinding *bool `json:"allow_dns_resolution_binding,omitempty"` + // Indicates whether resource binding is allowed for this endpoint gateway when the VPC this endpoint gateway resides + // in has a DNS resolution binding to a VPC with `dns.enable_hub` set to `true`. Resource binding must be enabled for + // the `target` service. + AllowResourceBinding *bool `json:"allow_resource_binding,omitempty"` + // The reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed. Ips []EndpointGatewayReservedIPIntf `json:"ips,omitempty"` @@ -45066,6 +46023,12 @@ func (_options *CreateEndpointGatewayOptions) SetAllowDnsResolutionBinding(allow return _options } +// SetAllowResourceBinding : Allow user to set AllowResourceBinding +func (_options *CreateEndpointGatewayOptions) SetAllowResourceBinding(allowResourceBinding bool) *CreateEndpointGatewayOptions { + _options.AllowResourceBinding = core.BoolPtr(allowResourceBinding) + return _options +} + // SetIps : Allow user to set Ips func (_options *CreateEndpointGatewayOptions) SetIps(ips []EndpointGatewayReservedIPIntf) *CreateEndpointGatewayOptions { _options.Ips = ips @@ -45096,6 +46059,54 @@ func (options *CreateEndpointGatewayOptions) SetHeaders(param map[string]string) return options } +// CreateEndpointGatewayResourceBindingOptions : The CreateEndpointGatewayResourceBinding options. +type CreateEndpointGatewayResourceBindingOptions struct { + // The endpoint gateway identifier. + EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="` + + // The target to use for this resource binding. + Target EndpointGatewayResourceBindingTargetPrototypeIntf `json:"target" validate:"required"` + + // The name for this resource binding. The name must not be used by another resource binding for the endpoint gateway. + // If unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewCreateEndpointGatewayResourceBindingOptions : Instantiate CreateEndpointGatewayResourceBindingOptions +func (*VpcV1) NewCreateEndpointGatewayResourceBindingOptions(endpointGatewayID string, target EndpointGatewayResourceBindingTargetPrototypeIntf) *CreateEndpointGatewayResourceBindingOptions { + return &CreateEndpointGatewayResourceBindingOptions{ + EndpointGatewayID: core.StringPtr(endpointGatewayID), + Target: target, + } +} + +// SetEndpointGatewayID : Allow user to set EndpointGatewayID +func (_options *CreateEndpointGatewayResourceBindingOptions) SetEndpointGatewayID(endpointGatewayID string) *CreateEndpointGatewayResourceBindingOptions { + _options.EndpointGatewayID = core.StringPtr(endpointGatewayID) + return _options +} + +// SetTarget : Allow user to set Target +func (_options *CreateEndpointGatewayResourceBindingOptions) SetTarget(target EndpointGatewayResourceBindingTargetPrototypeIntf) *CreateEndpointGatewayResourceBindingOptions { + _options.Target = target + return _options +} + +// SetName : Allow user to set Name +func (_options *CreateEndpointGatewayResourceBindingOptions) SetName(name string) *CreateEndpointGatewayResourceBindingOptions { + _options.Name = core.StringPtr(name) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *CreateEndpointGatewayResourceBindingOptions) SetHeaders(param map[string]string) *CreateEndpointGatewayResourceBindingOptions { + options.Headers = param + return options +} + // CreateFloatingIPOptions : The CreateFloatingIP options. type CreateFloatingIPOptions struct { // The floating IP prototype object. @@ -45830,10 +46841,11 @@ type CreateInstanceNetworkInterfaceOptions struct { Name *string `json:"name,omitempty"` // The primary IP address to bind to the instance network interface. This can be - // specified using an existing reserved IP, or a prototype object for a new reserved IP. + // specified using an existing reserved IP, or a prototype object for a new reserved + // IP. // - // If an existing reserved IP or a prototype object with an address is specified, it must - // be available on the instance network interface's subnet. Otherwise, an + // If an existing reserved IP or a prototype object with an address is specified, it + // must be available on the instance network interface's subnet. Otherwise, an // available address on the subnet will be automatically selected and reserved. PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"` @@ -49689,7 +50701,7 @@ type DedicatedHostDisk struct { InterfaceType *string `json:"interface_type" validate:"required"` // The lifecycle state of this dedicated host disk. - LifecycleState *string `json:"lifecycle_state,omitempty"` + LifecycleState *string `json:"lifecycle_state" validate:"required"` // The name for this dedicated host disk. The name is unique across all disks on the dedicated host. Name *string `json:"name" validate:"required"` @@ -52089,6 +53101,44 @@ func (options *DeleteEndpointGatewayOptions) SetHeaders(param map[string]string) return options } +// DeleteEndpointGatewayResourceBindingOptions : The DeleteEndpointGatewayResourceBinding options. +type DeleteEndpointGatewayResourceBindingOptions struct { + // The endpoint gateway identifier. + EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="` + + // The resource binding identifier. + ID *string `json:"id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewDeleteEndpointGatewayResourceBindingOptions : Instantiate DeleteEndpointGatewayResourceBindingOptions +func (*VpcV1) NewDeleteEndpointGatewayResourceBindingOptions(endpointGatewayID string, id string) *DeleteEndpointGatewayResourceBindingOptions { + return &DeleteEndpointGatewayResourceBindingOptions{ + EndpointGatewayID: core.StringPtr(endpointGatewayID), + ID: core.StringPtr(id), + } +} + +// SetEndpointGatewayID : Allow user to set EndpointGatewayID +func (_options *DeleteEndpointGatewayResourceBindingOptions) SetEndpointGatewayID(endpointGatewayID string) *DeleteEndpointGatewayResourceBindingOptions { + _options.EndpointGatewayID = core.StringPtr(endpointGatewayID) + return _options +} + +// SetID : Allow user to set ID +func (_options *DeleteEndpointGatewayResourceBindingOptions) SetID(id string) *DeleteEndpointGatewayResourceBindingOptions { + _options.ID = core.StringPtr(id) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *DeleteEndpointGatewayResourceBindingOptions) SetHeaders(param map[string]string) *DeleteEndpointGatewayResourceBindingOptions { + options.Headers = param + return options +} + // DeleteFloatingIPOptions : The DeleteFloatingIP options. type DeleteFloatingIPOptions struct { // The floating IP identifier. @@ -53764,6 +54814,9 @@ type DeleteVirtualNetworkInterfacesOptions struct { // The virtual network interface identifier. ID *string `json:"id" validate:"required,ne="` + // If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + IfMatch *string `json:"If-Match,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } @@ -53781,6 +54834,12 @@ func (_options *DeleteVirtualNetworkInterfacesOptions) SetID(id string) *DeleteV return _options } +// SetIfMatch : Allow user to set IfMatch +func (_options *DeleteVirtualNetworkInterfacesOptions) SetIfMatch(ifMatch string) *DeleteVirtualNetworkInterfacesOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + // SetHeaders : Allow user to set Headers func (options *DeleteVirtualNetworkInterfacesOptions) SetHeaders(param map[string]string) *DeleteVirtualNetworkInterfacesOptions { options.Headers = param @@ -54078,6 +55137,9 @@ type DeleteVPNGatewayConnectionOptions struct { // The VPN gateway connection identifier. ID *string `json:"id" validate:"required,ne="` + // If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + IfMatch *string `json:"If-Match,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } @@ -54102,6 +55164,12 @@ func (_options *DeleteVPNGatewayConnectionOptions) SetID(id string) *DeleteVPNGa return _options } +// SetIfMatch : Allow user to set IfMatch +func (_options *DeleteVPNGatewayConnectionOptions) SetIfMatch(ifMatch string) *DeleteVPNGatewayConnectionOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + // SetHeaders : Allow user to set Headers func (options *DeleteVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *DeleteVPNGatewayConnectionOptions { options.Headers = param @@ -54458,6 +55526,9 @@ type EndpointGateway struct { // has a DNS resolution binding to a VPC with `dns.enable_hub` set to `true`. AllowDnsResolutionBinding *bool `json:"allow_dns_resolution_binding" validate:"required"` + // Indicates whether resource binding is allowed for this endpoint gateway. + AllowResourceBinding *bool `json:"allow_resource_binding" validate:"required"` + // The date and time that the endpoint gateway was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` @@ -54555,6 +55626,11 @@ func UnmarshalEndpointGateway(m map[string]json.RawMessage, result interface{}) err = core.SDKErrorf(err, "", "allow_dns_resolution_binding-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allow_resource_binding", &obj.AllowResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "allow_resource_binding-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) @@ -54775,17 +55851,28 @@ type EndpointGatewayPatch struct { // Indicates whether to allow DNS resolution for this endpoint gateway when the VPC this endpoint gateway resides in // has a DNS resolution binding to a VPC with `dns.enable_hub` set to `true`. // - // If `true`, then there must not be another endpoint gateway with + // If `true`, and `allow_resource_binding` is `false`, then there must not be another endpoint gateway with // `allow_dns_resolution_binding` set to `true` in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected // topology that: // - Has the same `target` as this endpoint gateway // - Has `service_endpoints` that overlap with the `service_endpoints` for this endpoint // gateway. // + // If `true`, and `allow_resource_binding` is `true`, then: + // - The VPC in the topology with `dns.enable_hub` set to `true` must have an endpoint + // gateway with the same `target` as this endpoint gateway. + // - No other VPC in the topology can have an endpoint gateway with a resource binding + // using the same `service_endpoint` as a resource binding for this endpoint gateway. + // // Must be `true` if the VPC this endpoint gateway resides in has `dns.enable_hub` set to // `true`. AllowDnsResolutionBinding *bool `json:"allow_dns_resolution_binding,omitempty"` + // Indicates whether resource binding is allowed for this endpoint gateway when the VPC this endpoint gateway resides + // in has a DNS resolution binding to a VPC with `dns.enable_hub` set to `true`. Resource binding must be enabled for + // the `target` service. + AllowResourceBinding *bool `json:"allow_resource_binding,omitempty"` + // The name for this endpoint gateway. The name must not be used by another endpoint gateway in the VPC. Name *string `json:"name,omitempty"` } @@ -54798,6 +55885,11 @@ func UnmarshalEndpointGatewayPatch(m map[string]json.RawMessage, result interfac err = core.SDKErrorf(err, "", "allow_dns_resolution_binding-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allow_resource_binding", &obj.AllowResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "allow_resource_binding-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -54813,6 +55905,9 @@ func (endpointGatewayPatch *EndpointGatewayPatch) AsPatch() (_patch map[string]i if !core.IsNil(endpointGatewayPatch.AllowDnsResolutionBinding) { _patch["allow_dns_resolution_binding"] = endpointGatewayPatch.AllowDnsResolutionBinding } + if !core.IsNil(endpointGatewayPatch.AllowResourceBinding) { + _patch["allow_resource_binding"] = endpointGatewayPatch.AllowResourceBinding + } if !core.IsNil(endpointGatewayPatch.Name) { _patch["name"] = endpointGatewayPatch.Name } @@ -54990,6 +56085,329 @@ func UnmarshalEndpointGatewayReservedIP(m map[string]json.RawMessage, result int return } +// EndpointGatewayResourceBinding : EndpointGatewayResourceBinding struct +type EndpointGatewayResourceBinding struct { + // The date and time that the resource binding was created. + CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + + // The URL for this endpoint gateway resource binding. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this endpoint gateway resource binding. + ID *string `json:"id" validate:"required"` + + // The reasons for the current `lifecycle_state` (if any). + LifecycleReasons []EndpointGatewayResourceBindingLifecycleReason `json:"lifecycle_reasons" validate:"required"` + + // The lifecycle state of the resource binding. + LifecycleState *string `json:"lifecycle_state" validate:"required"` + + // The name for this resource binding. The name is unique across all resource bindings for the endpoint gateway. + Name *string `json:"name" validate:"required"` + + // The resource type. + ResourceType *string `json:"resource_type" validate:"required"` + + // The fully qualified domain name of the service endpoint for the resource targeted by this resource binding. + ServiceEndpoint *string `json:"service_endpoint" validate:"required"` + + // The target for this endpoint gateway resource binding. + Target EndpointGatewayResourceBindingTargetIntf `json:"target" validate:"required"` + + // The type of resource binding: + // - `weak`: The binding is not dependent on the existence of the target resource. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Type *string `json:"type" validate:"required"` +} + +// Constants associated with the EndpointGatewayResourceBinding.LifecycleState property. +// The lifecycle state of the resource binding. +const ( + EndpointGatewayResourceBindingLifecycleStateDeletingConst = "deleting" + EndpointGatewayResourceBindingLifecycleStateFailedConst = "failed" + EndpointGatewayResourceBindingLifecycleStatePendingConst = "pending" + EndpointGatewayResourceBindingLifecycleStateStableConst = "stable" + EndpointGatewayResourceBindingLifecycleStateSuspendedConst = "suspended" + EndpointGatewayResourceBindingLifecycleStateUpdatingConst = "updating" + EndpointGatewayResourceBindingLifecycleStateWaitingConst = "waiting" +) + +// Constants associated with the EndpointGatewayResourceBinding.ResourceType property. +// The resource type. +const ( + EndpointGatewayResourceBindingResourceTypeEndpointGatewayResourceBindingConst = "endpoint_gateway_resource_binding" +) + +// Constants associated with the EndpointGatewayResourceBinding.Type property. +// The type of resource binding: +// - `weak`: The binding is not dependent on the existence of the target resource. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + EndpointGatewayResourceBindingTypeWeakConst = "weak" +) + +// UnmarshalEndpointGatewayResourceBinding unmarshals an instance of EndpointGatewayResourceBinding from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBinding(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBinding) + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalEndpointGatewayResourceBindingLifecycleReason) + if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) + if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "service_endpoint", &obj.ServiceEndpoint) + if err != nil { + err = core.SDKErrorf(err, "", "service_endpoint-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalEndpointGatewayResourceBindingTarget) + if err != nil { + err = core.SDKErrorf(err, "", "target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// EndpointGatewayResourceBindingCollection : EndpointGatewayResourceBindingCollection struct +type EndpointGatewayResourceBindingCollection struct { + // A link to the first page of resources. + First *PageLink `json:"first" validate:"required"` + + // The maximum number of resources that can be returned by the request. + Limit *int64 `json:"limit" validate:"required"` + + // A link to the next page of resources. This property is present for all pages + // except the last page. + Next *PageLink `json:"next,omitempty"` + + // A page of resource bindings for the endpoint gateway. + ResourceBindings []EndpointGatewayResourceBinding `json:"resource_bindings" validate:"required"` + + // The total number of resources across all pages. + TotalCount *int64 `json:"total_count" validate:"required"` +} + +// UnmarshalEndpointGatewayResourceBindingCollection unmarshals an instance of EndpointGatewayResourceBindingCollection from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingCollection) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPageLink) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPageLink) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "resource_bindings", &obj.ResourceBindings, UnmarshalEndpointGatewayResourceBinding) + if err != nil { + err = core.SDKErrorf(err, "", "resource_bindings-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) + if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *EndpointGatewayResourceBindingCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + start, err := core.GetQueryParam(resp.Next.Href, "start") + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) + return nil, err + } else if start == nil { + return nil, nil + } + return start, nil +} + +// EndpointGatewayResourceBindingLifecycleReason : EndpointGatewayResourceBindingLifecycleReason struct +type EndpointGatewayResourceBindingLifecycleReason struct { + // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) + // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + // support) + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Code *string `json:"code" validate:"required"` + + // An explanation of the reason for this lifecycle state. + Message *string `json:"message" validate:"required"` + + // A link to documentation about the reason for this lifecycle state. + MoreInfo *string `json:"more_info,omitempty"` +} + +// Constants associated with the EndpointGatewayResourceBindingLifecycleReason.Code property. +// A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) +// - `resource_suspended_by_provider`: The resource has been suspended (contact IBM +// support) +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + EndpointGatewayResourceBindingLifecycleReasonCodeInternalErrorConst = "internal_error" + EndpointGatewayResourceBindingLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" +) + +// UnmarshalEndpointGatewayResourceBindingLifecycleReason unmarshals an instance of EndpointGatewayResourceBindingLifecycleReason from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingLifecycleReason(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingLifecycleReason) + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "message", &obj.Message) + if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) + if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// EndpointGatewayResourceBindingPatch : EndpointGatewayResourceBindingPatch struct +type EndpointGatewayResourceBindingPatch struct { + // The name for this resource binding. The name must not be used by another resource binding for the endpoint gateway. + Name *string `json:"name,omitempty"` +} + +// UnmarshalEndpointGatewayResourceBindingPatch unmarshals an instance of EndpointGatewayResourceBindingPatch from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the EndpointGatewayResourceBindingPatch +func (endpointGatewayResourceBindingPatch *EndpointGatewayResourceBindingPatch) AsPatch() (_patch map[string]interface{}, err error) { + _patch = map[string]interface{}{} + if !core.IsNil(endpointGatewayResourceBindingPatch.Name) { + _patch["name"] = endpointGatewayResourceBindingPatch.Name + } + + return +} + +// EndpointGatewayResourceBindingTarget : The target for this endpoint gateway resource binding. +// Models which "extend" this model: +// - EndpointGatewayResourceBindingTargetCRN +type EndpointGatewayResourceBindingTarget struct { + CRN *string `json:"crn,omitempty"` +} + +func (*EndpointGatewayResourceBindingTarget) isaEndpointGatewayResourceBindingTarget() bool { + return true +} + +type EndpointGatewayResourceBindingTargetIntf interface { + isaEndpointGatewayResourceBindingTarget() bool +} + +// UnmarshalEndpointGatewayResourceBindingTarget unmarshals an instance of EndpointGatewayResourceBindingTarget from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingTarget(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingTarget) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// EndpointGatewayResourceBindingTargetPrototype : The target to use for this resource binding. +// Models which "extend" this model: +// - EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN +type EndpointGatewayResourceBindingTargetPrototype struct { + CRN *string `json:"crn,omitempty"` +} + +func (*EndpointGatewayResourceBindingTargetPrototype) isaEndpointGatewayResourceBindingTargetPrototype() bool { + return true +} + +type EndpointGatewayResourceBindingTargetPrototypeIntf interface { + isaEndpointGatewayResourceBindingTargetPrototype() bool +} + +// UnmarshalEndpointGatewayResourceBindingTargetPrototype unmarshals an instance of EndpointGatewayResourceBindingTargetPrototype from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingTargetPrototype) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // EndpointGatewayTarget : The target for this endpoint gateway. // Models which "extend" this model: // - EndpointGatewayTargetPrivatePathServiceGatewayReference @@ -55091,6 +56509,12 @@ func UnmarshalEndpointGatewayTarget(m map[string]json.RawMessage, result interfa // - Has `service_endpoints` that overlap with the `service_endpoints` for this endpoint // gateway. // +// If `allow_dns_resolution_binding` is `true`, and `allow_resource_binding` is `true`, then: +// - The VPC in the topology with `dns.enable_hub` set to `true` must have an endpoint +// gateway with the same `target` as this endpoint gateway. +// - No other VPC in the topology can have an endpoint gateway with a resource binding +// using the same `service_endpoint` as a resource binding for this endpoint gateway. +// // Models which "extend" this model: // - EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype // - EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypeProviderInfrastructureServicePrototype @@ -57089,6 +58513,44 @@ func (options *GetEndpointGatewayOptions) SetHeaders(param map[string]string) *G return options } +// GetEndpointGatewayResourceBindingOptions : The GetEndpointGatewayResourceBinding options. +type GetEndpointGatewayResourceBindingOptions struct { + // The endpoint gateway identifier. + EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="` + + // The resource binding identifier. + ID *string `json:"id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewGetEndpointGatewayResourceBindingOptions : Instantiate GetEndpointGatewayResourceBindingOptions +func (*VpcV1) NewGetEndpointGatewayResourceBindingOptions(endpointGatewayID string, id string) *GetEndpointGatewayResourceBindingOptions { + return &GetEndpointGatewayResourceBindingOptions{ + EndpointGatewayID: core.StringPtr(endpointGatewayID), + ID: core.StringPtr(id), + } +} + +// SetEndpointGatewayID : Allow user to set EndpointGatewayID +func (_options *GetEndpointGatewayResourceBindingOptions) SetEndpointGatewayID(endpointGatewayID string) *GetEndpointGatewayResourceBindingOptions { + _options.EndpointGatewayID = core.StringPtr(endpointGatewayID) + return _options +} + +// SetID : Allow user to set ID +func (_options *GetEndpointGatewayResourceBindingOptions) SetID(id string) *GetEndpointGatewayResourceBindingOptions { + _options.ID = core.StringPtr(id) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *GetEndpointGatewayResourceBindingOptions) SetHeaders(param map[string]string) *GetEndpointGatewayResourceBindingOptions { + options.Headers = param + return options +} + // GetFloatingIPOptions : The GetFloatingIP options. type GetFloatingIPOptions struct { // The floating IP identifier. @@ -59667,6 +61129,44 @@ func (options *GetVPNGatewayOptions) SetHeaders(param map[string]string) *GetVPN return options } +// GetVPNGatewayServiceConnectionOptions : The GetVPNGatewayServiceConnection options. +type GetVPNGatewayServiceConnectionOptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // The VPN gateway service connection identifier. + ID *string `json:"id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewGetVPNGatewayServiceConnectionOptions : Instantiate GetVPNGatewayServiceConnectionOptions +func (*VpcV1) NewGetVPNGatewayServiceConnectionOptions(vpnGatewayID string, id string) *GetVPNGatewayServiceConnectionOptions { + return &GetVPNGatewayServiceConnectionOptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + ID: core.StringPtr(id), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *GetVPNGatewayServiceConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *GetVPNGatewayServiceConnectionOptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetID : Allow user to set ID +func (_options *GetVPNGatewayServiceConnectionOptions) SetID(id string) *GetVPNGatewayServiceConnectionOptions { + _options.ID = core.StringPtr(id) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *GetVPNGatewayServiceConnectionOptions) SetHeaders(param map[string]string) *GetVPNGatewayServiceConnectionOptions { + options.Headers = param + return options +} + // GetVPNServerClientConfigurationOptions : The GetVPNServerClientConfiguration options. type GetVPNServerClientConfigurationOptions struct { // The VPN server identifier. @@ -62421,6 +63921,9 @@ type Instance struct { // The image the virtual server instance was provisioned from. Image *ImageReference `json:"image,omitempty"` + // The instance group membership for this virtual server instance. + InstanceGroupMembership *InstanceGroupMembershipReferenceInstanceContext `json:"instance_group_membership,omitempty"` + // The reasons for the current `lifecycle_state` (if any). LifecycleReasons []InstanceLifecycleReason `json:"lifecycle_reasons" validate:"required"` @@ -62512,6 +64015,9 @@ type Instance struct { // The volume attachments for this virtual server instance, including the boot volume attachment. VolumeAttachments []VolumeAttachmentReferenceInstanceContext `json:"volume_attachments" validate:"required"` + // The volume bandwidth QoS mode for this virtual server instance. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode" validate:"required"` + // The VPC this virtual server instance resides in. VPC *VPCReference `json:"vpc" validate:"required"` @@ -62576,6 +64082,13 @@ const ( InstanceStatusStoppingConst = "stopping" ) +// Constants associated with the Instance.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode for this virtual server instance. +const ( + InstanceVolumeBandwidthQosModePooledConst = "pooled" + InstanceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // UnmarshalInstance unmarshals an instance of Instance from the specified map of raw messages. func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(Instance) @@ -62669,6 +64182,11 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "instance_group_membership", &obj.InstanceGroupMembership, UnmarshalInstanceGroupMembershipReferenceInstanceContext) + if err != nil { + err = core.SDKErrorf(err, "", "instance_group_membership-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalInstanceLifecycleReason) if err != nil { err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) @@ -62784,6 +64302,11 @@ func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err er err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -64812,16 +66335,16 @@ type InstanceGroupManagerActionPrototype struct { // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The date and time the scheduled action will run. - RunAt *strfmt.DateTime `json:"run_at,omitempty"` + // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min + // period. + CronSpec *string `json:"cron_spec,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` - // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min - // period. - CronSpec *string `json:"cron_spec,omitempty"` + // The date and time the scheduled action will run. + RunAt *strfmt.DateTime `json:"run_at,omitempty"` } func (*InstanceGroupManagerActionPrototype) isaInstanceGroupManagerActionPrototype() bool { @@ -64840,9 +66363,9 @@ func UnmarshalInstanceGroupManagerActionPrototype(m map[string]json.RawMessage, err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) + err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { - err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) @@ -64855,9 +66378,9 @@ func UnmarshalInstanceGroupManagerActionPrototype(m map[string]json.RawMessage, err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) + err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { - err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -66002,6 +67525,57 @@ func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (_pa return } +// InstanceGroupMembershipReferenceInstanceContext : InstanceGroupMembershipReferenceInstanceContext struct +type InstanceGroupMembershipReferenceInstanceContext struct { + // If present, this property indicates the referenced resource has been deleted, and provides + // some supplementary information. + Deleted *Deleted `json:"deleted,omitempty"` + + // The URL for this instance group membership. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this instance group membership. + ID *string `json:"id" validate:"required"` + + // The instance group associated with this membership. + InstanceGroup *InstanceGroupReference `json:"instance_group" validate:"required"` + + // The name for this instance group membership. The name is unique across all memberships for the instance group. + Name *string `json:"name" validate:"required"` +} + +// UnmarshalInstanceGroupMembershipReferenceInstanceContext unmarshals an instance of InstanceGroupMembershipReferenceInstanceContext from the specified map of raw messages. +func UnmarshalInstanceGroupMembershipReferenceInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupMembershipReferenceInstanceContext) + err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDeleted) + if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "instance_group", &obj.InstanceGroup, UnmarshalInstanceGroupReference) + if err != nil { + err = core.SDKErrorf(err, "", "instance_group-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // InstanceGroupPatch : To add or update load balancer specification for an instance group the `membership_count` must first be set to 0. type InstanceGroupPatch struct { // The port to use for new load balancer pool members created by this instance group. @@ -67063,6 +68637,7 @@ type InstancePatch struct { // - Have the same `vcpu.architecture`. // - Support the number of network attachments or network interfaces the instance // currently has. + // - Have the `volume_bandwidth_qos_mode` listed in its `volume_bandwidth_qos_modes`. Profile InstancePatchProfileIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPatch `json:"reservation_affinity,omitempty"` @@ -67071,6 +68646,13 @@ type InstancePatch struct { // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` + + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // For this property to be changed, the virtual server instance `status` must be + // `stopping` or `stopped`. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` } // Constants associated with the InstancePatch.ConfidentialComputeMode property. @@ -67084,6 +68666,17 @@ const ( InstancePatchConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePatch.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// For this property to be changed, the virtual server instance `status` must be +// `stopping` or `stopped`. +const ( + InstancePatchVolumeBandwidthQosModePooledConst = "pooled" + InstancePatchVolumeBandwidthQosModeWeightedConst = "weighted" +) + // UnmarshalInstancePatch unmarshals an instance of InstancePatch from the specified map of raw messages. func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePatch) @@ -67132,6 +68725,11 @@ func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (e err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -67166,6 +68764,9 @@ func (instancePatch *InstancePatch) AsPatch() (_patch map[string]interface{}, er if !core.IsNil(instancePatch.TotalVolumeBandwidth) { _patch["total_volume_bandwidth"] = instancePatch.TotalVolumeBandwidth } + if !core.IsNil(instancePatch.VolumeBandwidthQosMode) { + _patch["volume_bandwidth_qos_mode"] = instancePatch.VolumeBandwidthQosMode + } return } @@ -67181,6 +68782,7 @@ func (instancePatch *InstancePatch) AsPatch() (_patch map[string]interface{}, er // - Have the same `vcpu.architecture`. // - Support the number of network attachments or network interfaces the instance // currently has. +// - Have the `volume_bandwidth_qos_mode` listed in its `volume_bandwidth_qos_modes`. // // Models which "extend" this model: // - InstancePatchProfileInstanceProfileIdentityByName @@ -67493,6 +69095,8 @@ type InstanceProfile struct { VcpuCount InstanceProfileVcpuIntf `json:"vcpu_count" validate:"required"` VcpuManufacturer InstanceProfileVcpuManufacturerIntf `json:"vcpu_manufacturer" validate:"required"` + + VolumeBandwidthQosModes InstanceProfileVolumeBandwidthQoSModesIntf `json:"volume_bandwidth_qos_modes" validate:"required"` } // Constants associated with the InstanceProfile.ResourceType property. @@ -67651,6 +69255,11 @@ func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{}) err = core.SDKErrorf(err, "", "vcpu_manufacturer-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "volume_bandwidth_qos_modes", &obj.VolumeBandwidthQosModes, UnmarshalInstanceProfileVolumeBandwidthQoSModes) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_modes-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -67816,7 +69425,7 @@ func UnmarshalInstanceProfileClusterNetworkAttachmentCount(m map[string]json.Raw // InstanceProfileCollection : InstanceProfileCollection struct type InstanceProfileCollection struct { - // A page of virtual server instance profiles. + // The virtual server instance profiles. Profiles []InstanceProfile `json:"profiles" validate:"required"` } @@ -69131,6 +70740,76 @@ func UnmarshalInstanceProfileVolumeBandwidth(m map[string]json.RawMessage, resul return } +// InstanceProfileVolumeBandwidthQoSModes : InstanceProfileVolumeBandwidthQoSModes struct +// Models which "extend" this model: +// - InstanceProfileVolumeBandwidthQoSModesEnum +// - InstanceProfileVolumeBandwidthQoSModesDependent +type InstanceProfileVolumeBandwidthQoSModes struct { + // The default volume bandwidth QoS mode for this profile. + Default *string `json:"default,omitempty"` + + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The permitted volume bandwidth QoS modes for an instance using this profile. + Values []string `json:"values,omitempty"` +} + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModes.Default property. +// The default volume bandwidth QoS mode for this profile. +const ( + InstanceProfileVolumeBandwidthQoSModesDefaultPooledConst = "pooled" + InstanceProfileVolumeBandwidthQoSModesDefaultWeightedConst = "weighted" +) + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModes.Type property. +// The type for this profile field. +const ( + InstanceProfileVolumeBandwidthQoSModesTypeEnumConst = "enum" +) + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModes.Values property. +// A volume bandwidth QoS mode: +// - `pooled`: All volumes attached to an instance will pool and share bandwidth. +// - `weighted`: Each volume attached to an instance will have its own bandwidth, weighted according to its IOPS. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + InstanceProfileVolumeBandwidthQoSModesValuesPooledConst = "pooled" + InstanceProfileVolumeBandwidthQoSModesValuesWeightedConst = "weighted" +) + +func (*InstanceProfileVolumeBandwidthQoSModes) isaInstanceProfileVolumeBandwidthQoSModes() bool { + return true +} + +type InstanceProfileVolumeBandwidthQoSModesIntf interface { + isaInstanceProfileVolumeBandwidthQoSModes() bool +} + +// UnmarshalInstanceProfileVolumeBandwidthQoSModes unmarshals an instance of InstanceProfileVolumeBandwidthQoSModes from the specified map of raw messages. +func UnmarshalInstanceProfileVolumeBandwidthQoSModes(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceProfileVolumeBandwidthQoSModes) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // InstancePrototype : InstancePrototype struct // Models which "extend" this model: // - InstancePrototypeInstanceByImage @@ -69196,12 +70875,11 @@ type InstancePrototype struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this // virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change - // in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change + // in the future without changing the API version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` - // The reservation affinity settings for this virtual server instance. If specified, - // `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + // The reservation affinity settings for this virtual server instance. ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` // The resource group to use. If unspecified, the account's [default resource @@ -69220,6 +70898,12 @@ type InstancePrototype struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network @@ -69270,6 +70954,16 @@ const ( InstancePrototypeConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototype.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstancePrototype) isaInstancePrototype() bool { return true } @@ -69356,6 +71050,11 @@ func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{} err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -69579,8 +71278,7 @@ func (instanceReservationAffinityPatch *InstanceReservationAffinityPatch) asPatc return } -// InstanceReservationAffinityPrototype : The reservation affinity settings for this virtual server instance. If specified, -// `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. +// InstanceReservationAffinityPrototype : The reservation affinity settings for this virtual server instance. type InstanceReservationAffinityPrototype struct { // The reservation affinity policy to use for this virtual server instance: // - `disabled`: Reservations will not be used @@ -69768,12 +71466,11 @@ type InstanceTemplate struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this // virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change - // in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change + // in the future without changing the API version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` - // The reservation affinity settings for this virtual server instance. If specified, - // `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + // The reservation affinity settings for this virtual server instance. ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` // The resource group for this instance template. @@ -69791,6 +71488,12 @@ type InstanceTemplate struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network @@ -69838,6 +71541,16 @@ const ( InstanceTemplateConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplate.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplate) isaInstanceTemplate() bool { return true } @@ -69848,149 +71561,177 @@ type InstanceTemplateIntf interface { // UnmarshalInstanceTemplate unmarshals an instance of InstanceTemplate from the specified map of raw messages. func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceTemplate) - err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "cluster_network_attachments", &obj.ClusterNetworkAttachments, UnmarshalInstanceClusterNetworkAttachmentPrototypeInstanceContext) - if err != nil { - err = core.SDKErrorf(err, "", "cluster_network_attachments-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "confidential_compute_mode", &obj.ConfidentialComputeMode) - if err != nil { - err = core.SDKErrorf(err, "", "confidential_compute_mode-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) - if err != nil { - err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) - if err != nil { - err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) - if err != nil { - err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) - if err != nil { - err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) - if err != nil { - err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) - if err != nil { - err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) - if err != nil { - err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) - if err != nil { - err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) - if err != nil { - err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) - return + // Check for source_snapshot presence to determine object type + var isSourceSnapshot bool + if bootVolumeRaw, exists := m["boot_volume_attachment"]; exists && len(bootVolumeRaw) > 0 && string(bootVolumeRaw) != "null" { + var bootVolumeMap map[string]json.RawMessage + if err = json.Unmarshal(bootVolumeRaw, &bootVolumeMap); err == nil { + if volumeRaw, volumeExists := bootVolumeMap["volume"]; volumeExists && len(volumeRaw) > 0 && string(volumeRaw) != "null" { + var volumeMap map[string]json.RawMessage + if err = json.Unmarshal(volumeRaw, &volumeMap); err == nil { + if _, snapshotExists := volumeMap["source_snapshot"]; snapshotExists { + isSourceSnapshot = true + } + } + } + } } - err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) - if err != nil { - err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) + if isSourceSnapshot { + err = core.UnmarshalModel(m, "", result, UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext-error", common.GetComponentInfo()) + } return - } - err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) + } else { + obj := new(InstanceTemplate) + err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "availability_policy-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "cluster_network_attachments", &obj.ClusterNetworkAttachments, UnmarshalInstanceClusterNetworkAttachmentPrototypeInstanceContext) + if err != nil { + err = core.SDKErrorf(err, "", "cluster_network_attachments-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "confidential_compute_mode", &obj.ConfidentialComputeMode) + if err != nil { + err = core.SDKErrorf(err, "", "confidential_compute_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "default_trusted_profile-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "enable_secure_boot", &obj.EnableSecureBoot) + if err != nil { + err = core.SDKErrorf(err, "", "enable_secure_boot-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "keys-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "metadata_service-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "placement_target-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "profile-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "reservation_affinity", &obj.ReservationAffinity, UnmarshalInstanceReservationAffinityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "reservation_affinity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) + if err != nil { + err = core.SDKErrorf(err, "", "resource_group-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "total_volume_bandwidth-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) + if err != nil { + err = core.SDKErrorf(err, "", "user_data-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) + if err != nil { + err = core.SDKErrorf(err, "", "boot_volume_attachment-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "image-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "zone-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "network_attachments", &obj.NetworkAttachments, UnmarshalInstanceNetworkAttachmentPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "network_attachments-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "primary_network_attachment", &obj.PrimaryNetworkAttachment, UnmarshalInstanceNetworkAttachmentPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "primary_network_attachment-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "network_interfaces-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) + if err != nil { + err = core.SDKErrorf(err, "", "primary_network_interface-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "catalog_offering-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return } // InstanceTemplateCollection : InstanceTemplateCollection struct @@ -70197,12 +71938,11 @@ type InstanceTemplatePrototype struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this // virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change - // in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change + // in the future without changing the API version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` - // The reservation affinity settings for this virtual server instance. If specified, - // `vcpu.tenancy` must be `dedicated`, and `vcpu.percentage` must be `100`. + // The reservation affinity settings for this virtual server instance. ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` // The resource group to use. If unspecified, the account's [default resource @@ -70221,6 +71961,12 @@ type InstanceTemplatePrototype struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network @@ -70273,6 +72019,16 @@ const ( InstanceTemplatePrototypeConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototype.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplatePrototype) isaInstanceTemplatePrototype() bool { return true } @@ -70359,6 +72115,11 @@ func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result int err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -70475,7 +72236,8 @@ type InstanceVcpu struct { // The number of VCPUs assigned. Count *int64 `json:"count" validate:"required"` - // The VCPU manufacturer. + // The VCPU manufacturer for this instance. It may be `unassigned` when instance `status` is `failed`, `pending`, or + // `stopped`. // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -70493,14 +72255,16 @@ const ( ) // Constants associated with the InstanceVcpu.Manufacturer property. -// The VCPU manufacturer. +// The VCPU manufacturer for this instance. It may be `unassigned` when instance `status` is `failed`, `pending`, or +// `stopped`. // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( - InstanceVcpuManufacturerAmdConst = "amd" - InstanceVcpuManufacturerIBMConst = "ibm" - InstanceVcpuManufacturerIntelConst = "intel" + InstanceVcpuManufacturerAmdConst = "amd" + InstanceVcpuManufacturerIBMConst = "ibm" + InstanceVcpuManufacturerIntelConst = "intel" + InstanceVcpuManufacturerUnassignedConst = "unassigned" ) // UnmarshalInstanceVcpu unmarshals an instance of InstanceVcpu from the specified map of raw messages. @@ -72088,8 +73852,57 @@ func (options *ListEndpointGatewayIpsOptions) SetHeaders(param map[string]string return options } +// ListEndpointGatewayResourceBindingsOptions : The ListEndpointGatewayResourceBindings options. +type ListEndpointGatewayResourceBindingsOptions struct { + // The endpoint gateway identifier. + EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="` + + // A server-provided token determining what resource to start the page on. + Start *string `json:"start,omitempty"` + + // The number of resources to return on a page. + Limit *int64 `json:"limit,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewListEndpointGatewayResourceBindingsOptions : Instantiate ListEndpointGatewayResourceBindingsOptions +func (*VpcV1) NewListEndpointGatewayResourceBindingsOptions(endpointGatewayID string) *ListEndpointGatewayResourceBindingsOptions { + return &ListEndpointGatewayResourceBindingsOptions{ + EndpointGatewayID: core.StringPtr(endpointGatewayID), + } +} + +// SetEndpointGatewayID : Allow user to set EndpointGatewayID +func (_options *ListEndpointGatewayResourceBindingsOptions) SetEndpointGatewayID(endpointGatewayID string) *ListEndpointGatewayResourceBindingsOptions { + _options.EndpointGatewayID = core.StringPtr(endpointGatewayID) + return _options +} + +// SetStart : Allow user to set Start +func (_options *ListEndpointGatewayResourceBindingsOptions) SetStart(start string) *ListEndpointGatewayResourceBindingsOptions { + _options.Start = core.StringPtr(start) + return _options +} + +// SetLimit : Allow user to set Limit +func (_options *ListEndpointGatewayResourceBindingsOptions) SetLimit(limit int64) *ListEndpointGatewayResourceBindingsOptions { + _options.Limit = core.Int64Ptr(limit) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListEndpointGatewayResourceBindingsOptions) SetHeaders(param map[string]string) *ListEndpointGatewayResourceBindingsOptions { + options.Headers = param + return options +} + // ListEndpointGatewaysOptions : The ListEndpointGateways options. type ListEndpointGatewaysOptions struct { + // Filters the collection to endpoint gateways with an `allow_resource_binding` property matching the specified value. + AllowResourceBinding *bool `json:"allow_resource_binding,omitempty"` + // Filters the collection to resources with a `name` property matching the exact specified name. Name *string `json:"name,omitempty"` @@ -72139,6 +73952,12 @@ func (*VpcV1) NewListEndpointGatewaysOptions() *ListEndpointGatewaysOptions { return &ListEndpointGatewaysOptions{} } +// SetAllowResourceBinding : Allow user to set AllowResourceBinding +func (_options *ListEndpointGatewaysOptions) SetAllowResourceBinding(allowResourceBinding bool) *ListEndpointGatewaysOptions { + _options.AllowResourceBinding = core.BoolPtr(allowResourceBinding) + return _options +} + // SetName : Allow user to set Name func (_options *ListEndpointGatewaysOptions) SetName(name string) *ListEndpointGatewaysOptions { _options.Name = core.StringPtr(name) @@ -73284,6 +75103,14 @@ type ListInstancesOptions struct { // Filters the collection to resources with a `dedicated_host.name` property matching the exact specified name. DedicatedHostName *string `json:"dedicated_host.name,omitempty"` + // Filters the collection to instances with an `instance_group_membership.instance_group.id` property matching the + // specified instance group identifier. + InstanceGroupMembershipInstanceGroupID *string `json:"instance_group_membership.instance_group.id,omitempty"` + + // Filters the collection to instances with an `instance_group_membership.instance_group.crn` property matching the + // specified instance group CRN. + InstanceGroupMembershipInstanceGroupCRN *string `json:"instance_group_membership.instance_group.crn,omitempty"` + // Filters the collection to resources with a `placement_target.id` property matching the specified placement group // identifier. PlacementGroupID *string `json:"placement_group.id,omitempty"` @@ -73394,6 +75221,18 @@ func (_options *ListInstancesOptions) SetDedicatedHostName(dedicatedHostName str return _options } +// SetInstanceGroupMembershipInstanceGroupID : Allow user to set InstanceGroupMembershipInstanceGroupID +func (_options *ListInstancesOptions) SetInstanceGroupMembershipInstanceGroupID(instanceGroupMembershipInstanceGroupID string) *ListInstancesOptions { + _options.InstanceGroupMembershipInstanceGroupID = core.StringPtr(instanceGroupMembershipInstanceGroupID) + return _options +} + +// SetInstanceGroupMembershipInstanceGroupCRN : Allow user to set InstanceGroupMembershipInstanceGroupCRN +func (_options *ListInstancesOptions) SetInstanceGroupMembershipInstanceGroupCRN(instanceGroupMembershipInstanceGroupCRN string) *ListInstancesOptions { + _options.InstanceGroupMembershipInstanceGroupCRN = core.StringPtr(instanceGroupMembershipInstanceGroupCRN) + return _options +} + // SetPlacementGroupID : Allow user to set PlacementGroupID func (_options *ListInstancesOptions) SetPlacementGroupID(placementGroupID string) *ListInstancesOptions { _options.PlacementGroupID = core.StringPtr(placementGroupID) @@ -76232,6 +78071,34 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt return options } +// ListVPNGatewayAdvertisedCIDRsOptions : The ListVPNGatewayAdvertisedCIDRs options. +type ListVPNGatewayAdvertisedCIDRsOptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewListVPNGatewayAdvertisedCIDRsOptions : Instantiate ListVPNGatewayAdvertisedCIDRsOptions +func (*VpcV1) NewListVPNGatewayAdvertisedCIDRsOptions(vpnGatewayID string) *ListVPNGatewayAdvertisedCIDRsOptions { + return &ListVPNGatewayAdvertisedCIDRsOptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *ListVPNGatewayAdvertisedCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayAdvertisedCIDRsOptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListVPNGatewayAdvertisedCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayAdvertisedCIDRsOptions { + options.Headers = param + return options +} + // ListVPNGatewayConnectionsLocalCIDRsOptions : The ListVPNGatewayConnectionsLocalCIDRs options. type ListVPNGatewayConnectionsLocalCIDRsOptions struct { // The VPN gateway identifier. @@ -76370,6 +78237,52 @@ func (options *ListVPNGatewayConnectionsPeerCIDRsOptions) SetHeaders(param map[s return options } +// ListVPNGatewayServiceConnectionsOptions : The ListVPNGatewayServiceConnections options. +type ListVPNGatewayServiceConnectionsOptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // A server-provided token determining what resource to start the page on. + Start *string `json:"start,omitempty"` + + // The number of resources to return on a page. + Limit *int64 `json:"limit,omitempty"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewListVPNGatewayServiceConnectionsOptions : Instantiate ListVPNGatewayServiceConnectionsOptions +func (*VpcV1) NewListVPNGatewayServiceConnectionsOptions(vpnGatewayID string) *ListVPNGatewayServiceConnectionsOptions { + return &ListVPNGatewayServiceConnectionsOptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *ListVPNGatewayServiceConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayServiceConnectionsOptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetStart : Allow user to set Start +func (_options *ListVPNGatewayServiceConnectionsOptions) SetStart(start string) *ListVPNGatewayServiceConnectionsOptions { + _options.Start = core.StringPtr(start) + return _options +} + +// SetLimit : Allow user to set Limit +func (_options *ListVPNGatewayServiceConnectionsOptions) SetLimit(limit int64) *ListVPNGatewayServiceConnectionsOptions { + _options.Limit = core.Int64Ptr(limit) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *ListVPNGatewayServiceConnectionsOptions) SetHeaders(param map[string]string) *ListVPNGatewayServiceConnectionsOptions { + options.Headers = param + return options +} + // ListVPNGatewaysOptions : The ListVPNGateways options. type ListVPNGatewaysOptions struct { // A server-provided token determining what resource to start the page on. @@ -80563,7 +82476,8 @@ func UnmarshalLoadBalancerPoolMemberReference(m map[string]json.RawMessage, resu // LoadBalancerPoolMemberTarget : The pool member target. // Models which "extend" this model: // - LoadBalancerPoolMemberTargetInstanceReference -// - LoadBalancerPoolMemberTargetIP +// - LoadBalancerPoolMemberTargetByReservedIP +// - LoadBalancerPoolMemberTargetIPNotReservedIP // - LoadBalancerPoolMemberTargetLoadBalancerReference type LoadBalancerPoolMemberTarget struct { // The CRN for this virtual server instance. @@ -80584,6 +82498,8 @@ type LoadBalancerPoolMemberTarget struct { // The IP address. // + // If the address has not yet been selected, the value will be `0.0.0.0`. + // // This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in // the future. Address *string `json:"address,omitempty"` @@ -80595,7 +82511,7 @@ type LoadBalancerPoolMemberTarget struct { // Constants associated with the LoadBalancerPoolMemberTarget.ResourceType property. // The resource type. const ( - LoadBalancerPoolMemberTargetResourceTypeLoadBalancerConst = "load_balancer" + LoadBalancerPoolMemberTargetResourceTypeSubnetReservedIPConst = "subnet_reserved_ip" ) func (*LoadBalancerPoolMemberTarget) isaLoadBalancerPoolMemberTarget() bool { @@ -80656,6 +82572,7 @@ func UnmarshalLoadBalancerPoolMemberTarget(m map[string]json.RawMessage, result // any other load balancer in the same VPC. // Models which "extend" this model: // - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity +// - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity // - LoadBalancerPoolMemberTargetPrototypeIP // - LoadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity type LoadBalancerPoolMemberTargetPrototype struct { @@ -81256,6 +83173,8 @@ type LoadBalancerProfile struct { // The load balancer profiles that load balancers with this profile can target. TargetableLoadBalancerProfiles []LoadBalancerProfileReference `json:"targetable_load_balancer_profiles" validate:"required"` + TargetableResourceTypes *LoadBalancerProfileTargetableResourceTypes `json:"targetable_resource_types" validate:"required"` + UDPSupported LoadBalancerProfileUDPSupportedIntf `json:"udp_supported" validate:"required"` } @@ -81332,6 +83251,11 @@ func UnmarshalLoadBalancerProfile(m map[string]json.RawMessage, result interface err = core.SDKErrorf(err, "", "targetable_load_balancer_profiles-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "targetable_resource_types", &obj.TargetableResourceTypes, UnmarshalLoadBalancerProfileTargetableResourceTypes) + if err != nil { + err = core.SDKErrorf(err, "", "targetable_resource_types-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "udp_supported", &obj.UDPSupported, UnmarshalLoadBalancerProfileUDPSupported) if err != nil { err = core.SDKErrorf(err, "", "udp_supported-error", common.GetComponentInfo()) @@ -81879,6 +83803,53 @@ func UnmarshalLoadBalancerProfileSourceIPSessionPersistenceSupported(m map[strin return } +// LoadBalancerProfileTargetableResourceTypes : LoadBalancerProfileTargetableResourceTypes struct +type LoadBalancerProfileTargetableResourceTypes struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The resource types that pool members of load balancers with this profile can target. + Values []string `json:"values" validate:"required"` +} + +// Constants associated with the LoadBalancerProfileTargetableResourceTypes.Type property. +// The type for this profile field. +const ( + LoadBalancerProfileTargetableResourceTypesTypeEnumConst = "enum" +) + +// Constants associated with the LoadBalancerProfileTargetableResourceTypes.Values property. +// The [resource types](https://cloud.ibm.com/docs/vpc?topic=vpc-nlb-vs-elb&interface=ui#lb-comparison-chart) that can +// be targeted by the load balancer pool member: +// - 'instance': Traffic is forwarded to the primary IP address for the instance's +// 'primary_network_interface' or 'primary_network_attachment'. +// - 'subnet_reserved_ip': Traffic is forwarded to the reserved IP address. +// - `load_balancer`: Traffic is forwarded to the load balancer. +// - `ip`: Traffic is forwarded to the IP address. +const ( + LoadBalancerProfileTargetableResourceTypesValuesIPConst = "ip" + LoadBalancerProfileTargetableResourceTypesValuesInstanceConst = "instance" + LoadBalancerProfileTargetableResourceTypesValuesLoadBalancerConst = "load_balancer" + LoadBalancerProfileTargetableResourceTypesValuesSubnetReservedIPConst = "subnet_reserved_ip" +) + +// UnmarshalLoadBalancerProfileTargetableResourceTypes unmarshals an instance of LoadBalancerProfileTargetableResourceTypes from the specified map of raw messages. +func UnmarshalLoadBalancerProfileTargetableResourceTypes(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerProfileTargetableResourceTypes) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // LoadBalancerProfileUDPSupported : LoadBalancerProfileUDPSupported struct // Models which "extend" this model: // - LoadBalancerProfileUDPSupportedFixed @@ -82502,29 +84473,29 @@ func UnmarshalNetworkACLRule(m map[string]json.RawMessage, result interface{}) ( err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } - - switch discValue { - case "all": + if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolAll-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolAll-error", common.GetComponentInfo()) } - case "icmp": + } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolIcmp-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolIcmp-error", common.GetComponentInfo()) } - case "tcp", "udp": + } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) } - default: - // Fallback to base NetworkACLRuleItem for unknown protocols - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleGeneric) + } else if discValue == "udp" { + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemGeneric-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) } + } else { + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } @@ -82807,175 +84778,33 @@ func UnmarshalNetworkACLRuleItem(m map[string]json.RawMessage, result interface{ err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } - - switch discValue { - case "all": + if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolAll-error", common.GetComponentInfo()) } - case "icmp": + } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolIcmp-error", common.GetComponentInfo()) } - case "tcp", "udp": + } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) } - default: - // Fallback to base NetworkACLRuleItem for unknown protocols - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemGeneric) + } else if discValue == "udp" { + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemGeneric-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-NetworkACLRuleItemNetworkACLRuleProtocolTcpudp-error", common.GetComponentInfo()) } + } else { + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } -// UnmarshalNetworkACLRuleItemGeneric unmarshals the base NetworkACLRuleItem fields for unknown protocol types -func UnmarshalNetworkACLRuleItemGeneric(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleItem) - err = core.UnmarshalPrimitive(m, "action", &obj.Action) - if err != nil { - err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) - if err != nil { - err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) - if err != nil { - err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - if err != nil { - err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) - if err != nil { - err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) - if err != nil { - err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "source", &obj.Source) - if err != nil { - err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) - return - } - - // Attempt to unmarshal optional protocol-specific fields - ignore errors as these may not be present - _ = core.UnmarshalPrimitive(m, "code", &obj.Code) - _ = core.UnmarshalPrimitive(m, "type", &obj.Type) - _ = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) - _ = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) - _ = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) - _ = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) - - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// UnmarshalNetworkACLRuleGeneric unmarshals the base NetworkACLRuleItem fields for unknown protocol types -func UnmarshalNetworkACLRuleGeneric(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRule) - err = core.UnmarshalPrimitive(m, "action", &obj.Action) - if err != nil { - err = core.SDKErrorf(err, "", "action-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) - if err != nil { - err = core.SDKErrorf(err, "", "before-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) - if err != nil { - err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) - if err != nil { - err = core.SDKErrorf(err, "", "destination-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - if err != nil { - err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) - if err != nil { - err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) - if err != nil { - err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "source", &obj.Source) - if err != nil { - err = core.SDKErrorf(err, "", "source-error", common.GetComponentInfo()) - return - } - - // Attempt to unmarshal optional protocol-specific fields - ignore errors as these may not be present - _ = core.UnmarshalPrimitive(m, "code", &obj.Code) - _ = core.UnmarshalPrimitive(m, "type", &obj.Type) - _ = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) - _ = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) - _ = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) - _ = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) - - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // NetworkACLRulePatch : NetworkACLRulePatch struct type NetworkACLRulePatch struct { // The action to perform for a packet matching the rule. @@ -84032,10 +85861,11 @@ type NetworkInterfacePrototype struct { Name *string `json:"name,omitempty"` // The primary IP address to bind to the instance network interface. This can be - // specified using an existing reserved IP, or a prototype object for a new reserved IP. + // specified using an existing reserved IP, or a prototype object for a new reserved + // IP. // - // If an existing reserved IP or a prototype object with an address is specified, it must - // be available on the instance network interface's subnet. Otherwise, an + // If an existing reserved IP or a prototype object with an address is specified, it + // must be available on the instance network interface's subnet. Otherwise, an // available address on the subnet will be automatically selected and reserved. PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"` @@ -86641,6 +88471,44 @@ func (options *RemoveVirtualNetworkInterfaceIPOptions) SetHeaders(param map[stri return options } +// RemoveVPNGatewayAdvertisedCIDROptions : The RemoveVPNGatewayAdvertisedCIDR options. +type RemoveVPNGatewayAdvertisedCIDROptions struct { + // The VPN gateway identifier. + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` + + // The IP address range in CIDR block notation. + CIDR *string `json:"cidr" validate:"required,ne="` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewRemoveVPNGatewayAdvertisedCIDROptions : Instantiate RemoveVPNGatewayAdvertisedCIDROptions +func (*VpcV1) NewRemoveVPNGatewayAdvertisedCIDROptions(vpnGatewayID string, cidr string) *RemoveVPNGatewayAdvertisedCIDROptions { + return &RemoveVPNGatewayAdvertisedCIDROptions{ + VPNGatewayID: core.StringPtr(vpnGatewayID), + CIDR: core.StringPtr(cidr), + } +} + +// SetVPNGatewayID : Allow user to set VPNGatewayID +func (_options *RemoveVPNGatewayAdvertisedCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayAdvertisedCIDROptions { + _options.VPNGatewayID = core.StringPtr(vpnGatewayID) + return _options +} + +// SetCIDR : Allow user to set CIDR +func (_options *RemoveVPNGatewayAdvertisedCIDROptions) SetCIDR(cidr string) *RemoveVPNGatewayAdvertisedCIDROptions { + _options.CIDR = core.StringPtr(cidr) + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *RemoveVPNGatewayAdvertisedCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayAdvertisedCIDROptions { + options.Headers = param + return options +} + // RemoveVPNGatewayConnectionsLocalCIDROptions : The RemoveVPNGatewayConnectionsLocalCIDR options. type RemoveVPNGatewayConnectionsLocalCIDROptions struct { // The VPN gateway identifier. @@ -90534,82 +92402,33 @@ func UnmarshalSecurityGroupRule(m map[string]json.RawMessage, result interface{} err = core.SDKErrorf(err, "required discriminator property 'protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } - - switch discValue { - case "all": + if discValue == "all" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolAll-error", common.GetComponentInfo()) } - case "icmp": + } else if discValue == "icmp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolIcmp-error", common.GetComponentInfo()) } - case "tcp", "udp": + } else if discValue == "tcp" { err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) } - default: - // Fallback to base SecurityGroupRule for unknown protocols - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleGeneric) + } else if discValue == "udp" { + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) if err != nil { - err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleGeneric-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "unmarshal-SecurityGroupRuleSecurityGroupRuleProtocolTcpudp-error", common.GetComponentInfo()) } + } else { + errMsg := fmt.Sprintf("unrecognized value for discriminator property 'protocol': %s", discValue) + err = core.SDKErrorf(err, errMsg, "invalid-discriminator", common.GetComponentInfo()) } return } -// UnmarshalSecurityGroupRuleGeneric unmarshals the base SecurityGroupRule fields for unknown protocol types -func UnmarshalSecurityGroupRuleGeneric(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRule) - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - if err != nil { - err = core.SDKErrorf(err, "", "direction-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) - if err != nil { - err = core.SDKErrorf(err, "", "ip_version-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalSecurityGroupRuleLocal) - if err != nil { - err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) - if err != nil { - err = core.SDKErrorf(err, "", "remote-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) - if err != nil { - err = core.SDKErrorf(err, "", "protocol-error", common.GetComponentInfo()) - return - } - - // Attempt to unmarshal optional fields - ignore errors as these may not be present - _ = core.UnmarshalPrimitive(m, "code", &obj.Code) - _ = core.UnmarshalPrimitive(m, "type", &obj.Type) - _ = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) - _ = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) - - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // SecurityGroupRuleCollection : SecurityGroupRuleCollection struct type SecurityGroupRuleCollection struct { // The rules for the security group. @@ -91556,14 +93375,37 @@ type Share struct { // with access to this file share's data and its snapshots. AccessorBindings []ShareAccessorBindingReference `json:"accessor_bindings" validate:"required"` + // The access protocols to allow for this share: + // - `nfs4`: NFSv4 is used to access this share via its associated share mount target. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + AllowedAccessProtocols []string `json:"allowed_access_protocols" validate:"required"` + // The transit encryption modes allowed for this share: // - `none`: Not encrypted in transit. - // - `user_managed`: Encrypted in transit using an instance identity certificate. + // - `ipsec`: Encrypted in transit using an instance identity certificate. + // - `stunnel`: Encrypted in transit using a connection via the installed stunnel + // client. // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes" validate:"required"` + // The data availability mode of the share: + // - `zonal`: The share's data will be available provided the `zone` of the share is + // available. Additionally, disasters affecting the zone may lead to data loss. + // - `regional`: The share's data will be available provided at least one zone in the + // region is available. Additionally, disasters affecting the entire region may lead + // to data loss. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + AvailabilityMode *string `json:"availability_mode" validate:"required"` + + // The maximum bandwidth (in megabits per second) for the share. + Bandwidth *int64 `json:"bandwidth" validate:"required"` + // The date and time that the file share is created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` @@ -91587,10 +93429,9 @@ type Share struct { // The owner assigned to the file share at creation. InitialOwner *ShareInitialOwner `json:"initial_owner" validate:"required"` - // The maximum input/output operations per second (IOPS) for the file share. In addition, each client accessing the - // share will be restricted to 48,000 IOPS. + // The maximum input/output operations per second (IOPS) for the file share. // - // The maximum IOPS for a share may increase in the future. + // The maximum IOPS for a share as defined by the share's profile may increase in the future. Iops *int64 `json:"iops" validate:"required"` // The latest job associated with this file share. @@ -91690,11 +93531,22 @@ type Share struct { // future. SourceSnapshot ShareSourceSnapshotIntf `json:"source_snapshot,omitempty"` + // The [storage + // generation](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles&interface=api#using-api-iops-profiles): + // - `1`: The first storage generation + // - `2`: The second storage generation + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + StorageGeneration *int64 `json:"storage_generation" validate:"required"` + // The tags for this resource. UserTags []string `json:"user_tags" validate:"required"` // The zone this file share resides in. - Zone *ZoneReference `json:"zone" validate:"required"` + // + // This property will be absent for shares with an `availability_mode` of `regional`. + Zone *ZoneReference `json:"zone,omitempty"` } // Constants associated with the Share.AccessControlMode property. @@ -91724,10 +93576,31 @@ const ( ShareAccessorBindingRoleOriginConst = "origin" ) +// Constants associated with the Share.AllowedAccessProtocols property. +const ( + ShareAllowedAccessProtocolsNfs4Const = "nfs4" +) + // Constants associated with the Share.AllowedTransitEncryptionModes property. const ( - ShareAllowedTransitEncryptionModesNoneConst = "none" - ShareAllowedTransitEncryptionModesUserManagedConst = "user_managed" + ShareAllowedTransitEncryptionModesIpsecConst = "ipsec" + ShareAllowedTransitEncryptionModesNoneConst = "none" + ShareAllowedTransitEncryptionModesStunnelConst = "stunnel" +) + +// Constants associated with the Share.AvailabilityMode property. +// The data availability mode of the share: +// - `zonal`: The share's data will be available provided the `zone` of the share is +// available. Additionally, disasters affecting the zone may lead to data loss. +// - `regional`: The share's data will be available provided at least one zone in the +// region is available. Additionally, disasters affecting the entire region may lead +// to data loss. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + ShareAvailabilityModeRegionalConst = "regional" + ShareAvailabilityModeZonalConst = "zonal" ) // Constants associated with the Share.Encryption property. @@ -91809,11 +93682,26 @@ func UnmarshalShare(m map[string]json.RawMessage, result interface{}) (err error err = core.SDKErrorf(err, "", "accessor_bindings-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allowed_access_protocols", &obj.AllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "allowed_transit_encryption_modes", &obj.AllowedTransitEncryptionModes) if err != nil { err = core.SDKErrorf(err, "", "allowed_transit_encryption_modes-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "availability_mode", &obj.AvailabilityMode) + if err != nil { + err = core.SDKErrorf(err, "", "availability_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) @@ -91954,6 +93842,11 @@ func UnmarshalShare(m map[string]json.RawMessage, result interface{}) (err error err = core.SDKErrorf(err, "", "source_snapshot-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "storage_generation", &obj.StorageGeneration) + if err != nil { + err = core.SDKErrorf(err, "", "storage_generation-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) @@ -92614,6 +94507,13 @@ type ShareMountTarget struct { // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. AccessControlMode *string `json:"access_control_mode" validate:"required"` + // The protocol used to access the share for this share mount target: + // - `nfs4`: NFSv4 will be used. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + AccessProtocol *string `json:"access_protocol" validate:"required"` + // The date and time that the share mount target was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` @@ -92657,8 +94557,10 @@ type ShareMountTarget struct { Subnet *SubnetReference `json:"subnet,omitempty"` // The transit encryption mode for this share mount target: - // - `none`: Not encrypted in transit - // - `user_managed`: Encrypted in transit using an instance identity certificate + // - `none`: Not encrypted in transit. + // - `ipsec`: Encrypted in transit using an instance identity certificate. + // - `stunnel`: Encrypted in transit using a connection via the installed stunnel + // client. // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. @@ -92692,6 +94594,16 @@ const ( ShareMountTargetAccessControlModeVPCConst = "vpc" ) +// Constants associated with the ShareMountTarget.AccessProtocol property. +// The protocol used to access the share for this share mount target: +// - `nfs4`: NFSv4 will be used. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + ShareMountTargetAccessProtocolNfs4Const = "nfs4" +) + // Constants associated with the ShareMountTarget.LifecycleState property. // The lifecycle state of the mount target. const ( @@ -92712,14 +94624,17 @@ const ( // Constants associated with the ShareMountTarget.TransitEncryption property. // The transit encryption mode for this share mount target: -// - `none`: Not encrypted in transit -// - `user_managed`: Encrypted in transit using an instance identity certificate +// - `none`: Not encrypted in transit. +// - `ipsec`: Encrypted in transit using an instance identity certificate. +// - `stunnel`: Encrypted in transit using a connection via the installed stunnel +// client. // // The enumerated values for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. const ( - ShareMountTargetTransitEncryptionNoneConst = "none" - ShareMountTargetTransitEncryptionUserManagedConst = "user_managed" + ShareMountTargetTransitEncryptionIpsecConst = "ipsec" + ShareMountTargetTransitEncryptionNoneConst = "none" + ShareMountTargetTransitEncryptionStunnelConst = "stunnel" ) // UnmarshalShareMountTarget unmarshals an instance of ShareMountTarget from the specified map of raw messages. @@ -92730,6 +94645,11 @@ func UnmarshalShareMountTarget(m map[string]json.RawMessage, result interface{}) err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "access_protocol", &obj.AccessProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "access_protocol-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) @@ -92893,18 +94813,26 @@ func (shareMountTargetPatch *ShareMountTargetPatch) AsPatch() (_patch map[string // - ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup // - ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC type ShareMountTargetPrototype struct { + // The protocol to use to access the share for this share mount target: + // - `nfs4`: NFSv4 will be used. + // + // The specified value must be listed in the share's `allowed_access_protocols`. + AccessProtocol *string `json:"access_protocol" validate:"required"` + // The name for this share mount target. The name must not be used by another mount target for the file share. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. - // - `user_managed`: Encrypted in transit using an instance identity certificate. The - // `access_control_mode` for the share must be `security_group`. + // - `ipsec`: Encrypted in transit using an instance identity certificate. The + // `access_control_mode` for the share must be `security_group`. + // - `stunnel`: Encrypted in transit using an stunnel connection. The + // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. - TransitEncryption *string `json:"transit_encryption,omitempty"` + TransitEncryption *string `json:"transit_encryption" validate:"required"` VirtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf `json:"virtual_network_interface,omitempty"` @@ -92912,17 +94840,29 @@ type ShareMountTargetPrototype struct { VPC VPCIdentityIntf `json:"vpc,omitempty"` } +// Constants associated with the ShareMountTargetPrototype.AccessProtocol property. +// The protocol to use to access the share for this share mount target: +// - `nfs4`: NFSv4 will be used. +// +// The specified value must be listed in the share's `allowed_access_protocols`. +const ( + ShareMountTargetPrototypeAccessProtocolNfs4Const = "nfs4" +) + // Constants associated with the ShareMountTargetPrototype.TransitEncryption property. // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. -// - `user_managed`: Encrypted in transit using an instance identity certificate. The +// - `ipsec`: Encrypted in transit using an instance identity certificate. The +// `access_control_mode` for the share must be `security_group`. +// - `stunnel`: Encrypted in transit using an stunnel connection. The // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. const ( - ShareMountTargetPrototypeTransitEncryptionNoneConst = "none" - ShareMountTargetPrototypeTransitEncryptionUserManagedConst = "user_managed" + ShareMountTargetPrototypeTransitEncryptionIpsecConst = "ipsec" + ShareMountTargetPrototypeTransitEncryptionNoneConst = "none" + ShareMountTargetPrototypeTransitEncryptionStunnelConst = "stunnel" ) func (*ShareMountTargetPrototype) isaShareMountTargetPrototype() bool { @@ -92936,6 +94876,11 @@ type ShareMountTargetPrototypeIntf interface { // UnmarshalShareMountTargetPrototype unmarshals an instance of ShareMountTargetPrototype from the specified map of raw messages. func UnmarshalShareMountTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetPrototype) + err = core.UnmarshalPrimitive(m, "access_protocol", &obj.AccessProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "access_protocol-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -93213,6 +95158,14 @@ type SharePatch struct { // `replication_role` must be `none` and `accessor_binding_role` must not be `accessor`. AccessControlMode *string `json:"access_control_mode,omitempty"` + // The access protocols to allow for this share (replacing any existing access protocols). + // + // If the share has existing mount targets, the set of allowed access protocols must contain all `access_protocol` + // modes specified by existing mount targets. + // + // For this property to be updated, the `accessor_binding_role` must be `none`. + AllowedAccessProtocols []string `json:"allowed_access_protocols,omitempty"` + // The transit encryption modes to allow for this share // (replacing the existing allowed transit encryption modes). The specified transit encryption modes must contain all // transit_encryption modes specified by existing mount targets. @@ -93220,6 +95173,13 @@ type SharePatch struct { // For this property to be updated, the `accessor_binding_role` must be `none`. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` + // The maximum bandwidth (in megabits per second) for the share. + // + // For this property to be changed, the share `accessor_binding_role` must not be + // `accessor`, the share profile must not have a `bandwidth.type` of `dependent` or + // `fixed`, and the specified value must be within the `bandwidth` range of the share's profile. + Bandwidth *int64 `json:"bandwidth,omitempty"` + // The maximum input/output operations per second (IOPS) for the file share. // // The maximum IOPS for a share may increase in the future. For this property to be changed, the share @@ -93270,10 +95230,16 @@ const ( SharePatchAccessControlModeVPCConst = "vpc" ) +// Constants associated with the SharePatch.AllowedAccessProtocols property. +const ( + SharePatchAllowedAccessProtocolsNfs4Const = "nfs4" +) + // Constants associated with the SharePatch.AllowedTransitEncryptionModes property. const ( - SharePatchAllowedTransitEncryptionModesNoneConst = "none" - SharePatchAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePatchAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePatchAllowedTransitEncryptionModesNoneConst = "none" + SharePatchAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // UnmarshalSharePatch unmarshals an instance of SharePatch from the specified map of raw messages. @@ -93284,11 +95250,21 @@ func UnmarshalSharePatch(m map[string]json.RawMessage, result interface{}) (err err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allowed_access_protocols", &obj.AllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "allowed_transit_encryption_modes", &obj.AllowedTransitEncryptionModes) if err != nil { err = core.SDKErrorf(err, "", "allowed_transit_encryption_modes-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { err = core.SDKErrorf(err, "", "iops-error", common.GetComponentInfo()) @@ -93329,9 +95305,15 @@ func (sharePatch *SharePatch) AsPatch() (_patch map[string]interface{}, err erro if !core.IsNil(sharePatch.AccessControlMode) { _patch["access_control_mode"] = sharePatch.AccessControlMode } + if !core.IsNil(sharePatch.AllowedAccessProtocols) { + _patch["allowed_access_protocols"] = sharePatch.AllowedAccessProtocols + } if !core.IsNil(sharePatch.AllowedTransitEncryptionModes) { _patch["allowed_transit_encryption_modes"] = sharePatch.AllowedTransitEncryptionModes } + if !core.IsNil(sharePatch.Bandwidth) { + _patch["bandwidth"] = sharePatch.Bandwidth + } if !core.IsNil(sharePatch.Iops) { _patch["iops"] = sharePatch.Iops } @@ -93356,6 +95338,18 @@ func (sharePatch *SharePatch) AsPatch() (_patch map[string]interface{}, err erro // ShareProfile : ShareProfile struct type ShareProfile struct { + // The possible allowed access protocols for a share with this profile. + AllowedAccessProtocols ShareProfileAllowedAccessProtocolsIntf `json:"allowed_access_protocols" validate:"required"` + + // The possible allowed transit encryption modes for a share with this profile. + AllowedTransitEncryptionModes ShareProfileAllowedTransitEncryptionModesIntf `json:"allowed_transit_encryption_modes" validate:"required"` + + // The data availability mode of a share with this profile. + AvailabilityModes ShareProfileAvailabilityModesIntf `json:"availability_modes" validate:"required"` + + // The permitted bandwidth (in megabits per second) for a share with this profile. + Bandwidth ShareProfileBandwidthIntf `json:"bandwidth" validate:"required"` + // The permitted capacity range (in gigabytes) for a share with this profile. Capacity ShareProfileCapacityIntf `json:"capacity" validate:"required"` @@ -93376,6 +95370,9 @@ type ShareProfile struct { // The resource type. ResourceType *string `json:"resource_type" validate:"required"` + + // The storage generation for a share with this profile. + StorageGeneration ShareProfileStorageGenerationIntf `json:"storage_generation" validate:"required"` } // Constants associated with the ShareProfile.Family property. @@ -93396,6 +95393,26 @@ const ( // UnmarshalShareProfile unmarshals an instance of ShareProfile from the specified map of raw messages. func UnmarshalShareProfile(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfile) + err = core.UnmarshalModel(m, "allowed_access_protocols", &obj.AllowedAccessProtocols, UnmarshalShareProfileAllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "allowed_transit_encryption_modes", &obj.AllowedTransitEncryptionModes, UnmarshalShareProfileAllowedTransitEncryptionModes) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_transit_encryption_modes-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "availability_modes", &obj.AvailabilityModes, UnmarshalShareProfileAvailabilityModes) + if err != nil { + err = core.SDKErrorf(err, "", "availability_modes-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "bandwidth", &obj.Bandwidth, UnmarshalShareProfileBandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "capacity", &obj.Capacity, UnmarshalShareProfileCapacity) if err != nil { err = core.SDKErrorf(err, "", "capacity-error", common.GetComponentInfo()) @@ -93426,6 +95443,318 @@ func UnmarshalShareProfile(m map[string]json.RawMessage, result interface{}) (er err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "storage_generation", &obj.StorageGeneration, UnmarshalShareProfileStorageGeneration) + if err != nil { + err = core.SDKErrorf(err, "", "storage_generation-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAllowedAccessProtocols : ShareProfileAllowedAccessProtocols struct +// Models which "extend" this model: +// - ShareProfileAllowedAccessProtocolsSubset +type ShareProfileAllowedAccessProtocols struct { + // The default allowed access protocol modes for shares with this profile. + Default []string `json:"default,omitempty"` + + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The possible allowed access protocols for shares with this profile: + // - `nfs4`: NFSv4 will be used. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values,omitempty"` +} + +// Constants associated with the ShareProfileAllowedAccessProtocols.Default property. +const ( + ShareProfileAllowedAccessProtocolsDefaultNfs4Const = "nfs4" +) + +// Constants associated with the ShareProfileAllowedAccessProtocols.Type property. +// The type for this profile field. +const ( + ShareProfileAllowedAccessProtocolsTypeSubsetConst = "subset" +) + +// Constants associated with the ShareProfileAllowedAccessProtocols.Values property. +const ( + ShareProfileAllowedAccessProtocolsValuesNfs4Const = "nfs4" +) + +func (*ShareProfileAllowedAccessProtocols) isaShareProfileAllowedAccessProtocols() bool { + return true +} + +type ShareProfileAllowedAccessProtocolsIntf interface { + isaShareProfileAllowedAccessProtocols() bool +} + +// UnmarshalShareProfileAllowedAccessProtocols unmarshals an instance of ShareProfileAllowedAccessProtocols from the specified map of raw messages. +func UnmarshalShareProfileAllowedAccessProtocols(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAllowedAccessProtocols) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAllowedTransitEncryptionModes : ShareProfileAllowedTransitEncryptionModes struct +// Models which "extend" this model: +// - ShareProfileAllowedTransitEncryptionModesSubset +type ShareProfileAllowedTransitEncryptionModes struct { + // The default allowed transit encryption modes for shares with this profile. + Default []string `json:"default,omitempty"` + + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The allowed [transit encryption + // modes](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-vpc-about&interface=ui#fs-eit) for a share with this + // profile: + // - `none`: Not encrypted in transit. + // - `ipsec`: Encrypted in transit using an instance identity certificate. + // - `stunnel`: Encrypted in transit using a connection via an stunnel connection. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values,omitempty"` +} + +// Constants associated with the ShareProfileAllowedTransitEncryptionModes.Default property. +const ( + ShareProfileAllowedTransitEncryptionModesDefaultIpsecConst = "ipsec" + ShareProfileAllowedTransitEncryptionModesDefaultNoneConst = "none" + ShareProfileAllowedTransitEncryptionModesDefaultStunnelConst = "stunnel" +) + +// Constants associated with the ShareProfileAllowedTransitEncryptionModes.Type property. +// The type for this profile field. +const ( + ShareProfileAllowedTransitEncryptionModesTypeSubsetConst = "subset" +) + +// Constants associated with the ShareProfileAllowedTransitEncryptionModes.Values property. +const ( + ShareProfileAllowedTransitEncryptionModesValuesIpsecConst = "ipsec" + ShareProfileAllowedTransitEncryptionModesValuesNoneConst = "none" + ShareProfileAllowedTransitEncryptionModesValuesStunnelConst = "stunnel" +) + +func (*ShareProfileAllowedTransitEncryptionModes) isaShareProfileAllowedTransitEncryptionModes() bool { + return true +} + +type ShareProfileAllowedTransitEncryptionModesIntf interface { + isaShareProfileAllowedTransitEncryptionModes() bool +} + +// UnmarshalShareProfileAllowedTransitEncryptionModes unmarshals an instance of ShareProfileAllowedTransitEncryptionModes from the specified map of raw messages. +func UnmarshalShareProfileAllowedTransitEncryptionModes(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAllowedTransitEncryptionModes) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAvailabilityModes : ShareProfileAvailabilityModes struct +// Models which "extend" this model: +// - ShareProfileAvailabilityModesEnum +// - ShareProfileAvailabilityModesFixed +type ShareProfileAvailabilityModes struct { + // The default data availability mode for this profile. + Default *string `json:"default,omitempty"` + + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The data availability mode of the share: + // - `zonal`: The data availability of this share is limited only to a single zone of a + // given region as provided by the `zone` of the share. + // - `regional`: The data availability of this share covers all zones in the region where + // the share is created. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values,omitempty"` + + // The value for this profile field. + Value *string `json:"value,omitempty"` +} + +// Constants associated with the ShareProfileAvailabilityModes.Default property. +// The default data availability mode for this profile. +const ( + ShareProfileAvailabilityModesDefaultRegionalConst = "regional" + ShareProfileAvailabilityModesDefaultZonalConst = "zonal" +) + +// Constants associated with the ShareProfileAvailabilityModes.Type property. +// The type for this profile field. +const ( + ShareProfileAvailabilityModesTypeEnumConst = "enum" +) + +// Constants associated with the ShareProfileAvailabilityModes.Values property. +const ( + ShareProfileAvailabilityModesValuesRegionalConst = "regional" + ShareProfileAvailabilityModesValuesZonalConst = "zonal" +) + +// Constants associated with the ShareProfileAvailabilityModes.Value property. +// The value for this profile field. +const ( + ShareProfileAvailabilityModesValueRegionalConst = "regional" + ShareProfileAvailabilityModesValueZonalConst = "zonal" +) + +func (*ShareProfileAvailabilityModes) isaShareProfileAvailabilityModes() bool { + return true +} + +type ShareProfileAvailabilityModesIntf interface { + isaShareProfileAvailabilityModes() bool +} + +// UnmarshalShareProfileAvailabilityModes unmarshals an instance of ShareProfileAvailabilityModes from the specified map of raw messages. +func UnmarshalShareProfileAvailabilityModes(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAvailabilityModes) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidth : ShareProfileBandwidth struct +// Models which "extend" this model: +// - ShareProfileBandwidthRange +// - ShareProfileBandwidthDependent +// - ShareProfileBandwidthFixed +// - ShareProfileBandwidthEnum +// - ShareProfileBandwidthDependentRange +type ShareProfileBandwidth struct { + // The default value for this profile field. + Default *int64 `json:"default,omitempty"` + + // The maximum value for this profile field. + Max *int64 `json:"max,omitempty"` + + // The minimum value for this profile field. + Min *int64 `json:"min,omitempty"` + + // The increment step value for this profile field. + Step *int64 `json:"step,omitempty"` + + // The type for this profile field. + Type *string `json:"type,omitempty"` + + Value *int64 `json:"value,omitempty"` + + // The permitted values for this profile field. + Values []int64 `json:"values,omitempty"` +} + +// Constants associated with the ShareProfileBandwidth.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthTypeRangeConst = "range" +) + +func (*ShareProfileBandwidth) isaShareProfileBandwidth() bool { + return true +} + +type ShareProfileBandwidthIntf interface { + isaShareProfileBandwidth() bool +} + +// UnmarshalShareProfileBandwidth unmarshals an instance of ShareProfileBandwidth from the specified map of raw messages. +func UnmarshalShareProfileBandwidth(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidth) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "max", &obj.Max) + if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "min", &obj.Min) + if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "step", &obj.Step) + if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -93758,6 +96087,48 @@ func UnmarshalShareProfileReference(m map[string]json.RawMessage, result interfa return } +// ShareProfileStorageGeneration : ShareProfileStorageGeneration struct +// Models which "extend" this model: +// - ShareProfileStorageGenerationFixed +type ShareProfileStorageGeneration struct { + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The value for this profile field. + Value *int64 `json:"value,omitempty"` +} + +// Constants associated with the ShareProfileStorageGeneration.Type property. +// The type for this profile field. +const ( + ShareProfileStorageGenerationTypeFixedConst = "fixed" +) + +func (*ShareProfileStorageGeneration) isaShareProfileStorageGeneration() bool { + return true +} + +type ShareProfileStorageGenerationIntf interface { + isaShareProfileStorageGeneration() bool +} + +// UnmarshalShareProfileStorageGeneration unmarshals an instance of ShareProfileStorageGeneration from the specified map of raw messages. +func UnmarshalShareProfileStorageGeneration(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileStorageGeneration) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SharePrototype : SharePrototype struct // Models which "extend" this model: // - SharePrototypeShareBySize @@ -93766,9 +96137,10 @@ func UnmarshalShareProfileReference(m map[string]json.RawMessage, result interfa // - SharePrototypeShareBySourceSnapshot type SharePrototype struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. @@ -93781,6 +96153,9 @@ type SharePrototype struct { // Configuration for a replica file share to create and associate with this file share. If // unspecified, a replica may be subsequently added by creating a new file share with a // `source_share` referencing this file share. + // + // Replica file shares can only be created for shares with an `availability_mode` of + // `zonal`. ReplicaShare *SharePrototypeShareContext `json:"replica_share,omitempty"` // The tags for this resource. @@ -93795,6 +96170,22 @@ type SharePrototype struct { // Mount targets for this share require a VPC. AccessControlMode *string `json:"access_control_mode,omitempty"` + // The access protocols to allow for this share. If unspecified: + // - If share mount targets are specified, only the access protocols specified by those + // share mount target will be allowed. + // - Otherwise, the default access protocols from the profile will be used. + AllowedAccessProtocols []string `json:"allowed_access_protocols,omitempty"` + + // The maximum bandwidth (in megabits per second) for the file share. + // + // If the share profile has a `bandwidth.type` of `dependent` or `fixed`, this property is system-managed and must not + // be specified. Otherwise, the specified value must be within the `bandwidth` range of the share's profile. + // + // Provided the property is user-managed, if it is unspecified, its value will be set based on the specified [`size` + // and + // `iops`](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles&interface=api). + Bandwidth *int64 `json:"bandwidth,omitempty"` + // The root key to use to wrap the data encryption key for the share. // // If unspecified, the `encryption` type for the share will be `provider_managed`. @@ -93829,6 +96220,9 @@ type SharePrototype struct { // The zone this file share will reside in. For a replica share in the same region as // the source share, this must be a different zone from the source share. + // + // This property must be specified if the share profile `availability_mode` is `zonal`, + // and must not be specified otherwise. Zone ZoneIdentityIntf `json:"zone,omitempty"` // The cron specification for the file share replication schedule. @@ -93839,9 +96233,12 @@ type SharePrototype struct { // [increase](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. ReplicationCronSpec *string `json:"replication_cron_spec,omitempty"` - // The source file share for this replica file share. The specified file share must not - // already have a replica, and must not be a replica. If source file share is specified - // by CRN, it may be in an [associated partner + // The source file share for this replica file share. The specified file share must: + // - Not already have a replica. + // - Not be a replica. + // - Have a `storage_generation` of `1`. + // + // If source file share is specified by CRN, it may be in an [associated partner // region](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-replication). SourceShare ShareIdentityIntf `json:"source_share,omitempty"` @@ -93862,8 +96259,9 @@ type SharePrototype struct { // Constants associated with the SharePrototype.AllowedTransitEncryptionModes property. const ( - SharePrototypeAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // Constants associated with the SharePrototype.AccessControlMode property. @@ -93879,6 +96277,11 @@ const ( SharePrototypeAccessControlModeVPCConst = "vpc" ) +// Constants associated with the SharePrototype.AllowedAccessProtocols property. +const ( + SharePrototypeAllowedAccessProtocolsNfs4Const = "nfs4" +) + func (*SharePrototype) isaSharePrototype() bool { return true } @@ -93920,6 +96323,16 @@ func UnmarshalSharePrototype(m map[string]json.RawMessage, result interface{}) ( err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allowed_access_protocols", &obj.AllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) @@ -93982,11 +96395,15 @@ func UnmarshalSharePrototype(m map[string]json.RawMessage, result interface{}) ( // SharePrototypeShareContext : Configuration for a replica file share to create and associate with this file share. If unspecified, a replica may be // subsequently added by creating a new file share with a // `source_share` referencing this file share. +// +// Replica file shares can only be created for shares with an `availability_mode` of +// `zonal`. type SharePrototypeShareContext struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The maximum input/output operations per second (IOPS) for the file share. @@ -94006,7 +96423,9 @@ type SharePrototypeShareContext struct { Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - // for this file share. The profile must support the share's specified IOPS and size. + // for this file share. The profile must: + // - support the share's specified IOPS and size, and + // - have the same `storage_generation` as the share. Profile ShareProfileIdentityIntf `json:"profile" validate:"required"` // The cron specification for the file share replication schedule. @@ -94023,21 +96442,21 @@ type SharePrototypeShareContext struct { // The zone this replica file share will reside in. For a replica share in the same // region as the source share, this must be a different zone from the source share. - Zone ZoneIdentityIntf `json:"zone" validate:"required"` + Zone ZoneIdentityIntf `json:"zone,omitempty"` } // Constants associated with the SharePrototypeShareContext.AllowedTransitEncryptionModes property. const ( - SharePrototypeShareContextAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeShareContextAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeShareContextAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeShareContextAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeShareContextAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // NewSharePrototypeShareContext : Instantiate SharePrototypeShareContext (Generic Model Constructor) -func (*VpcV1) NewSharePrototypeShareContext(profile ShareProfileIdentityIntf, replicationCronSpec string, zone ZoneIdentityIntf) (_model *SharePrototypeShareContext, err error) { +func (*VpcV1) NewSharePrototypeShareContext(profile ShareProfileIdentityIntf, replicationCronSpec string) (_model *SharePrototypeShareContext, err error) { _model = &SharePrototypeShareContext{ Profile: profile, ReplicationCronSpec: core.StringPtr(replicationCronSpec), - Zone: zone, } err = core.ValidateStruct(_model, "required parameters") if err != nil { @@ -94321,8 +96740,9 @@ type ShareSnapshot struct { // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this share snapshot. UserTags []string `json:"user_tags" validate:"required"` - // The zone this share snapshot resides in. - Zone *ZoneReference `json:"zone" validate:"required"` + // The zone this share snapshot resides in. For shares with `availability_mode` of + // `regional`, this property will be absent. + Zone *ZoneReference `json:"zone,omitempty"` } // Constants associated with the ShareSnapshot.LifecycleState property. @@ -97870,6 +100290,54 @@ func (options *UpdateEndpointGatewayOptions) SetHeaders(param map[string]string) return options } +// UpdateEndpointGatewayResourceBindingOptions : The UpdateEndpointGatewayResourceBinding options. +type UpdateEndpointGatewayResourceBindingOptions struct { + // The endpoint gateway identifier. + EndpointGatewayID *string `json:"endpoint_gateway_id" validate:"required,ne="` + + // The resource binding identifier. + ID *string `json:"id" validate:"required,ne="` + + // The endpoint gateway resource binding patch. + EndpointGatewayResourceBindingPatch map[string]interface{} `json:"EndpointGatewayResourceBinding_patch" validate:"required"` + + // Allows users to set headers on API requests. + Headers map[string]string +} + +// NewUpdateEndpointGatewayResourceBindingOptions : Instantiate UpdateEndpointGatewayResourceBindingOptions +func (*VpcV1) NewUpdateEndpointGatewayResourceBindingOptions(endpointGatewayID string, id string, endpointGatewayResourceBindingPatch map[string]interface{}) *UpdateEndpointGatewayResourceBindingOptions { + return &UpdateEndpointGatewayResourceBindingOptions{ + EndpointGatewayID: core.StringPtr(endpointGatewayID), + ID: core.StringPtr(id), + EndpointGatewayResourceBindingPatch: endpointGatewayResourceBindingPatch, + } +} + +// SetEndpointGatewayID : Allow user to set EndpointGatewayID +func (_options *UpdateEndpointGatewayResourceBindingOptions) SetEndpointGatewayID(endpointGatewayID string) *UpdateEndpointGatewayResourceBindingOptions { + _options.EndpointGatewayID = core.StringPtr(endpointGatewayID) + return _options +} + +// SetID : Allow user to set ID +func (_options *UpdateEndpointGatewayResourceBindingOptions) SetID(id string) *UpdateEndpointGatewayResourceBindingOptions { + _options.ID = core.StringPtr(id) + return _options +} + +// SetEndpointGatewayResourceBindingPatch : Allow user to set EndpointGatewayResourceBindingPatch +func (_options *UpdateEndpointGatewayResourceBindingOptions) SetEndpointGatewayResourceBindingPatch(endpointGatewayResourceBindingPatch map[string]interface{}) *UpdateEndpointGatewayResourceBindingOptions { + _options.EndpointGatewayResourceBindingPatch = endpointGatewayResourceBindingPatch + return _options +} + +// SetHeaders : Allow user to set Headers +func (options *UpdateEndpointGatewayResourceBindingOptions) SetHeaders(param map[string]string) *UpdateEndpointGatewayResourceBindingOptions { + options.Headers = param + return options +} + // UpdateFirmwareForBareMetalServerOptions : The UpdateFirmwareForBareMetalServer options. type UpdateFirmwareForBareMetalServerOptions struct { // The bare metal server identifier. @@ -99841,6 +102309,10 @@ type UpdateVirtualNetworkInterfaceOptions struct { // The virtual network interface patch. VirtualNetworkInterfacePatch map[string]interface{} `json:"VirtualNetworkInterface_patch" validate:"required"` + // If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + // Required if the request body includes an array. + IfMatch *string `json:"If-Match,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } @@ -99865,6 +102337,12 @@ func (_options *UpdateVirtualNetworkInterfaceOptions) SetVirtualNetworkInterface return _options } +// SetIfMatch : Allow user to set IfMatch +func (_options *UpdateVirtualNetworkInterfaceOptions) SetIfMatch(ifMatch string) *UpdateVirtualNetworkInterfaceOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + // SetHeaders : Allow user to set Headers func (options *UpdateVirtualNetworkInterfaceOptions) SetHeaders(param map[string]string) *UpdateVirtualNetworkInterfaceOptions { options.Headers = param @@ -100238,6 +102716,10 @@ type UpdateVPNGatewayConnectionOptions struct { // The VPN gateway connection patch. VPNGatewayConnectionPatch map[string]interface{} `json:"VPNGatewayConnection_patch" validate:"required"` + // If present, the request will fail if the specified ETag value does not match the resource's current ETag value. + // Required if the request body includes an array. + IfMatch *string `json:"If-Match,omitempty"` + // Allows users to set headers on API requests. Headers map[string]string } @@ -100269,6 +102751,12 @@ func (_options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch( return _options } +// SetIfMatch : Allow user to set IfMatch +func (_options *UpdateVPNGatewayConnectionOptions) SetIfMatch(ifMatch string) *UpdateVPNGatewayConnectionOptions { + _options.IfMatch = core.StringPtr(ifMatch) + return _options +} + // SetHeaders : Allow user to set Headers func (options *UpdateVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *UpdateVPNGatewayConnectionOptions { options.Headers = param @@ -100487,7 +102975,7 @@ type VPC struct { // // The maximum number of items for this property may // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. - CseSourceIps []VpccseSourceIP `json:"cse_source_ips,omitempty"` + CseSourceIps []VpccseSourceIP `json:"cse_source_ips" validate:"required"` // The default network ACL to use for subnets created in this VPC. DefaultNetworkACL *NetworkACLReference `json:"default_network_acl" validate:"required"` @@ -101954,6 +104442,13 @@ type VPNGateway struct { // The mode for this VPN gateway. Mode *string `json:"mode,omitempty"` + + // The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + // advertise routes with these CIDRs as route destinations. + AdvertisedCIDRs []string `json:"advertised_cidrs,omitempty"` + + // The local autonomous system number (ASN) for this VPN gateway and its connections. + LocalAsn *int64 `json:"local_asn,omitempty"` } // Constants associated with the VPNGateway.HealthState property. @@ -102086,6 +104581,35 @@ func UnmarshalVPNGateway(m map[string]json.RawMessage, result interface{}) (err err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "advertised_cidrs", &obj.AdvertisedCIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "advertised_cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "local_asn", &obj.LocalAsn) + if err != nil { + err = core.SDKErrorf(err, "", "local_asn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayAdvertisedCIDRCollection : VPNGatewayAdvertisedCIDRCollection struct +type VPNGatewayAdvertisedCIDRCollection struct { + // The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + // advertise routes with these CIDRs as route destinations. + AdvertisedCIDRs []string `json:"advertised_cidrs" validate:"required"` +} + +// UnmarshalVPNGatewayAdvertisedCIDRCollection unmarshals an instance of VPNGatewayAdvertisedCIDRCollection from the specified map of raw messages. +func UnmarshalVPNGatewayAdvertisedCIDRCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayAdvertisedCIDRCollection) + err = core.UnmarshalPrimitive(m, "advertised_cidrs", &obj.AdvertisedCIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "advertised_cidrs-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -102555,6 +105079,269 @@ func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, res return } +// VPNGatewayConnectionDynamicRouteModeLocal : VPNGatewayConnectionDynamicRouteModeLocal struct +type VPNGatewayConnectionDynamicRouteModeLocal struct { + // The local IKE identities. + // + // A VPN gateway in dynamic route mode consists of two members in active-active mode. The first identity applies to the + // first member, and the second identity applies to the second member. + IkeIdentities []VPNGatewayConnectionIkeIdentityIntf `json:"ike_identities" validate:"required"` +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModeLocal unmarshals an instance of VPNGatewayConnectionDynamicRouteModeLocal from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModeLocal(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModeLocal) + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModeLocalPrototype : VPNGatewayConnectionDynamicRouteModeLocalPrototype struct +type VPNGatewayConnectionDynamicRouteModeLocalPrototype struct { + // The local IKE identities to use. + // + // A VPN gateway in dynamic route mode consists of two members in active-active mode. The first specified identity will + // be applied to the first member, and the second specified identity will be applied to the second member. + // + // If unspecified, then `type` will be `ipv4_address` and `value` will be the public IP address of the member's VPN + // connection tunnel. + IkeIdentities []VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identities,omitempty"` +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModeLocalPrototype unmarshals an instance of VPNGatewayConnectionDynamicRouteModeLocalPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModeLocalPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModeLocalPrototype) + err = core.UnmarshalModel(m, "ike_identities", &obj.IkeIdentities, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identities-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModePeer : VPNGatewayConnectionDynamicRouteModePeer struct +// Models which "extend" this model: +// - VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionDynamicRouteModePeer struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +// Constants associated with the VPNGatewayConnectionDynamicRouteModePeer.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionDynamicRouteModePeerTypeAddressConst = "address" + VPNGatewayConnectionDynamicRouteModePeerTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionDynamicRouteModePeer) isaVPNGatewayConnectionDynamicRouteModePeer() bool { + return true +} + +type VPNGatewayConnectionDynamicRouteModePeerIntf interface { + isaVPNGatewayConnectionDynamicRouteModePeer() bool +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeer unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeer from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeer(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeer) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModePeerPrototype : VPNGatewayConnectionDynamicRouteModePeerPrototype struct +// Models which "extend" this model: +// - VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress +// - VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn +type VPNGatewayConnectionDynamicRouteModePeerPrototype struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and + // the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` + // will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionDynamicRouteModePeerPrototype) isaVPNGatewayConnectionDynamicRouteModePeerPrototype() bool { + return true +} + +type VPNGatewayConnectionDynamicRouteModePeerPrototypeIntf interface { + isaVPNGatewayConnectionDynamicRouteModePeerPrototype() bool +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototype unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeerPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeerPrototype) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModeTunnel : VPNGatewayConnectionDynamicRouteModeTunnel struct +type VPNGatewayConnectionDynamicRouteModeTunnel struct { + // The IP address of the neighbor on the virtual tunnel interface. + // This serves as the destination address for BGP peering sessions on the peer gateway + // within the tunnel. + NeighborIP *IP `json:"neighbor_ip" validate:"required"` + + // BGP routing protocol state as defined in + // [RFC 4721](https://www.rfc-editor.org/rfc/rfc4271#section-8.2.2). + ProtocolState *string `json:"protocol_state" validate:"required"` + + // The IP address of the VPN gateway member in which the tunnel resides. + PublicIP *IP `json:"public_ip" validate:"required"` + + // The status of the VPN Tunnel. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Status *string `json:"status" validate:"required"` + + // The reasons for the current status (if any). + StatusReasons []VPNGatewayConnectionTunnelStatusReason `json:"status_reasons" validate:"required"` + + // The IP address assigned to the VPN gateway's virtual tunnel interface. + // This serves as the source address for BGP peering sessions initiated from the VPN + // gateway towards the peer gateway within the tunnel. + TunnelInterfaceIP *IP `json:"tunnel_interface_ip" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionDynamicRouteModeTunnel.ProtocolState property. +// BGP routing protocol state as defined in +// [RFC 4721](https://www.rfc-editor.org/rfc/rfc4271#section-8.2.2). +const ( + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateActiveConst = "active" + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateConnectConst = "connect" + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateEstablishedConst = "established" + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateIdleConst = "idle" + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateOpenConfirmConst = "open_confirm" + VPNGatewayConnectionDynamicRouteModeTunnelProtocolStateOpenSentConst = "open_sent" +) + +// Constants associated with the VPNGatewayConnectionDynamicRouteModeTunnel.Status property. +// The status of the VPN Tunnel. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionDynamicRouteModeTunnelStatusDownConst = "down" + VPNGatewayConnectionDynamicRouteModeTunnelStatusUpConst = "up" +) + +// UnmarshalVPNGatewayConnectionDynamicRouteModeTunnel unmarshals an instance of VPNGatewayConnectionDynamicRouteModeTunnel from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModeTunnel(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModeTunnel) + err = core.UnmarshalModel(m, "neighbor_ip", &obj.NeighborIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "neighbor_ip-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "protocol_state", &obj.ProtocolState) + if err != nil { + err = core.SDKErrorf(err, "", "protocol_state-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "public_ip-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionTunnelStatusReason) + if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnel_interface_ip", &obj.TunnelInterfaceIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "tunnel_interface_ip-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionIkeIdentity : VPNGatewayConnectionIkeIdentity struct // Models which "extend" this model: // - VPNGatewayConnectionIkeIdentityVPNGatewayConnectionIkeIdentityFqdn @@ -102878,6 +105665,16 @@ type VPNGatewayConnectionPatch struct { // The pre-shared key. Psk *string `json:"psk,omitempty"` + + // The routing protocol for this VPN gateway connection. For this property to be specified, `mode` must be `route`. + // + // - `none`: No routing protocol will be used. + // - `bgp`: The BGP routing protocol will be used. + RoutingProtocol *string `json:"routing_protocol,omitempty"` + + // The VPN tunnel configuration to use for this VPN gateway connection + // (in dynamic route mode). + Tunnels []VPNGatewayConnectionTunnel `json:"tunnels,omitempty"` } // Constants associated with the VPNGatewayConnectionPatch.EstablishMode property. @@ -102893,6 +105690,16 @@ const ( VPNGatewayConnectionPatchEstablishModePeerOnlyConst = "peer_only" ) +// Constants associated with the VPNGatewayConnectionPatch.RoutingProtocol property. +// The routing protocol for this VPN gateway connection. For this property to be specified, `mode` must be `route`. +// +// - `none`: No routing protocol will be used. +// - `bgp`: The BGP routing protocol will be used. +const ( + VPNGatewayConnectionPatchRoutingProtocolBgpConst = "bgp" + VPNGatewayConnectionPatchRoutingProtocolNoneConst = "none" +) + // UnmarshalVPNGatewayConnectionPatch unmarshals an instance of VPNGatewayConnectionPatch from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPatch) @@ -102941,6 +105748,16 @@ func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result int err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionTunnel) + if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -102975,6 +105792,16 @@ func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (_patch ma if !core.IsNil(vpnGatewayConnectionPatch.Psk) { _patch["psk"] = vpnGatewayConnectionPatch.Psk } + if !core.IsNil(vpnGatewayConnectionPatch.RoutingProtocol) { + _patch["routing_protocol"] = vpnGatewayConnectionPatch.RoutingProtocol + } + if !core.IsNil(vpnGatewayConnectionPatch.Tunnels) { + var tunnelsPatches []map[string]interface{} + for _, tunnels := range vpnGatewayConnectionPatch.Tunnels { + tunnelsPatches = append(tunnelsPatches, tunnels.asPatch()) + } + _patch["tunnels"] = tunnelsPatches + } return } @@ -102983,12 +105810,19 @@ func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (_patch ma // Models which "extend" this model: // - VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch // - VPNGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatch +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch type VPNGatewayConnectionPeerPatch struct { // The IP address of the peer VPN gateway for this connection. Address *string `json:"address,omitempty"` // The FQDN of the peer VPN gateway for this connection. Fqdn *string `json:"fqdn,omitempty"` + + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn,omitempty"` } func (*VPNGatewayConnectionPeerPatch) isaVPNGatewayConnectionPeerPatch() bool { @@ -103013,6 +105847,11 @@ func UnmarshalVPNGatewayConnectionPeerPatch(m map[string]json.RawMessage, result err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -103026,6 +105865,9 @@ func (vpnGatewayConnectionPeerPatch *VPNGatewayConnectionPeerPatch) asPatch() (_ if !core.IsNil(vpnGatewayConnectionPeerPatch.Fqdn) { _patch["fqdn"] = vpnGatewayConnectionPeerPatch.Fqdn } + if !core.IsNil(vpnGatewayConnectionPeerPatch.Asn) { + _patch["asn"] = vpnGatewayConnectionPeerPatch.Asn + } return } @@ -103232,6 +106074,7 @@ func UnmarshalVPNGatewayConnectionPolicyModePeerPrototype(m map[string]json.RawM // VPNGatewayConnectionPrototype : VPNGatewayConnectionPrototype struct // Models which "extend" this model: // - VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype +// - VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype // - VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype type VPNGatewayConnectionPrototype struct { // If set to false, the VPN gateway connection is shut down. @@ -103277,6 +106120,10 @@ type VPNGatewayConnectionPrototype struct { // The routing protocol for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` + + // The VPN tunnel configuration to use for this VPN gateway connection + // (in dynamic route mode). + Tunnels []VPNGatewayConnectionTunnelPrototype `json:"tunnels,omitempty"` } // Constants associated with the VPNGatewayConnectionPrototype.EstablishMode property. @@ -103364,6 +106211,11 @@ func UnmarshalVPNGatewayConnectionPrototype(m map[string]json.RawMessage, result err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionTunnelPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -103680,6 +106532,92 @@ func UnmarshalVPNGatewayConnectionStatusReason(m map[string]json.RawMessage, res return } +// VPNGatewayConnectionTunnel : VPNGatewayConnectionTunnel struct +type VPNGatewayConnectionTunnel struct { + // The IP address of the neighbor on the virtual tunnel interface. + // This serves as the destination address for BGP peering sessions on the peer gateway + // within the tunnel. + NeighborIP *IP `json:"neighbor_ip,omitempty"` + + // The IP address assigned to the VPN gateway's virtual tunnel interface. + // This serves as the source address for BGP peering sessions initiated from the VPN + // gateway towards the peer gateway within the tunnel. + TunnelInterfaceIP *IP `json:"tunnel_interface_ip,omitempty"` +} + +// UnmarshalVPNGatewayConnectionTunnel unmarshals an instance of VPNGatewayConnectionTunnel from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionTunnel(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionTunnel) + err = core.UnmarshalModel(m, "neighbor_ip", &obj.NeighborIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "neighbor_ip-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnel_interface_ip", &obj.TunnelInterfaceIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "tunnel_interface_ip-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the VPNGatewayConnectionTunnel +func (vpnGatewayConnectionTunnel *VPNGatewayConnectionTunnel) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(vpnGatewayConnectionTunnel.NeighborIP) { + _patch["neighbor_ip"] = vpnGatewayConnectionTunnel.NeighborIP.asPatch() + } + if !core.IsNil(vpnGatewayConnectionTunnel.TunnelInterfaceIP) { + _patch["tunnel_interface_ip"] = vpnGatewayConnectionTunnel.TunnelInterfaceIP.asPatch() + } + + return +} + +// VPNGatewayConnectionTunnelPrototype : VPNGatewayConnectionTunnelPrototype struct +type VPNGatewayConnectionTunnelPrototype struct { + // The IP address of the neighbor on the virtual tunnel interface. + // This serves as the destination address for BGP peering sessions on the peer gateway + // within the tunnel. + NeighborIP *IP `json:"neighbor_ip" validate:"required"` + + // The IP address assigned to the VPN gateway's virtual tunnel interface. + // This serves as the source address for BGP peering sessions initiated from the VPN + // gateway towards the peer gateway within the tunnel. + TunnelInterfaceIP *IP `json:"tunnel_interface_ip" validate:"required"` +} + +// NewVPNGatewayConnectionTunnelPrototype : Instantiate VPNGatewayConnectionTunnelPrototype (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionTunnelPrototype(neighborIP *IP, tunnelInterfaceIP *IP) (_model *VPNGatewayConnectionTunnelPrototype, err error) { + _model = &VPNGatewayConnectionTunnelPrototype{ + NeighborIP: neighborIP, + TunnelInterfaceIP: tunnelInterfaceIP, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +// UnmarshalVPNGatewayConnectionTunnelPrototype unmarshals an instance of VPNGatewayConnectionTunnelPrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionTunnelPrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionTunnelPrototype) + err = core.UnmarshalModel(m, "neighbor_ip", &obj.NeighborIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "neighbor_ip-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnel_interface_ip", &obj.TunnelInterfaceIP, UnmarshalIP) + if err != nil { + err = core.SDKErrorf(err, "", "tunnel_interface_ip-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionTunnelStatusReason : VPNGatewayConnectionTunnelStatusReason struct type VPNGatewayConnectionTunnelStatusReason struct { // A reason code for this status: @@ -104091,6 +107029,12 @@ func UnmarshalVPNGatewayMemberLifecycleReason(m map[string]json.RawMessage, resu // VPNGatewayPatch : VPNGatewayPatch struct type VPNGatewayPatch struct { + // The local autonomous system number (ASN) for this VPN gateway and its connections. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + LocalAsn *int64 `json:"local_asn,omitempty"` + // The name for this VPN gateway. The name must not be used by another VPN gateway in the VPC. Name *string `json:"name,omitempty"` } @@ -104098,6 +107042,11 @@ type VPNGatewayPatch struct { // UnmarshalVPNGatewayPatch unmarshals an instance of VPNGatewayPatch from the specified map of raw messages. func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPatch) + err = core.UnmarshalPrimitive(m, "local_asn", &obj.LocalAsn) + if err != nil { + err = core.SDKErrorf(err, "", "local_asn-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -104110,6 +107059,9 @@ func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) // AsPatch returns a generic map representation of the VPNGatewayPatch func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (_patch map[string]interface{}, err error) { _patch = map[string]interface{}{} + if !core.IsNil(vpnGatewayPatch.LocalAsn) { + _patch["local_asn"] = vpnGatewayPatch.LocalAsn + } if !core.IsNil(vpnGatewayPatch.Name) { _patch["name"] = vpnGatewayPatch.Name } @@ -104133,6 +107085,16 @@ type VPNGatewayPrototype struct { // Identifies a subnet by a unique property. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` + // The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + // advertise routes with these CIDRs as route destinations. + AdvertisedCIDRs []string `json:"advertised_cidrs,omitempty"` + + // The local autonomous system number (ASN) for this VPN gateway and its connections. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + LocalAsn *int64 `json:"local_asn,omitempty"` + // The mode for this VPN gateway. Mode *string `json:"mode,omitempty"` } @@ -104169,6 +107131,16 @@ func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "advertised_cidrs", &obj.AdvertisedCIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "advertised_cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "local_asn", &obj.LocalAsn) + if err != nil { + err = core.SDKErrorf(err, "", "local_asn-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) @@ -104178,6 +107150,311 @@ func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface return } +// VPNGatewayServiceConnection : VPNGatewayServiceConnection struct +type VPNGatewayServiceConnection struct { + // The date and time that this VPN gateway service connection was created. + CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + + Creator VPNGatewayServiceConnectionCreatorIntf `json:"creator" validate:"required"` + + // The unique identifier for this VPN gateway service connection. + ID *string `json:"id" validate:"required"` + + // The reasons for the current `lifecycle_state` (if any). + LifecycleReasons []VPNGatewayServiceConnectionLifecycleReason `json:"lifecycle_reasons" validate:"required"` + + // The lifecycle state of the VPN gateway service connection. + LifecycleState *string `json:"lifecycle_state" validate:"required"` + + // The status of this VPN gateway service connection: + // - `degraded`: operating with compromised performance. + // - `down`: not operational. + // - `up`: operating normally. + Status *string `json:"status" validate:"required"` + + // The reasons for the current VPN gateway service connection status (if any). + StatusReasons []VPNGatewayServiceConnectionStatusReason `json:"status_reasons" validate:"required"` +} + +// Constants associated with the VPNGatewayServiceConnection.LifecycleState property. +// The lifecycle state of the VPN gateway service connection. +const ( + VPNGatewayServiceConnectionLifecycleStateDeletingConst = "deleting" + VPNGatewayServiceConnectionLifecycleStateFailedConst = "failed" + VPNGatewayServiceConnectionLifecycleStatePendingConst = "pending" + VPNGatewayServiceConnectionLifecycleStateStableConst = "stable" + VPNGatewayServiceConnectionLifecycleStateSuspendedConst = "suspended" + VPNGatewayServiceConnectionLifecycleStateUpdatingConst = "updating" + VPNGatewayServiceConnectionLifecycleStateWaitingConst = "waiting" +) + +// Constants associated with the VPNGatewayServiceConnection.Status property. +// The status of this VPN gateway service connection: +// - `degraded`: operating with compromised performance. +// - `down`: not operational. +// - `up`: operating normally. +const ( + VPNGatewayServiceConnectionStatusDegradedConst = "degraded" + VPNGatewayServiceConnectionStatusDownConst = "down" + VPNGatewayServiceConnectionStatusUpConst = "up" +) + +// UnmarshalVPNGatewayServiceConnection unmarshals an instance of VPNGatewayServiceConnection from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnection) + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "creator", &obj.Creator, UnmarshalVPNGatewayServiceConnectionCreator) + if err != nil { + err = core.SDKErrorf(err, "", "creator-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "lifecycle_reasons", &obj.LifecycleReasons, UnmarshalVPNGatewayServiceConnectionLifecycleReason) + if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_reasons-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) + if err != nil { + err = core.SDKErrorf(err, "", "lifecycle_state-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayServiceConnectionStatusReason) + if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayServiceConnectionCollection : VPNGatewayServiceConnectionCollection struct +type VPNGatewayServiceConnectionCollection struct { + // A link to the first page of resources. + First *PageLink `json:"first" validate:"required"` + + // The maximum number of resources that can be returned by the request. + Limit *int64 `json:"limit" validate:"required"` + + // A link to the next page of resources. This property is present for all pages + // except the last page. + Next *PageLink `json:"next,omitempty"` + + // A page of service connections for the VPN gateway. + ServiceConnections []VPNGatewayServiceConnection `json:"service_connections" validate:"required"` + + // The total number of resources across all pages. + TotalCount *int64 `json:"total_count" validate:"required"` +} + +// UnmarshalVPNGatewayServiceConnectionCollection unmarshals an instance of VPNGatewayServiceConnectionCollection from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnectionCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnectionCollection) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPageLink) + if err != nil { + err = core.SDKErrorf(err, "", "first-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + err = core.SDKErrorf(err, "", "limit-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPageLink) + if err != nil { + err = core.SDKErrorf(err, "", "next-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "service_connections", &obj.ServiceConnections, UnmarshalVPNGatewayServiceConnection) + if err != nil { + err = core.SDKErrorf(err, "", "service_connections-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) + if err != nil { + err = core.SDKErrorf(err, "", "total_count-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// Retrieve the value to be passed to a request to access the next page of results +func (resp *VPNGatewayServiceConnectionCollection) GetNextStart() (*string, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + start, err := core.GetQueryParam(resp.Next.Href, "start") + if err != nil { + err = core.SDKErrorf(err, "", "read-query-param-error", common.GetComponentInfo()) + return nil, err + } else if start == nil { + return nil, nil + } + return start, nil +} + +// VPNGatewayServiceConnectionCreator : VPNGatewayServiceConnectionCreator struct +// Models which "extend" this model: +// - VPNGatewayServiceConnectionCreatorTransitGatewayReference +type VPNGatewayServiceConnectionCreator struct { + // The CRN for this transit gateway. + CRN *string `json:"crn,omitempty"` + + // The unique identifier for this transit gateway. + ID *string `json:"id,omitempty"` + + // The resource type. + ResourceType *string `json:"resource_type,omitempty"` +} + +// Constants associated with the VPNGatewayServiceConnectionCreator.ResourceType property. +// The resource type. +const ( + VPNGatewayServiceConnectionCreatorResourceTypeTransitGatewayConst = "transit_gateway" +) + +func (*VPNGatewayServiceConnectionCreator) isaVPNGatewayServiceConnectionCreator() bool { + return true +} + +type VPNGatewayServiceConnectionCreatorIntf interface { + isaVPNGatewayServiceConnectionCreator() bool +} + +// UnmarshalVPNGatewayServiceConnectionCreator unmarshals an instance of VPNGatewayServiceConnectionCreator from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnectionCreator(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnectionCreator) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayServiceConnectionLifecycleReason : VPNGatewayServiceConnectionLifecycleReason struct +type VPNGatewayServiceConnectionLifecycleReason struct { + // A reason code for this lifecycle state: + // - `internal_error`: internal error (contact IBM support) + // - `resource_suspended_by_provider`: The resource has been suspended (contact IBM + // support) + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Code *string `json:"code" validate:"required"` + + // An explanation of the reason for this lifecycle state. + Message *string `json:"message" validate:"required"` + + // A link to documentation about the reason for this lifecycle state. + MoreInfo *string `json:"more_info,omitempty"` +} + +// Constants associated with the VPNGatewayServiceConnectionLifecycleReason.Code property. +// A reason code for this lifecycle state: +// - `internal_error`: internal error (contact IBM support) +// - `resource_suspended_by_provider`: The resource has been suspended (contact IBM +// support) +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayServiceConnectionLifecycleReasonCodeInternalErrorConst = "internal_error" + VPNGatewayServiceConnectionLifecycleReasonCodeResourceSuspendedByProviderConst = "resource_suspended_by_provider" +) + +// UnmarshalVPNGatewayServiceConnectionLifecycleReason unmarshals an instance of VPNGatewayServiceConnectionLifecycleReason from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnectionLifecycleReason(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnectionLifecycleReason) + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "message", &obj.Message) + if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) + if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayServiceConnectionStatusReason : VPNGatewayServiceConnectionStatusReason struct +type VPNGatewayServiceConnectionStatusReason struct { + // The reasons for the current VPN gateway service connection status (if any). + // - `internal_error` + // - `peer_not_responding`. + Code *string `json:"code" validate:"required"` + + // An explanation of the reason for this VPN gateway service connection's status. + Message *string `json:"message" validate:"required"` + + // A link to documentation about this status reason. + MoreInfo *string `json:"more_info,omitempty"` +} + +// Constants associated with the VPNGatewayServiceConnectionStatusReason.Code property. +// The reasons for the current VPN gateway service connection status (if any). +// - `internal_error` +// - `peer_not_responding`. +const ( + VPNGatewayServiceConnectionStatusReasonCodeInternalErrorConst = "internal_error" + VPNGatewayServiceConnectionStatusReasonCodePeerNotRespondingConst = "peer_not_responding" +) + +// UnmarshalVPNGatewayServiceConnectionStatusReason unmarshals an instance of VPNGatewayServiceConnectionStatusReason from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnectionStatusReason(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnectionStatusReason) + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + if err != nil { + err = core.SDKErrorf(err, "", "code-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "message", &obj.Message) + if err != nil { + err = core.SDKErrorf(err, "", "message-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) + if err != nil { + err = core.SDKErrorf(err, "", "more_info-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNServer : VPNServer struct type VPNServer struct { // The certificate instance for this VPN server. @@ -116021,6 +119298,62 @@ func UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(m map[st return } +// EndpointGatewayResourceBindingTargetCRN : The CRN for the resource targeted by this resource binding. +// This model "extends" EndpointGatewayResourceBindingTarget +type EndpointGatewayResourceBindingTargetCRN struct { + CRN *string `json:"crn" validate:"required"` +} + +func (*EndpointGatewayResourceBindingTargetCRN) isaEndpointGatewayResourceBindingTarget() bool { + return true +} + +// UnmarshalEndpointGatewayResourceBindingTargetCRN unmarshals an instance of EndpointGatewayResourceBindingTargetCRN from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingTargetCRN(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingTargetCRN) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN : The resource to bind to the endpoint gateway. +// This model "extends" EndpointGatewayResourceBindingTargetPrototype +type EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN struct { + CRN *string `json:"crn" validate:"required"` +} + +// NewEndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN : Instantiate EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN (Generic Model Constructor) +func (*VpcV1) NewEndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN(crn string) (_model *EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN, err error) { + _model = &EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN{ + CRN: core.StringPtr(crn), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN) isaEndpointGatewayResourceBindingTargetPrototype() bool { + return true +} + +// UnmarshalEndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN unmarshals an instance of EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN from the specified map of raw messages. +func UnmarshalEndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EndpointGatewayResourceBindingTargetPrototypeEndpointGatewayResourceBindingTargetByCRN) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype : EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype struct // This model "extends" EndpointGatewayTargetPrototype type EndpointGatewayTargetPrototypeEndpointGatewayTargetResourceTypePrivatePathServiceGatewayPrototype struct { @@ -118434,24 +121767,26 @@ func UnmarshalInstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceIn // InstanceGroupManagerActionPrototypeScheduledActionPrototype : InstanceGroupManagerActionPrototypeScheduledActionPrototype struct // Models which "extend" this model: -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec +// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup +// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager +// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup +// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager // This model "extends" InstanceGroupManagerActionPrototype type InstanceGroupManagerActionPrototypeScheduledActionPrototype struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The date and time the scheduled action will run. - RunAt *strfmt.DateTime `json:"run_at,omitempty"` + // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min + // period. + CronSpec *string `json:"cron_spec,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` - // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min - // period. - CronSpec *string `json:"cron_spec,omitempty"` + // The date and time the scheduled action will run. + RunAt *strfmt.DateTime `json:"run_at,omitempty"` } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { @@ -118475,9 +121810,9 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[ err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) + err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { - err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) @@ -118490,9 +121825,9 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[ err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } - err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) + err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { - err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) @@ -122019,6 +125354,99 @@ func UnmarshalInstanceProfileVolumeBandwidthFixed(m map[string]json.RawMessage, return } +// InstanceProfileVolumeBandwidthQoSModesDependent : The volume bandwidth QoS modes for an instance with this profile depends on its configuration. +// This model "extends" InstanceProfileVolumeBandwidthQoSModes +type InstanceProfileVolumeBandwidthQoSModesDependent struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` +} + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModesDependent.Type property. +// The type for this profile field. +const ( + InstanceProfileVolumeBandwidthQoSModesDependentTypeDependentConst = "dependent" +) + +func (*InstanceProfileVolumeBandwidthQoSModesDependent) isaInstanceProfileVolumeBandwidthQoSModes() bool { + return true +} + +// UnmarshalInstanceProfileVolumeBandwidthQoSModesDependent unmarshals an instance of InstanceProfileVolumeBandwidthQoSModesDependent from the specified map of raw messages. +func UnmarshalInstanceProfileVolumeBandwidthQoSModesDependent(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceProfileVolumeBandwidthQoSModesDependent) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// InstanceProfileVolumeBandwidthQoSModesEnum : InstanceProfileVolumeBandwidthQoSModesEnum struct +// This model "extends" InstanceProfileVolumeBandwidthQoSModes +type InstanceProfileVolumeBandwidthQoSModesEnum struct { + // The default volume bandwidth QoS mode for this profile. + Default *string `json:"default" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The permitted volume bandwidth QoS modes for an instance using this profile. + Values []string `json:"values" validate:"required"` +} + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModesEnum.Default property. +// The default volume bandwidth QoS mode for this profile. +const ( + InstanceProfileVolumeBandwidthQoSModesEnumDefaultPooledConst = "pooled" + InstanceProfileVolumeBandwidthQoSModesEnumDefaultWeightedConst = "weighted" +) + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModesEnum.Type property. +// The type for this profile field. +const ( + InstanceProfileVolumeBandwidthQoSModesEnumTypeEnumConst = "enum" +) + +// Constants associated with the InstanceProfileVolumeBandwidthQoSModesEnum.Values property. +// A volume bandwidth QoS mode: +// - `pooled`: All volumes attached to an instance will pool and share bandwidth. +// - `weighted`: Each volume attached to an instance will have its own bandwidth, weighted according to its IOPS. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + InstanceProfileVolumeBandwidthQoSModesEnumValuesPooledConst = "pooled" + InstanceProfileVolumeBandwidthQoSModesEnumValuesWeightedConst = "weighted" +) + +func (*InstanceProfileVolumeBandwidthQoSModesEnum) isaInstanceProfileVolumeBandwidthQoSModes() bool { + return true +} + +// UnmarshalInstanceProfileVolumeBandwidthQoSModesEnum unmarshals an instance of InstanceProfileVolumeBandwidthQoSModesEnum from the specified map of raw messages. +func UnmarshalInstanceProfileVolumeBandwidthQoSModesEnum(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceProfileVolumeBandwidthQoSModesEnum) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // InstanceProfileVolumeBandwidthRange : The permitted storage bandwidth range (in megabits per second) shared across the storage volumes of an instance with // this profile. // This model "extends" InstanceProfileVolumeBandwidth @@ -122137,7 +125565,8 @@ type InstancePrototypeInstanceByCatalogOffering struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -122156,6 +125585,12 @@ type InstancePrototypeInstanceByCatalogOffering struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -122200,6 +125635,16 @@ const ( InstancePrototypeInstanceByCatalogOfferingConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByCatalogOffering.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByCatalogOfferingVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByCatalogOfferingVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstancePrototypeInstanceByCatalogOffering) isaInstancePrototypeInstanceByCatalogOffering() bool { return true } @@ -122291,6 +125736,11 @@ func UnmarshalInstancePrototypeInstanceByCatalogOffering(m map[string]json.RawMe err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -122393,7 +125843,8 @@ type InstancePrototypeInstanceByImage struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -122412,6 +125863,12 @@ type InstancePrototypeInstanceByImage struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -122450,6 +125907,16 @@ const ( InstancePrototypeInstanceByImageConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByImage.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByImageVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByImageVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstancePrototypeInstanceByImage) isaInstancePrototypeInstanceByImage() bool { return true } @@ -122541,6 +126008,11 @@ func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, res err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -122641,7 +126113,8 @@ type InstancePrototypeInstanceBySourceSnapshot struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -122660,6 +126133,12 @@ type InstancePrototypeInstanceBySourceSnapshot struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -122695,6 +126174,16 @@ const ( InstancePrototypeInstanceBySourceSnapshotConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceBySourceSnapshot.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceBySourceSnapshotVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceBySourceSnapshotVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstancePrototypeInstanceBySourceSnapshot) isaInstancePrototypeInstanceBySourceSnapshot() bool { return true } @@ -122786,6 +126275,11 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshot(m map[string]json.RawMes err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -122884,7 +126378,8 @@ type InstancePrototypeInstanceBySourceTemplate struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -122903,6 +126398,12 @@ type InstancePrototypeInstanceBySourceTemplate struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -122955,6 +126456,16 @@ const ( InstancePrototypeInstanceBySourceTemplateConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceBySourceTemplate.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceBySourceTemplateVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceBySourceTemplateVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceBySourceTemplate : Instantiate InstancePrototypeInstanceBySourceTemplate (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstancePrototypeInstanceBySourceTemplate, err error) { _model = &InstancePrototypeInstanceBySourceTemplate{ @@ -123049,6 +126560,11 @@ func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMes err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -123159,7 +126675,8 @@ type InstancePrototypeInstanceByVolume struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -123178,6 +126695,12 @@ type InstancePrototypeInstanceByVolume struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -123213,6 +126736,16 @@ const ( InstancePrototypeInstanceByVolumeConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByVolume.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByVolumeVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByVolumeVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstancePrototypeInstanceByVolume) isaInstancePrototypeInstanceByVolume() bool { return true } @@ -123304,6 +126837,11 @@ func UnmarshalInstancePrototypeInstanceByVolume(m map[string]json.RawMessage, re err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -123532,7 +127070,8 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOffering struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -123551,6 +127090,12 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOffering struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -123595,6 +127140,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByCatalogOffering.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplatePrototypeInstanceTemplateByCatalogOffering) isaInstanceTemplatePrototypeInstanceTemplateByCatalogOffering() bool { return true } @@ -123686,6 +127241,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering(m map[s err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -123786,7 +127346,8 @@ type InstanceTemplatePrototypeInstanceTemplateByImage struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -123805,6 +127366,12 @@ type InstanceTemplatePrototypeInstanceTemplateByImage struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -123843,6 +127410,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByImageConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByImage.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByImageVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByImageVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplatePrototypeInstanceTemplateByImage) isaInstanceTemplatePrototypeInstanceTemplateByImage() bool { return true } @@ -123934,6 +127511,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage(m map[string]json err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -124032,7 +127614,8 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -124051,6 +127634,12 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -124086,6 +127675,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot) isaInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot() bool { return true } @@ -124177,6 +127776,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(m map[st err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -124273,7 +127877,8 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceTemplate struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -124292,6 +127897,12 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceTemplate struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -124344,6 +127955,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateBySourceTemplateConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateBySourceTemplate.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateBySourceTemplateVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateBySourceTemplateVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateBySourceTemplate : Instantiate InstanceTemplatePrototypeInstanceTemplateBySourceTemplate (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstanceTemplatePrototypeInstanceTemplateBySourceTemplate, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateBySourceTemplate{ @@ -124438,6 +128059,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(m map[st err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -124557,7 +128183,8 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -124577,6 +128204,12 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -124621,6 +128254,16 @@ const ( InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext) isaInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext() bool { return true } @@ -124732,6 +128375,11 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(m err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -124841,7 +128489,8 @@ type InstanceTemplateInstanceByImageInstanceTemplateContext struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -124861,6 +128510,12 @@ type InstanceTemplateInstanceByImageInstanceTemplateContext struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -124899,6 +128554,16 @@ const ( InstanceTemplateInstanceByImageInstanceTemplateContextConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByImageInstanceTemplateContext.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByImageInstanceTemplateContextVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByImageInstanceTemplateContextVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByImageInstanceTemplateContext) isaInstanceTemplateInstanceByImageInstanceTemplateContext() bool { return true } @@ -125010,6 +128675,11 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContext(m map[strin err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -125119,7 +128789,8 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext struct { // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -125139,6 +128810,12 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext struct { // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -125174,6 +128851,16 @@ const ( InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext) isaInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext() bool { return true } @@ -125285,6 +128972,11 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(m err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -126905,6 +130597,81 @@ func (loadBalancerPoolIdentityLoadBalancerPoolIdentityByID *LoadBalancerPoolIden return } +// LoadBalancerPoolMemberTargetByReservedIP : LoadBalancerPoolMemberTargetByReservedIP struct +// This model "extends" LoadBalancerPoolMemberTarget +type LoadBalancerPoolMemberTargetByReservedIP struct { + // The IP address. + // + // If the address has not yet been selected, the value will be `0.0.0.0`. + // + // This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in + // the future. + Address *string `json:"address" validate:"required"` + + // If present, this property indicates the referenced resource has been deleted, and provides + // some supplementary information. + Deleted *Deleted `json:"deleted,omitempty"` + + // The URL for this reserved IP. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this reserved IP. + ID *string `json:"id" validate:"required"` + + // The name for this reserved IP. The name is unique across all reserved IPs in a subnet. + Name *string `json:"name" validate:"required"` + + // The resource type. + ResourceType *string `json:"resource_type" validate:"required"` +} + +// Constants associated with the LoadBalancerPoolMemberTargetByReservedIP.ResourceType property. +// The resource type. +const ( + LoadBalancerPoolMemberTargetByReservedIPResourceTypeSubnetReservedIPConst = "subnet_reserved_ip" +) + +func (*LoadBalancerPoolMemberTargetByReservedIP) isaLoadBalancerPoolMemberTarget() bool { + return true +} + +// UnmarshalLoadBalancerPoolMemberTargetByReservedIP unmarshals an instance of LoadBalancerPoolMemberTargetByReservedIP from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberTargetByReservedIP(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberTargetByReservedIP) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDeleted) + if err != nil { + err = core.SDKErrorf(err, "", "deleted-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // LoadBalancerPoolMemberTargetPrototypeIP : LoadBalancerPoolMemberTargetPrototypeIP struct // This model "extends" LoadBalancerPoolMemberTargetPrototype type LoadBalancerPoolMemberTargetPrototypeIP struct { @@ -127089,9 +130856,65 @@ func (loadBalancerPoolMemberTargetPrototypeLoadBalancerIdentity *LoadBalancerPoo return } -// LoadBalancerPoolMemberTargetIP : LoadBalancerPoolMemberTargetIP struct +// LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity : Identifies a reserved IP by a unique property. +// Models which "extend" this model: +// - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID +// - LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref +// This model "extends" LoadBalancerPoolMemberTargetPrototype +type LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity struct { + // The unique identifier for this reserved IP. + ID *string `json:"id,omitempty"` + + // The URL for this reserved IP. + Href *string `json:"href,omitempty"` +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity) isaLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() bool { + return true +} + +type LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityIntf interface { + LoadBalancerPoolMemberTargetPrototypeIntf + isaLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() bool +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity) isaLoadBalancerPoolMemberTargetPrototype() bool { + return true +} + +// UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity +func (loadBalancerPoolMemberTargetPrototypeReservedIPIdentity *LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(loadBalancerPoolMemberTargetPrototypeReservedIPIdentity.ID) { + _patch["id"] = loadBalancerPoolMemberTargetPrototypeReservedIPIdentity.ID + } + if !core.IsNil(loadBalancerPoolMemberTargetPrototypeReservedIPIdentity.Href) { + _patch["href"] = loadBalancerPoolMemberTargetPrototypeReservedIPIdentity.Href + } + + return +} + +// LoadBalancerPoolMemberTargetIPNotReservedIP : LoadBalancerPoolMemberTargetIPNotReservedIP struct // This model "extends" LoadBalancerPoolMemberTarget -type LoadBalancerPoolMemberTargetIP struct { +type LoadBalancerPoolMemberTargetIPNotReservedIP struct { // The IP address. // // This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in @@ -127099,13 +130922,13 @@ type LoadBalancerPoolMemberTargetIP struct { Address *string `json:"address" validate:"required"` } -func (*LoadBalancerPoolMemberTargetIP) isaLoadBalancerPoolMemberTarget() bool { +func (*LoadBalancerPoolMemberTargetIPNotReservedIP) isaLoadBalancerPoolMemberTarget() bool { return true } -// UnmarshalLoadBalancerPoolMemberTargetIP unmarshals an instance of LoadBalancerPoolMemberTargetIP from the specified map of raw messages. -func UnmarshalLoadBalancerPoolMemberTargetIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerPoolMemberTargetIP) +// UnmarshalLoadBalancerPoolMemberTargetIPNotReservedIP unmarshals an instance of LoadBalancerPoolMemberTargetIPNotReservedIP from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberTargetIPNotReservedIP(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberTargetIPNotReservedIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) @@ -133895,38 +137718,60 @@ func UnmarshalShareIdentityByID(m map[string]json.RawMessage, result interface{} // Required if the share's `access_control_mode` is `security_group`. // This model "extends" ShareMountTargetPrototype type ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup struct { + // The protocol to use to access the share for this share mount target: + // - `nfs4`: NFSv4 will be used. + // + // The specified value must be listed in the share's `allowed_access_protocols`. + AccessProtocol *string `json:"access_protocol" validate:"required"` + // The name for this share mount target. The name must not be used by another mount target for the file share. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. - // - `user_managed`: Encrypted in transit using an instance identity certificate. The - // `access_control_mode` for the share must be `security_group`. + // - `ipsec`: Encrypted in transit using an instance identity certificate. The + // `access_control_mode` for the share must be `security_group`. + // - `stunnel`: Encrypted in transit using an stunnel connection. The + // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. - TransitEncryption *string `json:"transit_encryption,omitempty"` + TransitEncryption *string `json:"transit_encryption" validate:"required"` VirtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf `json:"virtual_network_interface" validate:"required"` } +// Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.AccessProtocol property. +// The protocol to use to access the share for this share mount target: +// - `nfs4`: NFSv4 will be used. +// +// The specified value must be listed in the share's `allowed_access_protocols`. +const ( + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupAccessProtocolNfs4Const = "nfs4" +) + // Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.TransitEncryption property. // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. -// - `user_managed`: Encrypted in transit using an instance identity certificate. The +// - `ipsec`: Encrypted in transit using an instance identity certificate. The +// `access_control_mode` for the share must be `security_group`. +// - `stunnel`: Encrypted in transit using an stunnel connection. The // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. const ( - ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionNoneConst = "none" - ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionUserManagedConst = "user_managed" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionIpsecConst = "ipsec" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionNoneConst = "none" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionStunnelConst = "stunnel" ) // NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup : Instantiate ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup (Generic Model Constructor) -func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(virtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup, err error) { +func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(accessProtocol string, transitEncryption string, virtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup, err error) { _model = &ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup{ + AccessProtocol: core.StringPtr(accessProtocol), + TransitEncryption: core.StringPtr(transitEncryption), VirtualNetworkInterface: virtualNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") @@ -133943,6 +137788,11 @@ func (*ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup // UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup unmarshals an instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup from the specified map of raw messages. func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) + err = core.UnmarshalPrimitive(m, "access_protocol", &obj.AccessProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "access_protocol-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -133968,40 +137818,62 @@ func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecuri // Required if the share's `access_control_mode` is `vpc`. // This model "extends" ShareMountTargetPrototype type ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC struct { + // The protocol to use to access the share for this share mount target: + // - `nfs4`: NFSv4 will be used. + // + // The specified value must be listed in the share's `allowed_access_protocols`. + AccessProtocol *string `json:"access_protocol" validate:"required"` + // The name for this share mount target. The name must not be used by another mount target for the file share. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. - // - `user_managed`: Encrypted in transit using an instance identity certificate. The - // `access_control_mode` for the share must be `security_group`. + // - `ipsec`: Encrypted in transit using an instance identity certificate. The + // `access_control_mode` for the share must be `security_group`. + // - `stunnel`: Encrypted in transit using an stunnel connection. The + // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. - TransitEncryption *string `json:"transit_encryption,omitempty"` + TransitEncryption *string `json:"transit_encryption" validate:"required"` // Identifies a VPC by a unique property. VPC VPCIdentityIntf `json:"vpc" validate:"required"` } +// Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.AccessProtocol property. +// The protocol to use to access the share for this share mount target: +// - `nfs4`: NFSv4 will be used. +// +// The specified value must be listed in the share's `allowed_access_protocols`. +const ( + ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCAccessProtocolNfs4Const = "nfs4" +) + // Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.TransitEncryption property. // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. -// - `user_managed`: Encrypted in transit using an instance identity certificate. The +// - `ipsec`: Encrypted in transit using an instance identity certificate. The +// `access_control_mode` for the share must be `security_group`. +// - `stunnel`: Encrypted in transit using an stunnel connection. The // `access_control_mode` for the share must be `security_group`. // // The specified value must be listed in the share's // `allowed_transit_encryption_modes`. const ( - ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionNoneConst = "none" - ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionUserManagedConst = "user_managed" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionIpsecConst = "ipsec" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionNoneConst = "none" + ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionStunnelConst = "stunnel" ) // NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC : Instantiate ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC (Generic Model Constructor) -func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(vpc VPCIdentityIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC, err error) { +func (*VpcV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(accessProtocol string, transitEncryption string, vpc VPCIdentityIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC, err error) { _model = &ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC{ - VPC: vpc, + AccessProtocol: core.StringPtr(accessProtocol), + TransitEncryption: core.StringPtr(transitEncryption), + VPC: vpc, } err = core.ValidateStruct(_model, "required parameters") if err != nil { @@ -134017,6 +137889,11 @@ func (*ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) isaShare // UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC unmarshals an instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC from the specified map of raw messages. func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) + err = core.UnmarshalPrimitive(m, "access_protocol", &obj.AccessProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "access_protocol-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -134242,6 +138119,473 @@ func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInte return } +// ShareProfileAllowedAccessProtocolsSubset : ShareProfileAllowedAccessProtocolsSubset struct +// This model "extends" ShareProfileAllowedAccessProtocols +type ShareProfileAllowedAccessProtocolsSubset struct { + // The default allowed access protocol modes for shares with this profile. + Default []string `json:"default" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The possible allowed access protocols for shares with this profile: + // - `nfs4`: NFSv4 will be used. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values" validate:"required"` +} + +// Constants associated with the ShareProfileAllowedAccessProtocolsSubset.Default property. +const ( + ShareProfileAllowedAccessProtocolsSubsetDefaultNfs4Const = "nfs4" +) + +// Constants associated with the ShareProfileAllowedAccessProtocolsSubset.Type property. +// The type for this profile field. +const ( + ShareProfileAllowedAccessProtocolsSubsetTypeSubsetConst = "subset" +) + +// Constants associated with the ShareProfileAllowedAccessProtocolsSubset.Values property. +const ( + ShareProfileAllowedAccessProtocolsSubsetValuesNfs4Const = "nfs4" +) + +func (*ShareProfileAllowedAccessProtocolsSubset) isaShareProfileAllowedAccessProtocols() bool { + return true +} + +// UnmarshalShareProfileAllowedAccessProtocolsSubset unmarshals an instance of ShareProfileAllowedAccessProtocolsSubset from the specified map of raw messages. +func UnmarshalShareProfileAllowedAccessProtocolsSubset(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAllowedAccessProtocolsSubset) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAllowedTransitEncryptionModesSubset : ShareProfileAllowedTransitEncryptionModesSubset struct +// This model "extends" ShareProfileAllowedTransitEncryptionModes +type ShareProfileAllowedTransitEncryptionModesSubset struct { + // The default allowed transit encryption modes for shares with this profile. + Default []string `json:"default" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The allowed [transit encryption + // modes](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-vpc-about&interface=ui#fs-eit) for a share with this + // profile: + // - `none`: Not encrypted in transit. + // - `ipsec`: Encrypted in transit using an instance identity certificate. + // - `stunnel`: Encrypted in transit using a connection via an stunnel connection. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values" validate:"required"` +} + +// Constants associated with the ShareProfileAllowedTransitEncryptionModesSubset.Default property. +const ( + ShareProfileAllowedTransitEncryptionModesSubsetDefaultIpsecConst = "ipsec" + ShareProfileAllowedTransitEncryptionModesSubsetDefaultNoneConst = "none" + ShareProfileAllowedTransitEncryptionModesSubsetDefaultStunnelConst = "stunnel" +) + +// Constants associated with the ShareProfileAllowedTransitEncryptionModesSubset.Type property. +// The type for this profile field. +const ( + ShareProfileAllowedTransitEncryptionModesSubsetTypeSubsetConst = "subset" +) + +// Constants associated with the ShareProfileAllowedTransitEncryptionModesSubset.Values property. +const ( + ShareProfileAllowedTransitEncryptionModesSubsetValuesIpsecConst = "ipsec" + ShareProfileAllowedTransitEncryptionModesSubsetValuesNoneConst = "none" + ShareProfileAllowedTransitEncryptionModesSubsetValuesStunnelConst = "stunnel" +) + +func (*ShareProfileAllowedTransitEncryptionModesSubset) isaShareProfileAllowedTransitEncryptionModes() bool { + return true +} + +// UnmarshalShareProfileAllowedTransitEncryptionModesSubset unmarshals an instance of ShareProfileAllowedTransitEncryptionModesSubset from the specified map of raw messages. +func UnmarshalShareProfileAllowedTransitEncryptionModesSubset(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAllowedTransitEncryptionModesSubset) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAvailabilityModesEnum : The permitted data availability modes for a share with this profile. +// This model "extends" ShareProfileAvailabilityModes +type ShareProfileAvailabilityModesEnum struct { + // The default data availability mode for this profile. + Default *string `json:"default" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The data availability mode of the share: + // - `zonal`: The data availability of this share is limited only to a single zone of a + // given region as provided by the `zone` of the share. + // - `regional`: The data availability of this share covers all zones in the region where + // the share is created. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Values []string `json:"values" validate:"required"` +} + +// Constants associated with the ShareProfileAvailabilityModesEnum.Default property. +// The default data availability mode for this profile. +const ( + ShareProfileAvailabilityModesEnumDefaultRegionalConst = "regional" + ShareProfileAvailabilityModesEnumDefaultZonalConst = "zonal" +) + +// Constants associated with the ShareProfileAvailabilityModesEnum.Type property. +// The type for this profile field. +const ( + ShareProfileAvailabilityModesEnumTypeEnumConst = "enum" +) + +// Constants associated with the ShareProfileAvailabilityModesEnum.Values property. +const ( + ShareProfileAvailabilityModesEnumValuesRegionalConst = "regional" + ShareProfileAvailabilityModesEnumValuesZonalConst = "zonal" +) + +func (*ShareProfileAvailabilityModesEnum) isaShareProfileAvailabilityModes() bool { + return true +} + +// UnmarshalShareProfileAvailabilityModesEnum unmarshals an instance of ShareProfileAvailabilityModesEnum from the specified map of raw messages. +func UnmarshalShareProfileAvailabilityModesEnum(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAvailabilityModesEnum) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileAvailabilityModesFixed : The data availability mode for a share with this profile is fixed. +// This model "extends" ShareProfileAvailabilityModes +type ShareProfileAvailabilityModesFixed struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The value for this profile field. + Value *string `json:"value" validate:"required"` +} + +// Constants associated with the ShareProfileAvailabilityModesFixed.Type property. +// The type for this profile field. +const ( + ShareProfileAvailabilityModesFixedTypeFixedConst = "fixed" +) + +// Constants associated with the ShareProfileAvailabilityModesFixed.Value property. +// The value for this profile field. +const ( + ShareProfileAvailabilityModesFixedValueRegionalConst = "regional" + ShareProfileAvailabilityModesFixedValueZonalConst = "zonal" +) + +func (*ShareProfileAvailabilityModesFixed) isaShareProfileAvailabilityModes() bool { + return true +} + +// UnmarshalShareProfileAvailabilityModesFixed unmarshals an instance of ShareProfileAvailabilityModesFixed from the specified map of raw messages. +func UnmarshalShareProfileAvailabilityModesFixed(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileAvailabilityModesFixed) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidthDependent : The permitted bandwidth for a share with this profile depends on its configuration. +// This model "extends" ShareProfileBandwidth +type ShareProfileBandwidthDependent struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` +} + +// Constants associated with the ShareProfileBandwidthDependent.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthDependentTypeDependentConst = "dependent" +) + +func (*ShareProfileBandwidthDependent) isaShareProfileBandwidth() bool { + return true +} + +// UnmarshalShareProfileBandwidthDependent unmarshals an instance of ShareProfileBandwidthDependent from the specified map of raw messages. +func UnmarshalShareProfileBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidthDependent) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidthDependentRange : The permitted bandwidth range of a share with this profile depends on its configuration. +// This model "extends" ShareProfileBandwidth +type ShareProfileBandwidthDependentRange struct { + // The maximum value for this profile field. + Max *int64 `json:"max" validate:"required"` + + // The minimum value for this profile field. + Min *int64 `json:"min" validate:"required"` + + // The increment step value for this profile field. + Step *int64 `json:"step" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` +} + +// Constants associated with the ShareProfileBandwidthDependentRange.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthDependentRangeTypeDependentRangeConst = "dependent_range" +) + +func (*ShareProfileBandwidthDependentRange) isaShareProfileBandwidth() bool { + return true +} + +// UnmarshalShareProfileBandwidthDependentRange unmarshals an instance of ShareProfileBandwidthDependentRange from the specified map of raw messages. +func UnmarshalShareProfileBandwidthDependentRange(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidthDependentRange) + err = core.UnmarshalPrimitive(m, "max", &obj.Max) + if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "min", &obj.Min) + if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "step", &obj.Step) + if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidthEnum : The permitted bandwidth values of a share with this profile. +// This model "extends" ShareProfileBandwidth +type ShareProfileBandwidthEnum struct { + // The default value for this profile field. + Default *int64 `json:"default" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The permitted values for this profile field. + Values []int64 `json:"values" validate:"required"` +} + +// Constants associated with the ShareProfileBandwidthEnum.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthEnumTypeEnumConst = "enum" +) + +func (*ShareProfileBandwidthEnum) isaShareProfileBandwidth() bool { + return true +} + +// UnmarshalShareProfileBandwidthEnum unmarshals an instance of ShareProfileBandwidthEnum from the specified map of raw messages. +func UnmarshalShareProfileBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidthEnum) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "values", &obj.Values) + if err != nil { + err = core.SDKErrorf(err, "", "values-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidthFixed : The permitted bandwidth of a share with this profile is fixed. +// This model "extends" ShareProfileBandwidth +type ShareProfileBandwidthFixed struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The value for this profile field. + Value *int64 `json:"value" validate:"required"` +} + +// Constants associated with the ShareProfileBandwidthFixed.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthFixedTypeFixedConst = "fixed" +) + +func (*ShareProfileBandwidthFixed) isaShareProfileBandwidth() bool { + return true +} + +// UnmarshalShareProfileBandwidthFixed unmarshals an instance of ShareProfileBandwidthFixed from the specified map of raw messages. +func UnmarshalShareProfileBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidthFixed) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ShareProfileBandwidthRange : The permitted bandwidth range (in megabits per second) of a share with this profile. +// This model "extends" ShareProfileBandwidth +type ShareProfileBandwidthRange struct { + // The default value for this profile field. + Default *int64 `json:"default" validate:"required"` + + // The maximum value for this profile field. + Max *int64 `json:"max" validate:"required"` + + // The minimum value for this profile field. + Min *int64 `json:"min" validate:"required"` + + // The increment step value for this profile field. + Step *int64 `json:"step" validate:"required"` + + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + Value *int64 `json:"value,omitempty"` +} + +// Constants associated with the ShareProfileBandwidthRange.Type property. +// The type for this profile field. +const ( + ShareProfileBandwidthRangeTypeRangeConst = "range" +) + +func (*ShareProfileBandwidthRange) isaShareProfileBandwidth() bool { + return true +} + +// UnmarshalShareProfileBandwidthRange unmarshals an instance of ShareProfileBandwidthRange from the specified map of raw messages. +func UnmarshalShareProfileBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileBandwidthRange) + err = core.UnmarshalPrimitive(m, "default", &obj.Default) + if err != nil { + err = core.SDKErrorf(err, "", "default-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "max", &obj.Max) + if err != nil { + err = core.SDKErrorf(err, "", "max-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "min", &obj.Min) + if err != nil { + err = core.SDKErrorf(err, "", "min-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "step", &obj.Step) + if err != nil { + err = core.SDKErrorf(err, "", "step-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // ShareProfileCapacityDependentRange : The permitted total capacity (in gigabytes) of a share with this profile depends on its configuration. // This model "extends" ShareProfileCapacity type ShareProfileCapacityDependentRange struct { @@ -134745,15 +139089,56 @@ func (shareProfileIdentityByName *ShareProfileIdentityByName) asPatch() (_patch return } +// ShareProfileStorageGenerationFixed : The storage generation value of a share with this profile is fixed. +// This model "extends" ShareProfileStorageGeneration +type ShareProfileStorageGenerationFixed struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The value for this profile field. + Value *int64 `json:"value" validate:"required"` +} + +// Constants associated with the ShareProfileStorageGenerationFixed.Type property. +// The type for this profile field. +const ( + ShareProfileStorageGenerationFixedTypeFixedConst = "fixed" +) + +func (*ShareProfileStorageGenerationFixed) isaShareProfileStorageGeneration() bool { + return true +} + +// UnmarshalShareProfileStorageGenerationFixed unmarshals an instance of ShareProfileStorageGenerationFixed from the specified map of raw messages. +func UnmarshalShareProfileStorageGenerationFixed(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ShareProfileStorageGenerationFixed) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + err = core.SDKErrorf(err, "", "value-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SharePrototypeShareByOriginShare : Create an accessor file share for an existing file share. The values for -// `access_control_mode`, `encryption_key`, `initial_owner`, `iops`, `profile`, `size`, and -// `zone` will be inherited from `origin_share`. +// `access_control_mode`, `allowed_access_protocols`, `bandwidth`, `encryption_key`, +// `initial_owner`, `iops`, `profile`, `size`, and `zone` will be inherited from +// `origin_share`. +// +// Accessor file shares can only be created for shares with a `storage_generation` of `1`. // This model "extends" SharePrototype type SharePrototypeShareByOriginShare struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. @@ -134782,8 +139167,9 @@ type SharePrototypeShareByOriginShare struct { // Constants associated with the SharePrototypeShareByOriginShare.AllowedTransitEncryptionModes property. const ( - SharePrototypeShareByOriginShareAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeShareByOriginShareAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeShareByOriginShareAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeShareByOriginShareAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeShareByOriginShareAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // NewSharePrototypeShareByOriginShare : Instantiate SharePrototypeShareByOriginShare (Generic Model Constructor) @@ -134848,9 +139234,10 @@ func UnmarshalSharePrototypeShareByOriginShare(m map[string]json.RawMessage, res // This model "extends" SharePrototype type SharePrototypeShareBySize struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. @@ -134874,6 +139261,22 @@ type SharePrototypeShareBySize struct { // Mount targets for this share require a VPC. AccessControlMode *string `json:"access_control_mode,omitempty"` + // The access protocols to allow for this share. If unspecified: + // - If share mount targets are specified, only the access protocols specified by those + // share mount target will be allowed. + // - Otherwise, the default access protocols from the profile will be used. + AllowedAccessProtocols []string `json:"allowed_access_protocols,omitempty"` + + // The maximum bandwidth (in megabits per second) for the file share. + // + // If the share profile has a `bandwidth.type` of `dependent` or `fixed`, this property is system-managed and must not + // be specified. Otherwise, the specified value must be within the `bandwidth` range of the share's profile. + // + // Provided the property is user-managed, if it is unspecified, its value will be set based on the specified [`size` + // and + // `iops`](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles&interface=api). + Bandwidth *int64 `json:"bandwidth,omitempty"` + // The root key to use to wrap the data encryption key for the share. // // If unspecified, the `encryption` type for the share will be `provider_managed`. @@ -134908,13 +139311,17 @@ type SharePrototypeShareBySize struct { // The zone this file share will reside in. For a replica share in the same region as // the source share, this must be a different zone from the source share. - Zone ZoneIdentityIntf `json:"zone" validate:"required"` + // + // This property must be specified if the share profile `availability_mode` is `zonal`, + // and must not be specified otherwise. + Zone ZoneIdentityIntf `json:"zone,omitempty"` } // Constants associated with the SharePrototypeShareBySize.AllowedTransitEncryptionModes property. const ( - SharePrototypeShareBySizeAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeShareBySizeAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeShareBySizeAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeShareBySizeAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeShareBySizeAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // Constants associated with the SharePrototypeShareBySize.AccessControlMode property. @@ -134930,12 +139337,16 @@ const ( SharePrototypeShareBySizeAccessControlModeVPCConst = "vpc" ) +// Constants associated with the SharePrototypeShareBySize.AllowedAccessProtocols property. +const ( + SharePrototypeShareBySizeAllowedAccessProtocolsNfs4Const = "nfs4" +) + // NewSharePrototypeShareBySize : Instantiate SharePrototypeShareBySize (Generic Model Constructor) -func (*VpcV1) NewSharePrototypeShareBySize(profile ShareProfileIdentityIntf, size int64, zone ZoneIdentityIntf) (_model *SharePrototypeShareBySize, err error) { +func (*VpcV1) NewSharePrototypeShareBySize(profile ShareProfileIdentityIntf, size int64) (_model *SharePrototypeShareBySize, err error) { _model = &SharePrototypeShareBySize{ Profile: profile, Size: core.Int64Ptr(size), - Zone: zone, } err = core.ValidateStruct(_model, "required parameters") if err != nil { @@ -134981,6 +139392,16 @@ func UnmarshalSharePrototypeShareBySize(m map[string]json.RawMessage, result int err = core.SDKErrorf(err, "", "access_control_mode-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allowed_access_protocols", &obj.AllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) @@ -135021,13 +139442,18 @@ func UnmarshalSharePrototypeShareBySize(m map[string]json.RawMessage, result int } // SharePrototypeShareBySourceShare : Create a replica file share for an existing file share. The values for -// `access_control_mode`, `encryption_key`, `initial_owner`, and `size` will be inherited from `source_share`. +// `access_control_mode`, `allowed_access_protocols`, `bandwidth`, `encryption_key`, +// `initial_owner`, and `size` will be inherited from the `source_share`. +// +// Replica file shares can only be created if the source share has a `storage_generation` of +// `1`. // This model "extends" SharePrototype type SharePrototypeShareBySourceShare struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. @@ -135057,7 +139483,9 @@ type SharePrototypeShareBySourceShare struct { Iops *int64 `json:"iops,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - // for this file share. The profile must support the share's specified IOPS and size. + // for this file share. The profile must: + // - support the share's specified IOPS and size, and + // - have the same `storage_generation` as the source share. Profile ShareProfileIdentityIntf `json:"profile" validate:"required"` // The cron specification for the file share replication schedule. @@ -135072,30 +139500,36 @@ type SharePrototypeShareBySourceShare struct { // the source share will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The source file share for this replica file share. The specified file share must not - // already have a replica, and must not be a replica. If source file share is specified - // by CRN, it may be in an [associated partner + // The source file share for this replica file share. The specified file share must: + // - Not already have a replica. + // - Not be a replica. + // - Have a `storage_generation` of `1`. + // + // If source file share is specified by CRN, it may be in an [associated partner // region](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-replication). SourceShare ShareIdentityIntf `json:"source_share" validate:"required"` // The zone this file share will reside in. For a replica share in the same region as // the source share, this must be a different zone from the source share. - Zone ZoneIdentityIntf `json:"zone" validate:"required"` + // + // This property must be specified if the share profile `availability_mode` is `zonal`, + // and must not be specified otherwise. + Zone ZoneIdentityIntf `json:"zone,omitempty"` } // Constants associated with the SharePrototypeShareBySourceShare.AllowedTransitEncryptionModes property. const ( - SharePrototypeShareBySourceShareAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeShareBySourceShareAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeShareBySourceShareAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeShareBySourceShareAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeShareBySourceShareAllowedTransitEncryptionModesStunnelConst = "stunnel" ) // NewSharePrototypeShareBySourceShare : Instantiate SharePrototypeShareBySourceShare (Generic Model Constructor) -func (*VpcV1) NewSharePrototypeShareBySourceShare(profile ShareProfileIdentityIntf, replicationCronSpec string, sourceShare ShareIdentityIntf, zone ZoneIdentityIntf) (_model *SharePrototypeShareBySourceShare, err error) { +func (*VpcV1) NewSharePrototypeShareBySourceShare(profile ShareProfileIdentityIntf, replicationCronSpec string, sourceShare ShareIdentityIntf) (_model *SharePrototypeShareBySourceShare, err error) { _model = &SharePrototypeShareBySourceShare{ Profile: profile, ReplicationCronSpec: core.StringPtr(replicationCronSpec), SourceShare: sourceShare, - Zone: zone, } err = core.ValidateStruct(_model, "required parameters") if err != nil { @@ -135175,14 +139609,15 @@ func UnmarshalSharePrototypeShareBySourceShare(m map[string]json.RawMessage, res return } -// SharePrototypeShareBySourceSnapshot : Create a file share from a source snapshot. The initial value for `access_control_mode`, and the zone the file share -// resides in will be inherited from `source_snapshot`. +// SharePrototypeShareBySourceSnapshot : Create a file share from a source snapshot. The initial value for `access_control_mode`, +// `initial_owner` and `zone` will be inherited from `source_snapshot`. // This model "extends" SharePrototype type SharePrototypeShareBySourceSnapshot struct { // The transit encryption modes to allow for this share. If unspecified: - // - If share mount targets are specified, and those share mount targets all specify a - // `transit_encryption` of `user_managed`, then only `user_managed` will be allowed. - // - Otherwise, all `transit_encryption` modes will be allowed. + // - If share mount targets are specified, then only transit encryption modes + // specified by those share mount target will be allowed. + // - Otherwise, the default allowed transit encryption modes from the profile will be + // used. AllowedTransitEncryptionModes []string `json:"allowed_transit_encryption_modes,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. @@ -135197,15 +139632,37 @@ type SharePrototypeShareBySourceSnapshot struct { // The tags for this resource. UserTags []string `json:"user_tags,omitempty"` + // The access protocols to allow for this share. If unspecified: + // - If share mount targets are specified, only the access protocols specified by those + // share mount target will be allowed. + // - Otherwise, the default access protocols from the profile will be used. + AllowedAccessProtocols []string `json:"allowed_access_protocols,omitempty"` + + // The maximum bandwidth (in megabits per second) for the file share. + // + // If the share profile has a `bandwidth.type` of `dependent` or `fixed`, this property is system-managed and must not + // be specified. Otherwise, the specified value must be within the `bandwidth` range of the share's profile. + // + // Provided the property is user-managed, if it is unspecified, its value will be set based on the specified [`size` + // and + // `iops`](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles&interface=api). + Bandwidth *int64 `json:"bandwidth,omitempty"` + // The root key to use to wrap the data encryption key for the share. // // The specified key may be in a different account, subject to IAM policies. // - // If unspecified, the source snapshot's `encryption_key` will be used. + // If unspecified, the source share's `encryption_key` will be used. + // + // For snapshots of shares with `storage_generation` of `2`, an encryption key may only + // be specified if the source share's `encryption` is `user_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The owner assigned to the file share at creation. Subsequent changes to the owner // must be performed by a client that has mounted the file share. + // + // `initial_owner` for a share created from a source snapshot can only be specified for + // snapshots of shares with `storage_generation` of `1`. InitialOwner *ShareInitialOwner `json:"initial_owner,omitempty"` // The maximum input/output operations per second (IOPS) for the file share. @@ -135216,7 +139673,9 @@ type SharePrototypeShareBySourceSnapshot struct { Iops *int64 `json:"iops,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use - // for this file share. The profile must support the share's specified IOPS and size. + // for this file share. The profile must: + // - support the share's specified IOPS and size, and + // - have the same `storage_generation` as the source snapshot. Profile ShareProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use. If unspecified, the account's [default resource @@ -135239,8 +139698,14 @@ type SharePrototypeShareBySourceSnapshot struct { // Constants associated with the SharePrototypeShareBySourceSnapshot.AllowedTransitEncryptionModes property. const ( - SharePrototypeShareBySourceSnapshotAllowedTransitEncryptionModesNoneConst = "none" - SharePrototypeShareBySourceSnapshotAllowedTransitEncryptionModesUserManagedConst = "user_managed" + SharePrototypeShareBySourceSnapshotAllowedTransitEncryptionModesIpsecConst = "ipsec" + SharePrototypeShareBySourceSnapshotAllowedTransitEncryptionModesNoneConst = "none" + SharePrototypeShareBySourceSnapshotAllowedTransitEncryptionModesStunnelConst = "stunnel" +) + +// Constants associated with the SharePrototypeShareBySourceSnapshot.AllowedAccessProtocols property. +const ( + SharePrototypeShareBySourceSnapshotAllowedAccessProtocolsNfs4Const = "nfs4" ) // NewSharePrototypeShareBySourceSnapshot : Instantiate SharePrototypeShareBySourceSnapshot (Generic Model Constructor) @@ -135288,6 +139753,16 @@ func UnmarshalSharePrototypeShareBySourceSnapshot(m map[string]json.RawMessage, err = core.SDKErrorf(err, "", "user_tags-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "allowed_access_protocols", &obj.AllowedAccessProtocols) + if err != nil { + err = core.SDKErrorf(err, "", "allowed_access_protocols-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) + if err != nil { + err = core.SDKErrorf(err, "", "bandwidth-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { err = core.SDKErrorf(err, "", "encryption_key-error", common.GetComponentInfo()) @@ -136928,6 +141403,232 @@ func (vpcIdentityByID *VPCIdentityByID) asPatch() (_patch map[string]interface{} return } +// VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionDynamicRouteModePeerPrototype +type VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// NewVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress : Instantiate VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(asn int64, address string) (_model *VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress, err error) { + _model = &VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress{ + Asn: core.Int64Ptr(asn), + Address: core.StringPtr(address), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionDynamicRouteModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionDynamicRouteModePeerPrototype +type VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity to use. + // + // If unspecified: + // - If `peer.address` is specified, the `type` will be `ipv4_address`, and the `value` will be `peer.address`. + // - If `peer.fqdn` is specified, the `type` will be `fqdn`, and the `value` will be `peer.fqdn`. + IkeIdentity VPNGatewayConnectionIkeIdentityPrototypeIntf `json:"ike_identity,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// NewVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn : Instantiate VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(asn int64, fqdn string) (_model *VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn, err error) { + _model = &VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn{ + Asn: core.Int64Ptr(asn), + Fqdn: core.StringPtr(fqdn), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionDynamicRouteModePeerPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeerPrototypeVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentityPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress : VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress struct +// This model "extends" VPNGatewayConnectionDynamicRouteModePeer +type VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTypeAddressConst = "address" + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddressTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress) isaVPNGatewayConnectionDynamicRouteModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByAddress) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn : VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn struct +// This model "extends" VPNGatewayConnectionDynamicRouteModePeer +type VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. + Asn *int64 `json:"asn" validate:"required"` + + // The peer IKE identity. + IkeIdentity VPNGatewayConnectionIkeIdentityIntf `json:"ike_identity" validate:"required"` + + // Indicates whether `peer.address` or `peer.fqdn` is used. + Type *string `json:"type" validate:"required"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn.Type property. +// Indicates whether `peer.address` or `peer.fqdn` is used. +const ( + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdnTypeAddressConst = "address" + VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdnTypeFqdnConst = "fqdn" +) + +func (*VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn) isaVPNGatewayConnectionDynamicRouteModePeer() bool { + return true +} + +// UnmarshalVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn unmarshals an instance of VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionDynamicRouteModePeerVPNGatewayConnectionPeerByFqdn) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_identity", &obj.IkeIdentity, UnmarshalVPNGatewayConnectionIkeIdentity) + if err != nil { + err = core.SDKErrorf(err, "", "ike_identity-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + err = core.SDKErrorf(err, "", "type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn : VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn struct // This model "extends" VPNGatewayConnectionIkeIdentityPrototype type VPNGatewayConnectionIkeIdentityPrototypeVPNGatewayConnectionIkeIdentityFqdn struct { @@ -137644,6 +142345,77 @@ func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(m return } +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch : The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If +// `peer.type` is fqdn, only `peer.fqdn` may be specified. +// Models which "extend" this model: +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch +// - VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch +// This model "extends" VPNGatewayConnectionPeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() bool { + return true +} + +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchIntf interface { + VPNGatewayConnectionPeerPatchIntf + isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() bool +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch +func (vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch *VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Asn) { + _patch["asn"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Asn + } + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Address) { + _patch["address"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Address + } + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Fqdn) { + _patch["fqdn"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch.Fqdn + } + + return +} + // VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch : The peer VPN gateway for this connection. If `peer.type` is `ipv4_address`, only `peer.address` may be specified. If // `peer.type` is fqdn, only `peer.fqdn` may be specified. // Models which "extend" this model: @@ -138185,6 +142957,158 @@ func UnmarshalVPNGatewayConnectionPolicyModePeerVPNGatewayConnectionPeerByFqdn(m return } +// VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype struct +// This model "extends" VPNGatewayConnectionPrototype +type VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype struct { + // If set to false, the VPN gateway connection is shut down. + AdminStateUp *bool `json:"admin_state_up,omitempty"` + + DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode,omitempty"` + + IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` + + IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` + + // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. If + // unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name,omitempty"` + + // The pre-shared key. + Psk *string `json:"psk" validate:"required"` + + // Indicates whether the traffic is distributed between the `up` tunnels of the VPN gateway connection when the VPC + // route's next hop is a VPN connection. If `false`, the traffic is only routed through the `up` tunnel with the lower + // `public_ip` address. Before enabling it on VPN connections to on-prem private networks, review + // [distributing traffic + // restrictions](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-limitations#distributing-traffic-restrictions). + DistributeTraffic *bool `json:"distribute_traffic,omitempty"` + + Local *VPNGatewayConnectionDynamicRouteModeLocalPrototype `json:"local,omitempty"` + + Peer VPNGatewayConnectionDynamicRouteModePeerPrototypeIntf `json:"peer" validate:"required"` + + // The routing protocol for this VPN gateway connection. + RoutingProtocol *string `json:"routing_protocol" validate:"required"` + + // The VPN tunnel configuration to use for this VPN gateway connection + // (in dynamic route mode). + Tunnels []VPNGatewayConnectionTunnelPrototype `json:"tunnels" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeEstablishModePeerOnlyConst = "peer_only" +) + +// Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype.RoutingProtocol property. +// The routing protocol for this VPN gateway connection. +const ( + VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototypeRoutingProtocolBgpConst = "bgp" +) + +// NewVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype (Generic Model Constructor) +func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype(psk string, peer VPNGatewayConnectionDynamicRouteModePeerPrototypeIntf, routingProtocol string, tunnels []VPNGatewayConnectionTunnelPrototype) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype, err error) { + _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype{ + Psk: core.StringPtr(psk), + Peer: peer, + RoutingProtocol: core.StringPtr(routingProtocol), + Tunnels: tunnels, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype) isaVPNGatewayConnectionPrototype() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype unmarshals an instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionDynamicRouteModePrototype) + err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) + if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "distribute_traffic", &obj.DistributeTraffic) + if err != nil { + err = core.SDKErrorf(err, "", "distribute_traffic-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionDynamicRouteModeLocalPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionDynamicRouteModePeerPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionTunnelPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct // This model "extends" VPNGatewayConnectionPrototype type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct { @@ -138445,6 +143369,7 @@ func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePr // VPNGatewayConnectionRouteMode : VPNGatewayConnectionRouteMode struct // Models which "extend" this model: // - VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode +// - VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode // This model "extends" VPNGatewayConnection type VPNGatewayConnectionRouteMode struct { // If set to false, the VPN gateway connection is shut down. @@ -138599,7 +143524,12 @@ func UnmarshalVPNGatewayConnectionRouteMode(m map[string]json.RawMessage, result err = core.SDKErrorf(err, "required discriminator property 'routing_protocol' not found in JSON object", "missing-discriminator", common.GetComponentInfo()) return } - if discValue == "none" { + if discValue == "bgp" { + err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode) + if err != nil { + err = core.SDKErrorf(err, "", "unmarshal-VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode-error", common.GetComponentInfo()) + } + } else if discValue == "none" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode) if err != nil { err = core.SDKErrorf(err, "", "unmarshal-VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode-error", common.GetComponentInfo()) @@ -139060,6 +143990,16 @@ type VPNGatewayPrototypeVPNGatewayRouteModePrototype struct { Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` + // The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + // advertise routes with these CIDRs as route destinations. + AdvertisedCIDRs []string `json:"advertised_cidrs,omitempty"` + + // The local autonomous system number (ASN) for this VPN gateway and its connections. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + LocalAsn *int64 `json:"local_asn,omitempty"` + // The mode for this VPN gateway. Mode *string `json:"mode,omitempty"` } @@ -139104,6 +144044,16 @@ func UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(m map[string]json. err = core.SDKErrorf(err, "", "subnet-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "advertised_cidrs", &obj.AdvertisedCIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "advertised_cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "local_asn", &obj.LocalAsn) + if err != nil { + err = core.SDKErrorf(err, "", "local_asn-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) @@ -139166,6 +144116,13 @@ type VPNGatewayRouteMode struct { // The VPC this VPN gateway resides in. VPC *VPCReference `json:"vpc" validate:"required"` + // The static CIDRs advertised through any enabled routing protocol (for example, BGP). The routing protocol will + // advertise routes with these CIDRs as route destinations. + AdvertisedCIDRs []string `json:"advertised_cidrs" validate:"required"` + + // The local autonomous system number (ASN) for this VPN gateway and its connections. + LocalAsn *int64 `json:"local_asn" validate:"required"` + // The mode for this VPN gateway. Mode *string `json:"mode" validate:"required"` } @@ -139291,6 +144248,16 @@ func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "advertised_cidrs", &obj.AdvertisedCIDRs) + if err != nil { + err = core.SDKErrorf(err, "", "advertised_cidrs-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "local_asn", &obj.LocalAsn) + if err != nil { + err = core.SDKErrorf(err, "", "local_asn-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) @@ -139300,6 +144267,51 @@ func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface return } +// VPNGatewayServiceConnectionCreatorTransitGatewayReference : VPNGatewayServiceConnectionCreatorTransitGatewayReference struct +// This model "extends" VPNGatewayServiceConnectionCreator +type VPNGatewayServiceConnectionCreatorTransitGatewayReference struct { + // The CRN for this transit gateway. + CRN *string `json:"crn" validate:"required"` + + // The unique identifier for this transit gateway. + ID *string `json:"id" validate:"required"` + + // The resource type. + ResourceType *string `json:"resource_type" validate:"required"` +} + +// Constants associated with the VPNGatewayServiceConnectionCreatorTransitGatewayReference.ResourceType property. +// The resource type. +const ( + VPNGatewayServiceConnectionCreatorTransitGatewayReferenceResourceTypeTransitGatewayConst = "transit_gateway" +) + +func (*VPNGatewayServiceConnectionCreatorTransitGatewayReference) isaVPNGatewayServiceConnectionCreator() bool { + return true +} + +// UnmarshalVPNGatewayServiceConnectionCreatorTransitGatewayReference unmarshals an instance of VPNGatewayServiceConnectionCreatorTransitGatewayReference from the specified map of raw messages. +func UnmarshalVPNGatewayServiceConnectionCreatorTransitGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayServiceConnectionCreatorTransitGatewayReference) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + err = core.SDKErrorf(err, "", "crn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNServerAuthenticationByCertificate : VPNServerAuthenticationByCertificate struct // This model "extends" VPNServerAuthentication type VPNServerAuthenticationByCertificate struct { @@ -143157,45 +148169,44 @@ func UnmarshalInstanceClusterNetworkAttachmentPrototypeClusterNetworkInterfaceCl return } -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct -// Models which "extend" this model: -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager +// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct { +type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. - CronSpec *string `json:"cron_spec,omitempty"` - - Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` - - Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` -} + CronSpec *string `json:"cron_spec" validate:"required"` -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { - return true + Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` } -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecIntf interface { - InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf - isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool +// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup (Generic Model Constructor) +func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup(cronSpec string, group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup, err error) { + _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup{ + CronSpec: core.StringPtr(cronSpec), + Group: group, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return } -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototype() bool { +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup) isaInstanceGroupManagerActionPrototype() bool { return true } -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) +// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup from the specified map of raw messages. +func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) @@ -143211,6 +148222,58 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronS err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) return } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager struct +// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype +type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager struct { + // The name for this instance group manager action. The name must not be used by another action for the instance group + // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name,omitempty"` + + // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min + // period. + CronSpec *string `json:"cron_spec" validate:"required"` + + Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` +} + +// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager (Generic Model Constructor) +func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager(cronSpec string, manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager, err error) { + _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager{ + CronSpec: core.StringPtr(cronSpec), + Manager: manager, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { + return true +} + +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager) isaInstanceGroupManagerActionPrototype() bool { + return true +} + +// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager from the specified map of raw messages. +func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecWithManager) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) + if err != nil { + err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) @@ -143220,57 +148283,102 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronS return } -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct -// Models which "extend" this model: -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup -// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager +// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct { +type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The date and time the scheduled action will run. - RunAt *strfmt.DateTime `json:"run_at,omitempty"` - - Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` - - Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` -} + Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { - return true + // The date and time the scheduled action will run. + RunAt *strfmt.DateTime `json:"run_at" validate:"required"` } -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtIntf interface { - InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf - isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool +// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup (Generic Model Constructor) +func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup(group *InstanceGroupManagerScheduledActionGroupPrototype, runAt *strfmt.DateTime) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup, err error) { + _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup{ + Group: group, + RunAt: runAt, + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return } -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototype() bool { +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup) isaInstanceGroupManagerActionPrototype() bool { return true } -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) +// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup from the specified map of raw messages. +func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } + err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) + if err != nil { + err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) + return + } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) return } - err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager struct +// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype +type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager struct { + // The name for this instance group manager action. The name must not be used by another action for the instance group + // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name,omitempty"` + + Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` + + // The date and time the scheduled action will run. + RunAt *strfmt.DateTime `json:"run_at" validate:"required"` +} + +// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager (Generic Model Constructor) +func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf, runAt *strfmt.DateTime) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager, err error) { + _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager{ + Manager: manager, + RunAt: runAt, + } + err = core.ValidateStruct(_model, "required parameters") if err != nil { - err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { + return true +} + +func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager) isaInstanceGroupManagerActionPrototype() bool { + return true +} + +// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager from the specified map of raw messages. +func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtWithManager) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) @@ -143278,6 +148386,11 @@ func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) + if err != nil { + err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -144553,7 +149666,8 @@ type InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstance // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -144572,6 +149686,12 @@ type InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstance // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -144603,6 +149723,16 @@ const ( InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment : Instantiate InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment(catalogOffering InstanceCatalogOfferingPrototypeIntf, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment, err error) { _model = &InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkAttachment{ @@ -144703,6 +149833,11 @@ func UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferin err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -144790,7 +149925,8 @@ type InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstance // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -144809,6 +149945,12 @@ type InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstance // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -144840,6 +149982,16 @@ const ( InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface : Instantiate InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface(catalogOffering InstanceCatalogOfferingPrototypeIntf, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface, err error) { _model = &InstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferingInstanceByNetworkInterface{ @@ -144940,6 +150092,11 @@ func UnmarshalInstancePrototypeInstanceByCatalogOfferingInstanceByCatalogOfferin err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -145027,7 +150184,8 @@ type InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -145046,6 +150204,12 @@ type InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -145078,6 +150242,16 @@ const ( InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment : Instantiate InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment(image ImageIdentityIntf, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment, err error) { _model = &InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAttachment{ @@ -145178,6 +150352,11 @@ func UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkAt err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -145265,7 +150444,8 @@ type InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface s // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -145284,6 +150464,12 @@ type InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface s // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -145316,6 +150502,16 @@ const ( InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface : Instantiate InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface(image ImageIdentityIntf, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface, err error) { _model = &InstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkInterface{ @@ -145416,6 +150612,11 @@ func UnmarshalInstancePrototypeInstanceByImageInstanceByImageInstanceByNetworkIn err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -145503,7 +150704,8 @@ type InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceBy // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -145522,6 +150724,12 @@ type InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceBy // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -145551,6 +150759,16 @@ const ( InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment : Instantiate InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment, err error) { _model = &InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkAttachment{ @@ -145651,6 +150869,11 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotI err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -145733,7 +150956,8 @@ type InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceBy // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -145752,6 +150976,12 @@ type InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceBy // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -145781,6 +151011,16 @@ const ( InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface : Instantiate InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface, err error) { _model = &InstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotInstanceByNetworkInterface{ @@ -145881,6 +151121,11 @@ func UnmarshalInstancePrototypeInstanceBySourceSnapshotInstanceBySourceSnapshotI err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -145963,7 +151208,8 @@ type InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmen // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -145982,6 +151228,12 @@ type InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmen // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -146011,6 +151263,16 @@ const ( InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment : Instantiate InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceByVolumeContext, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment, err error) { _model = &InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkAttachment{ @@ -146111,6 +151373,11 @@ func UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwork err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -146193,7 +151460,8 @@ type InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -146212,6 +151480,12 @@ type InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -146241,6 +151515,16 @@ const ( InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface : Instantiate InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceByVolumeContext, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface, err error) { _model = &InstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetworkInterface{ @@ -146341,6 +151625,11 @@ func UnmarshalInstancePrototypeInstanceByVolumeInstanceByVolumeInstanceByNetwork err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -146421,7 +151710,8 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateB // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -146440,6 +151730,12 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateB // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -146471,6 +151767,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment : Instantiate InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment(catalogOffering InstanceCatalogOfferingPrototypeIntf, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkAttachment{ @@ -146571,6 +151877,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstance err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -146656,7 +151967,8 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateB // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -146675,6 +151987,12 @@ type InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateB // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -146706,6 +152024,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface : Instantiate InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface(catalogOffering InstanceCatalogOfferingPrototypeIntf, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstanceTemplateByCatalogOfferingInstanceByNetworkInterface{ @@ -146806,6 +152134,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOfferingInstance err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -146891,7 +152224,8 @@ type InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInst // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -146910,6 +152244,12 @@ type InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInst // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -146942,6 +152282,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment : Instantiate InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment(image ImageIdentityIntf, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkAttachment{ @@ -147042,6 +152392,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateBy err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -147127,7 +152482,8 @@ type InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInst // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -147146,6 +152502,12 @@ type InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInst // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -147178,6 +152540,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface : Instantiate InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface(image ImageIdentityIntf, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateByImageInstanceByNetworkInterface{ @@ -147278,6 +152650,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImageInstanceTemplateBy err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -147363,7 +152740,8 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBy // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -147382,6 +152760,12 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBy // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -147411,6 +152795,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment : Instantiate InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, zone ZoneIdentityIntf, primaryNetworkAttachment *InstanceNetworkAttachmentPrototype) (_model *InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkAttachment{ @@ -147511,6 +152905,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceT err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -147591,7 +152990,8 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBy // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -147610,6 +153010,12 @@ type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBy // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -147639,6 +153045,16 @@ const ( InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + // NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface : Instantiate InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface (Generic Model Constructor) func (*VpcV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, zone ZoneIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype) (_model *InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceTemplateBySourceSnapshotInstanceByNetworkInterface{ @@ -147739,6 +153155,11 @@ func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshotInstanceT err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -147830,7 +153251,8 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByC // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -147850,6 +153272,12 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByC // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -147881,6 +153309,16 @@ const ( InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkAttachment) isaInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext() bool { return true } @@ -147987,6 +153425,11 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextIn err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -148083,7 +153526,8 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByC // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -148103,6 +153547,12 @@ type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByC // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -148134,6 +153584,16 @@ const ( InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextInstanceByCatalogOfferingInstanceTemplateContextInstanceByNetworkInterface) isaInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext() bool { return true } @@ -148240,6 +153700,11 @@ func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContextIn err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -148336,7 +153801,8 @@ type InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstan // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -148356,6 +153822,12 @@ type InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstan // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -148388,6 +153860,16 @@ const ( InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkAttachment) isaInstanceTemplateInstanceByImageInstanceTemplateContext() bool { return true } @@ -148494,6 +153976,11 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContextInstanceByIm err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -148590,7 +154077,8 @@ type InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstan // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -148610,6 +154098,12 @@ type InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstan // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -148642,6 +154136,16 @@ const ( InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceByImageInstanceTemplateContextInstanceByImageInstanceTemplateContextInstanceByNetworkInterface) isaInstanceTemplateInstanceByImageInstanceTemplateContext() bool { return true } @@ -148748,6 +154252,11 @@ func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContextInstanceByIm err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -148844,7 +154353,8 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySo // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -148864,6 +154374,12 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySo // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -148896,6 +154412,16 @@ const ( InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachmentVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkAttachment) isaInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext() bool { return true } @@ -149002,6 +154528,11 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextIns err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -149098,7 +154629,8 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySo // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // - // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. + // If unspecified, `bxf-2x8` will be used, but this default value may change in the future without changing the API + // version. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ReservationAffinity *InstanceReservationAffinityPrototype `json:"reservation_affinity,omitempty"` @@ -149118,6 +154650,12 @@ type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySo // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` + // The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the + // instance profile's `volume_bandwidth_qos_modes`. + // + // If unspecified, the default volume bandwidth QoS mode from the profile will be used. + VolumeBandwidthQosMode *string `json:"volume_bandwidth_qos_mode,omitempty"` + // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network attachments or instance network @@ -149153,6 +154691,16 @@ const ( InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceConfidentialComputeModeTdxConst = "tdx" ) +// Constants associated with the InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface.VolumeBandwidthQosMode property. +// The volume bandwidth QoS mode to use for this virtual server instance. The specified value must be listed in the +// instance profile's `volume_bandwidth_qos_modes`. +// +// If unspecified, the default volume bandwidth QoS mode from the profile will be used. +const ( + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModePooledConst = "pooled" + InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterfaceVolumeBandwidthQosModeWeightedConst = "weighted" +) + func (*InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextInstanceBySourceSnapshotInstanceTemplateContextInstanceByNetworkInterface) isaInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext() bool { return true } @@ -149259,6 +154807,11 @@ func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContextIns err = core.SDKErrorf(err, "", "volume_attachments-error", common.GetComponentInfo()) return } + err = core.UnmarshalPrimitive(m, "volume_bandwidth_qos_mode", &obj.VolumeBandwidthQosMode) + if err != nil { + err = core.SDKErrorf(err, "", "volume_bandwidth_qos_mode-error", common.GetComponentInfo()) + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { err = core.SDKErrorf(err, "", "vpc-error", common.GetComponentInfo()) @@ -149944,6 +155497,104 @@ func (loadBalancerPoolMemberTargetPrototypeLoadBalancerIdentityLoadBalancerIdent return } +// LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref : LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref struct +// This model "extends" LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity +type LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref struct { + // The URL for this reserved IP. + Href *string `json:"href" validate:"required"` +} + +// NewLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref : Instantiate LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref(href string) (_model *LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref, err error) { + _model = &LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref) isaLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() bool { + return true +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref) isaLoadBalancerPoolMemberTargetPrototype() bool { + return true +} + +// UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref +func (loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref *LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.Href) { + _patch["href"] = loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByHref.Href + } + + return +} + +// LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID : LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID struct +// This model "extends" LoadBalancerPoolMemberTargetPrototypeReservedIPIdentity +type LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID struct { + // The unique identifier for this reserved IP. + ID *string `json:"id" validate:"required"` +} + +// NewLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID : Instantiate LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID (Generic Model Constructor) +func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID(id string) (_model *LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID, err error) { + _model = &LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(_model, "required parameters") + if err != nil { + err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) + } + return +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID) isaLoadBalancerPoolMemberTargetPrototypeReservedIPIdentity() bool { + return true +} + +func (*LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID) isaLoadBalancerPoolMemberTargetPrototype() bool { + return true +} + +// UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID +func (loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID *LoadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID.ID) { + _patch["id"] = loadBalancerPoolMemberTargetPrototypeReservedIPIdentityByID.ID + } + + return +} + // NetworkInterfaceIPPrototypeReservedIPIdentityByHref : NetworkInterfaceIPPrototypeReservedIPIdentityByHref struct // This model "extends" NetworkInterfaceIPPrototypeReservedIPIdentity type NetworkInterfaceIPPrototypeReservedIPIdentityByHref struct { @@ -151282,6 +156933,108 @@ func UnmarshalShareSourceSnapshotPrototypeShareSnapshotIdentityShareSnapshotIden return } +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn,omitempty"` + + // The IP address of the peer VPN gateway for this connection. + Address *string `json:"address,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + err = core.SDKErrorf(err, "", "address-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch +func (vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch *VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.Asn) { + _patch["asn"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.Asn + } + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.Address) { + _patch["address"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerAddressPatch.Address + } + + return +} + +// VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct +// This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch +type VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch struct { + // The peer autonomous system number (ASN) for this VPN gateway connection. The ASN values in the + // [restricted ASN list]( + // https://cloud.ibm.com/docs/vpc?topic=vpc-planning-considerations-vpn#dynamic-route-based-considerations) are + // reserved and unavailable. + Asn *int64 `json:"asn,omitempty"` + + // The FQDN of the peer VPN gateway for this connection. + Fqdn *string `json:"fqdn,omitempty"` +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatch() bool { + return true +} + +func (*VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) isaVPNGatewayConnectionPeerPatch() bool { + return true +} + +// UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch unmarshals an instance of VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) + err = core.UnmarshalPrimitive(m, "asn", &obj.Asn) + if err != nil { + err = core.SDKErrorf(err, "", "asn-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "fqdn", &obj.Fqdn) + if err != nil { + err = core.SDKErrorf(err, "", "fqdn-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// asPatch returns a generic map representation of the VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch +func (vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch *VPNGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch) asPatch() (_patch map[string]interface{}) { + _patch = map[string]interface{}{} + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch.Asn) { + _patch["asn"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch.Asn + } + if !core.IsNil(vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch.Fqdn) { + _patch["fqdn"] = vpnGatewayConnectionPeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionDynamicRouteModePeerPatchVPNGatewayConnectionPeerFqdnPatch.Fqdn + } + + return +} + // VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch : VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch struct // This model "extends" VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatch type VPNGatewayConnectionPeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPolicyModePeerPatchVPNGatewayConnectionPeerAddressPatch struct { @@ -151430,6 +157183,249 @@ func (vpnGatewayConnectionPeerPatchVPNGatewayConnectionStaticRouteModePeerPatchV return } +// VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode : VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode struct +// This model "extends" VPNGatewayConnectionRouteMode +type VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode struct { + // If set to false, the VPN gateway connection is shut down. + AdminStateUp *bool `json:"admin_state_up" validate:"required"` + + // The authentication mode. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + AuthenticationMode *string `json:"authentication_mode" validate:"required"` + + // The date and time that this VPN gateway connection was created. + CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + + DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` + + // The establish mode of the VPN gateway connection: + // - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol + // negotiations or rekeying processes. + // - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway + // connection. Additionally, the peer is responsible for initiating the rekeying process + // after the connection is established. If rekeying does not occur, the VPN gateway + // connection will be brought down after its lifetime expires. + EstablishMode *string `json:"establish_mode" validate:"required"` + + // The URL for this VPN gateway connection. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this VPN gateway connection. + ID *string `json:"id" validate:"required"` + + // The IKE policy. If absent, [auto-negotiation is + // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). + IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"` + + // The IPsec policy. If absent, [auto-negotiation is + // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). + IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"` + + // The mode of the VPN gateway. + // + // The enumerated values for this property may + // [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. + Mode *string `json:"mode" validate:"required"` + + // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. + Name *string `json:"name" validate:"required"` + + // The pre-shared key. + Psk *string `json:"psk" validate:"required"` + + // The resource type. + ResourceType *string `json:"resource_type" validate:"required"` + + // The status of a VPN gateway connection. + Status *string `json:"status" validate:"required"` + + // The reasons for the current VPN gateway connection status (if any). + StatusReasons []VPNGatewayConnectionStatusReason `json:"status_reasons" validate:"required"` + + // Indicates whether the traffic is distributed between the `up` tunnels of the VPN gateway connection when the VPC + // route's next hop is a VPN connection. If `false`, the traffic is only routed through the `up` tunnel with the lower + // `public_ip` address. + DistributeTraffic *bool `json:"distribute_traffic" validate:"required"` + + Local *VPNGatewayConnectionDynamicRouteModeLocal `json:"local" validate:"required"` + + Peer VPNGatewayConnectionDynamicRouteModePeerIntf `json:"peer" validate:"required"` + + // The routing protocol for this VPN gateway connection. + RoutingProtocol *string `json:"routing_protocol" validate:"required"` + + // The VPN tunnel configuration for this VPN gateway connection (in dynamic route mode). + Tunnels []VPNGatewayConnectionDynamicRouteModeTunnel `json:"tunnels" validate:"required"` +} + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.AuthenticationMode property. +// The authentication mode. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeAuthenticationModePskConst = "psk" +) + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.EstablishMode property. +// The establish mode of the VPN gateway connection: +// - `bidirectional`: Either side of the VPN gateway can initiate IKE protocol +// negotiations or rekeying processes. +// - `peer_only`: Only the peer can initiate IKE protocol negotiations for this VPN gateway +// connection. Additionally, the peer is responsible for initiating the rekeying process +// after the connection is established. If rekeying does not occur, the VPN gateway +// connection will be brought down after its lifetime expires. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeEstablishModeBidirectionalConst = "bidirectional" + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeEstablishModePeerOnlyConst = "peer_only" +) + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.Mode property. +// The mode of the VPN gateway. +// +// The enumerated values for this property may +// [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeModePolicyConst = "policy" + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeModeRouteConst = "route" +) + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.ResourceType property. +// The resource type. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection" +) + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.Status property. +// The status of a VPN gateway connection. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeStatusDownConst = "down" + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeStatusUpConst = "up" +) + +// Constants associated with the VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode.RoutingProtocol property. +// The routing protocol for this VPN gateway connection. +const ( + VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteModeRoutingProtocolBgpConst = "bgp" +) + +func (*VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode) isaVPNGatewayConnectionRouteMode() bool { + return true +} + +func (*VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode) isaVPNGatewayConnection() bool { + return true +} + +// UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode unmarshals an instance of VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionRouteModeVPNGatewayConnectionDynamicRouteMode) + err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) + if err != nil { + err = core.SDKErrorf(err, "", "admin_state_up-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) + if err != nil { + err = core.SDKErrorf(err, "", "authentication_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + if err != nil { + err = core.SDKErrorf(err, "", "created_at-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) + if err != nil { + err = core.SDKErrorf(err, "", "dead_peer_detection-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "establish_mode", &obj.EstablishMode) + if err != nil { + err = core.SDKErrorf(err, "", "establish_mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + err = core.SDKErrorf(err, "", "href-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + err = core.SDKErrorf(err, "", "id-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) + if err != nil { + err = core.SDKErrorf(err, "", "ike_policy-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) + if err != nil { + err = core.SDKErrorf(err, "", "ipsec_policy-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) + if err != nil { + err = core.SDKErrorf(err, "", "mode-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + if err != nil { + err = core.SDKErrorf(err, "", "psk-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + err = core.SDKErrorf(err, "", "resource_type-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "status", &obj.Status) + if err != nil { + err = core.SDKErrorf(err, "", "status-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVPNGatewayConnectionStatusReason) + if err != nil { + err = core.SDKErrorf(err, "", "status_reasons-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "distribute_traffic", &obj.DistributeTraffic) + if err != nil { + err = core.SDKErrorf(err, "", "distribute_traffic-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "local", &obj.Local, UnmarshalVPNGatewayConnectionDynamicRouteModeLocal) + if err != nil { + err = core.SDKErrorf(err, "", "local-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "peer", &obj.Peer, UnmarshalVPNGatewayConnectionDynamicRouteModePeer) + if err != nil { + err = core.SDKErrorf(err, "", "peer-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) + if err != nil { + err = core.SDKErrorf(err, "", "routing_protocol-error", common.GetComponentInfo()) + return + } + err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionDynamicRouteModeTunnel) + if err != nil { + err = core.SDKErrorf(err, "", "tunnels-error", common.GetComponentInfo()) + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode : VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode struct // This model "extends" VPNGatewayConnectionRouteMode type VPNGatewayConnectionRouteModeVPNGatewayConnectionStaticRouteMode struct { @@ -152197,244 +158193,6 @@ func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolum return } -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct -// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct { - // The name for this instance group manager action. The name must not be used by another action for the instance group - // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name,omitempty"` - - // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min - // period. - CronSpec *string `json:"cron_spec,omitempty"` - - Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` -} - -// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup (Generic Model Constructor) -func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup, err error) { - _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup{ - Group: group, - } - err = core.ValidateStruct(_model, "required parameters") - if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) - } - return -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototype() bool { - return true -} - -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) - if err != nil { - err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct -// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct { - // The name for this instance group manager action. The name must not be used by another action for the instance group - // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name,omitempty"` - - // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min - // period. - CronSpec *string `json:"cron_spec,omitempty"` - - Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` -} - -// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager (Generic Model Constructor) -func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager, err error) { - _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager{ - Manager: manager, - } - err = core.ValidateStruct(_model, "required parameters") - if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) - } - return -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototype() bool { - return true -} - -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) - if err != nil { - err = core.SDKErrorf(err, "", "cron_spec-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct -// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct { - // The name for this instance group manager action. The name must not be used by another action for the instance group - // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name,omitempty"` - - // The date and time the scheduled action will run. - RunAt *strfmt.DateTime `json:"run_at,omitempty"` - - Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` -} - -// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup (Generic Model Constructor) -func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup, err error) { - _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup{ - Group: group, - } - err = core.ValidateStruct(_model, "required parameters") - if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) - } - return -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototype() bool { - return true -} - -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) - if err != nil { - err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "group-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct -// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt -type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct { - // The name for this instance group manager action. The name must not be used by another action for the instance group - // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name,omitempty"` - - // The date and time the scheduled action will run. - RunAt *strfmt.DateTime `json:"run_at,omitempty"` - - Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` -} - -// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager (Generic Model Constructor) -func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager, err error) { - _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager{ - Manager: manager, - } - err = core.ValidateStruct(_model, "required parameters") - if err != nil { - err = core.SDKErrorf(err, "", "model-missing-required", common.GetComponentInfo()) - } - return -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { - return true -} - -func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototype() bool { - return true -} - -// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager from the specified map of raw messages. -func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - err = core.SDKErrorf(err, "", "name-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) - if err != nil { - err = core.SDKErrorf(err, "", "run_at-error", common.GetComponentInfo()) - return - } - err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) - if err != nil { - err = core.SDKErrorf(err, "", "manager-error", common.GetComponentInfo()) - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // BackupPoliciesPager can be used to simplify the use of the "ListBackupPolicies" method. type BackupPoliciesPager struct { hasNext bool @@ -153907,6 +159665,98 @@ func (pager *EndpointGatewayIpsPager) GetAll() (allItems []ReservedIP, err error return } +// EndpointGatewayResourceBindingsPager can be used to simplify the use of the "ListEndpointGatewayResourceBindings" method. +type EndpointGatewayResourceBindingsPager struct { + hasNext bool + options *ListEndpointGatewayResourceBindingsOptions + client *VpcV1 + pageContext struct { + next *string + } +} + +// NewEndpointGatewayResourceBindingsPager returns a new EndpointGatewayResourceBindingsPager instance. +func (vpc *VpcV1) NewEndpointGatewayResourceBindingsPager(options *ListEndpointGatewayResourceBindingsOptions) (pager *EndpointGatewayResourceBindingsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) + return + } + + var optionsCopy ListEndpointGatewayResourceBindingsOptions = *options + pager = &EndpointGatewayResourceBindingsPager{ + hasNext: true, + options: &optionsCopy, + client: vpc, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *EndpointGatewayResourceBindingsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *EndpointGatewayResourceBindingsPager) GetNextWithContext(ctx context.Context) (page []EndpointGatewayResourceBinding, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListEndpointGatewayResourceBindingsWithContext(ctx, pager.options) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + + var next *string + if result.Next != nil { + var start *string + start, err = core.GetQueryParam(result.Next.Href, "start") + if err != nil { + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) + return + } + next = start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.ResourceBindings + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *EndpointGatewayResourceBindingsPager) GetAllWithContext(ctx context.Context) (allItems []EndpointGatewayResourceBinding, err error) { + for pager.HasNext() { + var nextPage []EndpointGatewayResourceBinding + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *EndpointGatewayResourceBindingsPager) GetNext() (page []EndpointGatewayResourceBinding, err error) { + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *EndpointGatewayResourceBindingsPager) GetAll() (allItems []EndpointGatewayResourceBinding, err error) { + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + // FloatingIpsPager can be used to simplify the use of the "ListFloatingIps" method. type FloatingIpsPager struct { hasNext bool @@ -159059,6 +164909,98 @@ func (pager *VPNGatewayConnectionsPager) GetAll() (allItems []VPNGatewayConnecti return } +// VPNGatewayServiceConnectionsPager can be used to simplify the use of the "ListVPNGatewayServiceConnections" method. +type VPNGatewayServiceConnectionsPager struct { + hasNext bool + options *ListVPNGatewayServiceConnectionsOptions + client *VpcV1 + pageContext struct { + next *string + } +} + +// NewVPNGatewayServiceConnectionsPager returns a new VPNGatewayServiceConnectionsPager instance. +func (vpc *VpcV1) NewVPNGatewayServiceConnectionsPager(options *ListVPNGatewayServiceConnectionsOptions) (pager *VPNGatewayServiceConnectionsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = core.SDKErrorf(nil, "the 'options.Start' field should not be set", "no-query-setting", common.GetComponentInfo()) + return + } + + var optionsCopy ListVPNGatewayServiceConnectionsOptions = *options + pager = &VPNGatewayServiceConnectionsPager{ + hasNext: true, + options: &optionsCopy, + client: vpc, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *VPNGatewayServiceConnectionsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *VPNGatewayServiceConnectionsPager) GetNextWithContext(ctx context.Context) (page []VPNGatewayServiceConnection, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListVPNGatewayServiceConnectionsWithContext(ctx, pager.options) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + + var next *string + if result.Next != nil { + var start *string + start, err = core.GetQueryParam(result.Next.Href, "start") + if err != nil { + errMsg := fmt.Sprintf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) + err = core.SDKErrorf(err, errMsg, "get-query-error", common.GetComponentInfo()) + return + } + next = start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.ServiceConnections + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *VPNGatewayServiceConnectionsPager) GetAllWithContext(ctx context.Context) (allItems []VPNGatewayServiceConnection, err error) { + for pager.HasNext() { + var nextPage []VPNGatewayServiceConnection + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + err = core.RepurposeSDKProblem(err, "error-getting-next-page") + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *VPNGatewayServiceConnectionsPager) GetNext() (page []VPNGatewayServiceConnection, err error) { + page, err = pager.GetNextWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *VPNGatewayServiceConnectionsPager) GetAll() (allItems []VPNGatewayServiceConnection, err error) { + allItems, err = pager.GetAllWithContext(context.Background()) + err = core.RepurposeSDKProblem(err, "") + return +} + // VPNServersPager can be used to simplify the use of the "ListVPNServers" method. type VPNServersPager struct { hasNext bool diff --git a/vendor/github.com/asaskevich/govalidator/.gitignore b/vendor/github.com/asaskevich/govalidator/.gitignore deleted file mode 100644 index 8d69a9418a..0000000000 --- a/vendor/github.com/asaskevich/govalidator/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -bin/ -.idea/ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml deleted file mode 100644 index bb83c6670d..0000000000 --- a/vendor/github.com/asaskevich/govalidator/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -dist: xenial -go: - - '1.10' - - '1.11' - - '1.12' - - '1.13' - - 'tip' - -script: - - go test -coverpkg=./... -coverprofile=coverage.info -timeout=5s - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md b/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md deleted file mode 100644 index 4b462b0d81..0000000000 --- a/vendor/github.com/asaskevich/govalidator/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor Code of Conduct - -This project adheres to [The Code Manifesto](http://codemanifesto.com) -as its guidelines for contributor interactions. - -## The Code Manifesto - -We want to work in an ecosystem that empowers developers to reach their -potential — one that encourages growth and effective collaboration. A space -that is safe for all. - -A space such as this benefits everyone that participates in it. It encourages -new developers to enter our field. It is through discussion and collaboration -that we grow, and through growth that we improve. - -In the effort to create such a place, we hold to these values: - -1. **Discrimination limits us.** This includes discrimination on the basis of - race, gender, sexual orientation, gender identity, age, nationality, - technology and any other arbitrary exclusion of a group of people. -2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort - levels. Remember that, and if brought to your attention, heed it. -3. **We are our biggest assets.** None of us were born masters of our trade. - Each of us has been helped along the way. Return that favor, when and where - you can. -4. **We are resources for the future.** As an extension of #3, share what you - know. Make yourself a resource to help those that come after you. -5. **Respect defines us.** Treat others as you wish to be treated. Make your - discussions, criticisms and debates from a position of respectfulness. Ask - yourself, is it true? Is it necessary? Is it constructive? Anything less is - unacceptable. -6. **Reactions require grace.** Angry responses are valid, but abusive language - and vindictive actions are toxic. When something happens that offends you, - handle it assertively, but be respectful. Escalate reasonably, and try to - allow the offender an opportunity to explain themselves, and possibly - correct the issue. -7. **Opinions are just that: opinions.** Each and every one of us, due to our - background and upbringing, have varying opinions. That is perfectly - acceptable. Remember this: if you respect your own opinions, you should - respect the opinions of others. -8. **To err is human.** You might not intend it, but mistakes do happen and - contribute to build experience. Tolerate honest mistakes, and don't - hesitate to apologize if you make one yourself. diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md deleted file mode 100644 index 7ed268a1ed..0000000000 --- a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md +++ /dev/null @@ -1,63 +0,0 @@ -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Financial contributions - -We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator). -Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. - - -## Credits - - -### Contributors - -Thank you to all the people who have already contributed to govalidator! - - - -### Backers - -Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor)) - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/LICENSE b/vendor/github.com/asaskevich/govalidator/LICENSE deleted file mode 100644 index cacba91024..0000000000 --- a/vendor/github.com/asaskevich/govalidator/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2020 Alex Saskevich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md deleted file mode 100644 index 2c3fc35eb6..0000000000 --- a/vendor/github.com/asaskevich/govalidator/README.md +++ /dev/null @@ -1,622 +0,0 @@ -govalidator -=========== -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GoDoc](https://godoc.org/github.com/asaskevich/govalidator?status.png)](https://godoc.org/github.com/asaskevich/govalidator) -[![Build Status](https://travis-ci.org/asaskevich/govalidator.svg?branch=master)](https://travis-ci.org/asaskevich/govalidator) -[![Coverage](https://codecov.io/gh/asaskevich/govalidator/branch/master/graph/badge.svg)](https://codecov.io/gh/asaskevich/govalidator) [![Go Report Card](https://goreportcard.com/badge/github.com/asaskevich/govalidator)](https://goreportcard.com/report/github.com/asaskevich/govalidator) [![GoSearch](http://go-search.org/badge?id=github.com%2Fasaskevich%2Fgovalidator)](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [![Backers on Open Collective](https://opencollective.com/govalidator/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/govalidator/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield) - -A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js). - -#### Installation -Make sure that Go is installed on your computer. -Type the following command in your terminal: - - go get github.com/asaskevich/govalidator - -or you can get specified release of the package with `gopkg.in`: - - go get gopkg.in/asaskevich/govalidator.v10 - -After it the package is ready to use. - - -#### Import package in your project -Add following line in your `*.go` file: -```go -import "github.com/asaskevich/govalidator" -``` -If you are unhappy to use long `govalidator`, you can do something like this: -```go -import ( - valid "github.com/asaskevich/govalidator" -) -``` - -#### Activate behavior to require all fields have a validation tag by default -`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function. - -`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors. - -```go -import "github.com/asaskevich/govalidator" - -func init() { - govalidator.SetFieldsRequiredByDefault(true) -} -``` - -Here's some code to explain it: -```go -// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -type exampleStruct struct { - Name string `` - Email string `valid:"email"` -} - -// this, however, will only fail when Email is empty or an invalid email address: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email"` -} - -// lastly, this will only fail when Email is an invalid email address but not when it's empty: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email,optional"` -} -``` - -#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123)) -##### Custom validator function signature -A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible. -```go -import "github.com/asaskevich/govalidator" - -// old signature -func(i interface{}) bool - -// new signature -func(i interface{}, o interface{}) bool -``` - -##### Adding a custom validator -This was changed to prevent data races when accessing custom validators. -```go -import "github.com/asaskevich/govalidator" - -// before -govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool { - // ... -} - -// after -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool { - // ... -}) -``` - -#### List of functions: -```go -func Abs(value float64) float64 -func BlackList(str, chars string) string -func ByteLength(str string, params ...string) bool -func CamelCaseToUnderscore(str string) string -func Contains(str, substring string) bool -func Count(array []interface{}, iterator ConditionIterator) int -func Each(array []interface{}, iterator Iterator) -func ErrorByField(e error, field string) string -func ErrorsByField(e error) map[string]string -func Filter(array []interface{}, iterator ConditionIterator) []interface{} -func Find(array []interface{}, iterator ConditionIterator) interface{} -func GetLine(s string, index int) (string, error) -func GetLines(s string) []string -func HasLowerCase(str string) bool -func HasUpperCase(str string) bool -func HasWhitespace(str string) bool -func HasWhitespaceOnly(str string) bool -func InRange(value interface{}, left interface{}, right interface{}) bool -func InRangeFloat32(value, left, right float32) bool -func InRangeFloat64(value, left, right float64) bool -func InRangeInt(value, left, right interface{}) bool -func IsASCII(str string) bool -func IsAlpha(str string) bool -func IsAlphanumeric(str string) bool -func IsBase64(str string) bool -func IsByteLength(str string, min, max int) bool -func IsCIDR(str string) bool -func IsCRC32(str string) bool -func IsCRC32b(str string) bool -func IsCreditCard(str string) bool -func IsDNSName(str string) bool -func IsDataURI(str string) bool -func IsDialString(str string) bool -func IsDivisibleBy(str, num string) bool -func IsEmail(str string) bool -func IsExistingEmail(email string) bool -func IsFilePath(str string) (bool, int) -func IsFloat(str string) bool -func IsFullWidth(str string) bool -func IsHalfWidth(str string) bool -func IsHash(str string, algorithm string) bool -func IsHexadecimal(str string) bool -func IsHexcolor(str string) bool -func IsHost(str string) bool -func IsIP(str string) bool -func IsIPv4(str string) bool -func IsIPv6(str string) bool -func IsISBN(str string, version int) bool -func IsISBN10(str string) bool -func IsISBN13(str string) bool -func IsISO3166Alpha2(str string) bool -func IsISO3166Alpha3(str string) bool -func IsISO4217(str string) bool -func IsISO693Alpha2(str string) bool -func IsISO693Alpha3b(str string) bool -func IsIn(str string, params ...string) bool -func IsInRaw(str string, params ...string) bool -func IsInt(str string) bool -func IsJSON(str string) bool -func IsLatitude(str string) bool -func IsLongitude(str string) bool -func IsLowerCase(str string) bool -func IsMAC(str string) bool -func IsMD4(str string) bool -func IsMD5(str string) bool -func IsMagnetURI(str string) bool -func IsMongoID(str string) bool -func IsMultibyte(str string) bool -func IsNatural(value float64) bool -func IsNegative(value float64) bool -func IsNonNegative(value float64) bool -func IsNonPositive(value float64) bool -func IsNotNull(str string) bool -func IsNull(str string) bool -func IsNumeric(str string) bool -func IsPort(str string) bool -func IsPositive(value float64) bool -func IsPrintableASCII(str string) bool -func IsRFC3339(str string) bool -func IsRFC3339WithoutZone(str string) bool -func IsRGBcolor(str string) bool -func IsRegex(str string) bool -func IsRequestURI(rawurl string) bool -func IsRequestURL(rawurl string) bool -func IsRipeMD128(str string) bool -func IsRipeMD160(str string) bool -func IsRsaPub(str string, params ...string) bool -func IsRsaPublicKey(str string, keylen int) bool -func IsSHA1(str string) bool -func IsSHA256(str string) bool -func IsSHA384(str string) bool -func IsSHA512(str string) bool -func IsSSN(str string) bool -func IsSemver(str string) bool -func IsTiger128(str string) bool -func IsTiger160(str string) bool -func IsTiger192(str string) bool -func IsTime(str string, format string) bool -func IsType(v interface{}, params ...string) bool -func IsURL(str string) bool -func IsUTFDigit(str string) bool -func IsUTFLetter(str string) bool -func IsUTFLetterNumeric(str string) bool -func IsUTFNumeric(str string) bool -func IsUUID(str string) bool -func IsUUIDv3(str string) bool -func IsUUIDv4(str string) bool -func IsUUIDv5(str string) bool -func IsULID(str string) bool -func IsUnixTime(str string) bool -func IsUpperCase(str string) bool -func IsVariableWidth(str string) bool -func IsWhole(value float64) bool -func LeftTrim(str, chars string) string -func Map(array []interface{}, iterator ResultIterator) []interface{} -func Matches(str, pattern string) bool -func MaxStringLength(str string, params ...string) bool -func MinStringLength(str string, params ...string) bool -func NormalizeEmail(str string) (string, error) -func PadBoth(str string, padStr string, padLen int) string -func PadLeft(str string, padStr string, padLen int) string -func PadRight(str string, padStr string, padLen int) string -func PrependPathToErrors(err error, path string) error -func Range(str string, params ...string) bool -func RemoveTags(s string) string -func ReplacePattern(str, pattern, replace string) string -func Reverse(s string) string -func RightTrim(str, chars string) string -func RuneLength(str string, params ...string) bool -func SafeFileName(str string) string -func SetFieldsRequiredByDefault(value bool) -func SetNilPtrAllowedByRequired(value bool) -func Sign(value float64) float64 -func StringLength(str string, params ...string) bool -func StringMatches(s string, params ...string) bool -func StripLow(str string, keepNewLines bool) string -func ToBoolean(str string) (bool, error) -func ToFloat(str string) (float64, error) -func ToInt(value interface{}) (res int64, err error) -func ToJSON(obj interface{}) (string, error) -func ToString(obj interface{}) string -func Trim(str, chars string) string -func Truncate(str string, length int, ending string) string -func TruncatingErrorf(str string, args ...interface{}) error -func UnderscoreToCamelCase(s string) string -func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error) -func ValidateStruct(s interface{}) (bool, error) -func WhiteList(str, chars string) string -type ConditionIterator -type CustomTypeValidator -type Error -func (e Error) Error() string -type Errors -func (es Errors) Error() string -func (es Errors) Errors() []error -type ISO3166Entry -type ISO693Entry -type InterfaceParamValidator -type Iterator -type ParamValidator -type ResultIterator -type UnsupportedTypeError -func (e *UnsupportedTypeError) Error() string -type Validator -``` - -#### Examples -###### IsURL -```go -println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) -``` -###### IsType -```go -println(govalidator.IsType("Bob", "string")) -println(govalidator.IsType(1, "int")) -i := 1 -println(govalidator.IsType(&i, "*int")) -``` - -IsType can be used through the tag `type` which is essential for map validation: -```go -type User struct { - Name string `valid:"type(string)"` - Age int `valid:"type(int)"` - Meta interface{} `valid:"type(string)"` -} -result, err := govalidator.ValidateStruct(User{"Bob", 20, "meta"}) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ToString -```go -type User struct { - FirstName string - LastName string -} - -str := govalidator.ToString(&User{"John", "Juan"}) -println(str) -``` -###### Each, Map, Filter, Count for slices -Each iterates over the slice/array and calls Iterator for every item -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.Iterator = func(value interface{}, index int) { - println(value.(int)) -} -govalidator.Each(data, fn) -``` -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} { - return value.(int) * 3 -} -_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15} -``` -```go -data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} -var fn govalidator.ConditionIterator = func(value interface{}, index int) bool { - return value.(int)%2 == 0 -} -_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10} -_ = govalidator.Count(data, fn) // result = 5 -``` -###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2) -If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this: -```go -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) -``` -For completely custom validators (interface-based), see below. - -Here is a list of available validators for struct fields (validator - used function): -```go -"email": IsEmail, -"url": IsURL, -"dialstring": IsDialString, -"requrl": IsRequestURL, -"requri": IsRequestURI, -"alpha": IsAlpha, -"utfletter": IsUTFLetter, -"alphanum": IsAlphanumeric, -"utfletternum": IsUTFLetterNumeric, -"numeric": IsNumeric, -"utfnumeric": IsUTFNumeric, -"utfdigit": IsUTFDigit, -"hexadecimal": IsHexadecimal, -"hexcolor": IsHexcolor, -"rgbcolor": IsRGBcolor, -"lowercase": IsLowerCase, -"uppercase": IsUpperCase, -"int": IsInt, -"float": IsFloat, -"null": IsNull, -"uuid": IsUUID, -"uuidv3": IsUUIDv3, -"uuidv4": IsUUIDv4, -"uuidv5": IsUUIDv5, -"creditcard": IsCreditCard, -"isbn10": IsISBN10, -"isbn13": IsISBN13, -"json": IsJSON, -"multibyte": IsMultibyte, -"ascii": IsASCII, -"printableascii": IsPrintableASCII, -"fullwidth": IsFullWidth, -"halfwidth": IsHalfWidth, -"variablewidth": IsVariableWidth, -"base64": IsBase64, -"datauri": IsDataURI, -"ip": IsIP, -"port": IsPort, -"ipv4": IsIPv4, -"ipv6": IsIPv6, -"dns": IsDNSName, -"host": IsHost, -"mac": IsMAC, -"latitude": IsLatitude, -"longitude": IsLongitude, -"ssn": IsSSN, -"semver": IsSemver, -"rfc3339": IsRFC3339, -"rfc3339WithoutZone": IsRFC3339WithoutZone, -"ISO3166Alpha2": IsISO3166Alpha2, -"ISO3166Alpha3": IsISO3166Alpha3, -"ulid": IsULID, -``` -Validators with parameters - -```go -"range(min|max)": Range, -"length(min|max)": ByteLength, -"runelength(min|max)": RuneLength, -"stringlength(min|max)": StringLength, -"matches(pattern)": StringMatches, -"in(string1|string2|...|stringN)": IsIn, -"rsapub(keylength)" : IsRsaPub, -"minstringlength(int): MinStringLength, -"maxstringlength(int): MaxStringLength, -``` -Validators with parameters for any type - -```go -"type(type)": IsType, -``` - -And here is small example of usage: -```go -type Post struct { - Title string `valid:"alphanum,required"` - Message string `valid:"duck,ascii"` - Message2 string `valid:"animal(dog)"` - AuthorIP string `valid:"ipv4"` - Date string `valid:"-"` -} -post := &Post{ - Title: "My Example Post", - Message: "duck", - Message2: "dog", - AuthorIP: "123.234.54.3", -} - -// Add your own struct validation tags -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) - -// Add your own struct validation tags with parameter -govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool { - species := params[0] - return str == species -}) -govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$") - -result, err := govalidator.ValidateStruct(post) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) -If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` - -So here is small example of usage: -```go -var mapTemplate = map[string]interface{}{ - "name":"required,alpha", - "family":"required,alpha", - "email":"required,email", - "cell-phone":"numeric", - "address":map[string]interface{}{ - "line1":"required,alphanum", - "line2":"alphanum", - "postal-code":"numeric", - }, -} - -var inputMap = map[string]interface{}{ - "name":"Bob", - "family":"Smith", - "email":"foo@bar.baz", - "address":map[string]interface{}{ - "line1":"", - "line2":"", - "postal-code":"", - }, -} - -result, err := govalidator.ValidateMap(inputMap, mapTemplate) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` - -###### WhiteList -```go -// Remove all characters from string ignoring characters between "a" and "z" -println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa") -``` - -###### Custom validation functions -Custom validation using your own domain specific validators is also available - here's an example of how to use it: -```go -import "github.com/asaskevich/govalidator" - -type CustomByteArray [6]byte // custom types are supported and can be validated - -type StructWithCustomByteArray struct { - ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence - Email string `valid:"email"` - CustomMinLength int `valid:"-"` -} - -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // you can type switch on the context interface being validated - case StructWithCustomByteArray: - // you can check and validate against some other field in the context, - // return early or not validate against the context at all – your choice - case SomeOtherType: - // ... - default: - // expecting some other type? Throw/panic here or continue - } - - switch v := i.(type) { // type switch on the struct field being validated - case CustomByteArray: - for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes - if e != 0 { - return true - } - } - } - return false -}) -govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation - case StructWithCustomByteArray: - return len(v.ID) >= v.CustomMinLength - } - return false -}) -``` - -###### Loop over Error() -By default .Error() returns all errors in a single String. To access each error you can do this: -```go - if err != nil { - errs := err.(govalidator.Errors).Errors() - for _, e := range errs { - fmt.Println(e.Error()) - } - } -``` - -###### Custom error messages -Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it: -```go -type Ticket struct { - Id int64 `json:"id"` - FirstName string `json:"firstname" valid:"required~First name is blank"` -} -``` - -#### Notes -Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator). -Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator). - -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Credits -### Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - -#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors) -* [Daniel Lohse](https://github.com/annismckenzie) -* [Attila Oláh](https://github.com/attilaolah) -* [Daniel Korner](https://github.com/Dadie) -* [Steven Wilkin](https://github.com/stevenwilkin) -* [Deiwin Sarjas](https://github.com/deiwin) -* [Noah Shibley](https://github.com/slugmobile) -* [Nathan Davies](https://github.com/nathj07) -* [Matt Sanford](https://github.com/mzsanford) -* [Simon ccl1115](https://github.com/ccl1115) - - - - -### Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)] - - - - - - - - - - - - - - - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) diff --git a/vendor/github.com/asaskevich/govalidator/arrays.go b/vendor/github.com/asaskevich/govalidator/arrays.go deleted file mode 100644 index 3e1da7cb48..0000000000 --- a/vendor/github.com/asaskevich/govalidator/arrays.go +++ /dev/null @@ -1,87 +0,0 @@ -package govalidator - -// Iterator is the function that accepts element of slice/array and its index -type Iterator func(interface{}, int) - -// ResultIterator is the function that accepts element of slice/array and its index and returns any result -type ResultIterator func(interface{}, int) interface{} - -// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean -type ConditionIterator func(interface{}, int) bool - -// ReduceIterator is the function that accepts two element of slice/array and returns result of merging those values -type ReduceIterator func(interface{}, interface{}) interface{} - -// Some validates that any item of array corresponds to ConditionIterator. Returns boolean. -func Some(array []interface{}, iterator ConditionIterator) bool { - res := false - for index, data := range array { - res = res || iterator(data, index) - } - return res -} - -// Every validates that every item of array corresponds to ConditionIterator. Returns boolean. -func Every(array []interface{}, iterator ConditionIterator) bool { - res := true - for index, data := range array { - res = res && iterator(data, index) - } - return res -} - -// Reduce boils down a list of values into a single value by ReduceIterator -func Reduce(array []interface{}, iterator ReduceIterator, initialValue interface{}) interface{} { - for _, data := range array { - initialValue = iterator(initialValue, data) - } - return initialValue -} - -// Each iterates over the slice and apply Iterator to every item -func Each(array []interface{}, iterator Iterator) { - for index, data := range array { - iterator(data, index) - } -} - -// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. -func Map(array []interface{}, iterator ResultIterator) []interface{} { - var result = make([]interface{}, len(array)) - for index, data := range array { - result[index] = iterator(data, index) - } - return result -} - -// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. -func Find(array []interface{}, iterator ConditionIterator) interface{} { - for index, data := range array { - if iterator(data, index) { - return data - } - } - return nil -} - -// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. -func Filter(array []interface{}, iterator ConditionIterator) []interface{} { - var result = make([]interface{}, 0) - for index, data := range array { - if iterator(data, index) { - result = append(result, data) - } - } - return result -} - -// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. -func Count(array []interface{}, iterator ConditionIterator) int { - count := 0 - for index, data := range array { - if iterator(data, index) { - count = count + 1 - } - } - return count -} diff --git a/vendor/github.com/asaskevich/govalidator/converter.go b/vendor/github.com/asaskevich/govalidator/converter.go deleted file mode 100644 index d68e990fc2..0000000000 --- a/vendor/github.com/asaskevich/govalidator/converter.go +++ /dev/null @@ -1,81 +0,0 @@ -package govalidator - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" -) - -// ToString convert the input to a string. -func ToString(obj interface{}) string { - res := fmt.Sprintf("%v", obj) - return res -} - -// ToJSON convert the input to a valid JSON string -func ToJSON(obj interface{}) (string, error) { - res, err := json.Marshal(obj) - if err != nil { - res = []byte("") - } - return string(res), err -} - -// ToFloat convert the input string to a float, or 0.0 if the input is not a float. -func ToFloat(value interface{}) (res float64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = float64(val.Int()) - case uint, uint8, uint16, uint32, uint64: - res = float64(val.Uint()) - case float32, float64: - res = val.Float() - case string: - res, err = strconv.ParseFloat(val.String(), 64) - if err != nil { - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. -func ToInt(value interface{}) (res int64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = val.Int() - case uint, uint8, uint16, uint32, uint64: - res = int64(val.Uint()) - case float32, float64: - res = int64(val.Float()) - case string: - if IsInt(val.String()) { - res, err = strconv.ParseInt(val.String(), 0, 64) - if err != nil { - res = 0 - } - } else { - err = fmt.Errorf("ToInt: invalid numeric format %g", value) - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToBoolean convert the input string to a boolean. -func ToBoolean(str string) (bool, error) { - return strconv.ParseBool(str) -} diff --git a/vendor/github.com/asaskevich/govalidator/doc.go b/vendor/github.com/asaskevich/govalidator/doc.go deleted file mode 100644 index 55dce62dc8..0000000000 --- a/vendor/github.com/asaskevich/govalidator/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -package govalidator - -// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go deleted file mode 100644 index 1da2336f47..0000000000 --- a/vendor/github.com/asaskevich/govalidator/error.go +++ /dev/null @@ -1,47 +0,0 @@ -package govalidator - -import ( - "sort" - "strings" -) - -// Errors is an array of multiple errors and conforms to the error interface. -type Errors []error - -// Errors returns itself. -func (es Errors) Errors() []error { - return es -} - -func (es Errors) Error() string { - var errs []string - for _, e := range es { - errs = append(errs, e.Error()) - } - sort.Strings(errs) - return strings.Join(errs, ";") -} - -// Error encapsulates a name, an error and whether there's a custom error message or not. -type Error struct { - Name string - Err error - CustomErrorMessageExists bool - - // Validator indicates the name of the validator that failed - Validator string - Path []string -} - -func (e Error) Error() string { - if e.CustomErrorMessageExists { - return e.Err.Error() - } - - errName := e.Name - if len(e.Path) > 0 { - errName = strings.Join(append(e.Path, e.Name), ".") - } - - return errName + ": " + e.Err.Error() -} diff --git a/vendor/github.com/asaskevich/govalidator/numerics.go b/vendor/github.com/asaskevich/govalidator/numerics.go deleted file mode 100644 index 5041d9e868..0000000000 --- a/vendor/github.com/asaskevich/govalidator/numerics.go +++ /dev/null @@ -1,100 +0,0 @@ -package govalidator - -import ( - "math" -) - -// Abs returns absolute value of number -func Abs(value float64) float64 { - return math.Abs(value) -} - -// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise -func Sign(value float64) float64 { - if value > 0 { - return 1 - } else if value < 0 { - return -1 - } else { - return 0 - } -} - -// IsNegative returns true if value < 0 -func IsNegative(value float64) bool { - return value < 0 -} - -// IsPositive returns true if value > 0 -func IsPositive(value float64) bool { - return value > 0 -} - -// IsNonNegative returns true if value >= 0 -func IsNonNegative(value float64) bool { - return value >= 0 -} - -// IsNonPositive returns true if value <= 0 -func IsNonPositive(value float64) bool { - return value <= 0 -} - -// InRangeInt returns true if value lies between left and right border -func InRangeInt(value, left, right interface{}) bool { - value64, _ := ToInt(value) - left64, _ := ToInt(left) - right64, _ := ToInt(right) - if left64 > right64 { - left64, right64 = right64, left64 - } - return value64 >= left64 && value64 <= right64 -} - -// InRangeFloat32 returns true if value lies between left and right border -func InRangeFloat32(value, left, right float32) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRangeFloat64 returns true if value lies between left and right border -func InRangeFloat64(value, left, right float64) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRange returns true if value lies between left and right border, generic type to handle int, float32, float64 and string. -// All types must the same type. -// False if value doesn't lie in range or if it incompatible or not comparable -func InRange(value interface{}, left interface{}, right interface{}) bool { - switch value.(type) { - case int: - intValue, _ := ToInt(value) - intLeft, _ := ToInt(left) - intRight, _ := ToInt(right) - return InRangeInt(intValue, intLeft, intRight) - case float32, float64: - intValue, _ := ToFloat(value) - intLeft, _ := ToFloat(left) - intRight, _ := ToFloat(right) - return InRangeFloat64(intValue, intLeft, intRight) - case string: - return value.(string) >= left.(string) && value.(string) <= right.(string) - default: - return false - } -} - -// IsWhole returns true if value is whole number -func IsWhole(value float64) bool { - return math.Remainder(value, 1) == 0 -} - -// IsNatural returns true if value is natural number (positive and whole) -func IsNatural(value float64) bool { - return IsWhole(value) && IsPositive(value) -} diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go deleted file mode 100644 index bafc3765ea..0000000000 --- a/vendor/github.com/asaskevich/govalidator/patterns.go +++ /dev/null @@ -1,113 +0,0 @@ -package govalidator - -import "regexp" - -// Basic regular expressions for validating strings -const ( - Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" - CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" - ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" - ISBN13 string = "^(?:[0-9]{13})$" - UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" - UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" - Alpha string = "^[a-zA-Z]+$" - Alphanumeric string = "^[a-zA-Z0-9]+$" - Numeric string = "^[0-9]+$" - Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" - Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" - Hexadecimal string = "^[0-9a-fA-F]+$" - Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" - ASCII string = "^[\x00-\x7F]+$" - Multibyte string = "[^\x00-\x7F]" - FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" - PrintableASCII string = "^[\x20-\x7E]+$" - DataURI string = "^data:.+\\/(.+);base64$" - MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" - Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" - Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" - DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` - IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` - URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` - URLUsername string = `(\S+(:\S*)?@)` - URLPath string = `((\/|\?|#)[^\s]*)` - URLPort string = `(:(\d{1,5}))` - URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` - URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` - URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` - SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` - WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixPath string = `^(/[^/\x00]*)+/?$` - WinARPath string = `^(?:(?:[a-zA-Z]:|\\\\[a-z0-9_.$●-]+\\[a-z0-9_.$●-]+)\\|\\?[^\\/:*?"<>|\r\n]+\\?)(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixARPath string = `^((\.{0,2}/)?([^/\x00]*))+/?$` - Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" - tagName string = "valid" - hasLowerCase string = ".*[[:lower:]]" - hasUpperCase string = ".*[[:upper:]]" - hasWhitespace string = ".*[[:space:]]" - hasWhitespaceOnly string = "^[[:space:]]+$" - IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$" - IMSI string = "^\\d{14,15}$" - E164 string = `^\+?[1-9]\d{1,14}$` -) - -// Used by IsFilePath func -const ( - // Unknown is unresolved OS type - Unknown = iota - // Win is Windows type - Win - // Unix is *nix OS types - Unix -) - -var ( - userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") - hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") - userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") - rxEmail = regexp.MustCompile(Email) - rxCreditCard = regexp.MustCompile(CreditCard) - rxISBN10 = regexp.MustCompile(ISBN10) - rxISBN13 = regexp.MustCompile(ISBN13) - rxUUID3 = regexp.MustCompile(UUID3) - rxUUID4 = regexp.MustCompile(UUID4) - rxUUID5 = regexp.MustCompile(UUID5) - rxUUID = regexp.MustCompile(UUID) - rxAlpha = regexp.MustCompile(Alpha) - rxAlphanumeric = regexp.MustCompile(Alphanumeric) - rxNumeric = regexp.MustCompile(Numeric) - rxInt = regexp.MustCompile(Int) - rxFloat = regexp.MustCompile(Float) - rxHexadecimal = regexp.MustCompile(Hexadecimal) - rxHexcolor = regexp.MustCompile(Hexcolor) - rxRGBcolor = regexp.MustCompile(RGBcolor) - rxASCII = regexp.MustCompile(ASCII) - rxPrintableASCII = regexp.MustCompile(PrintableASCII) - rxMultibyte = regexp.MustCompile(Multibyte) - rxFullWidth = regexp.MustCompile(FullWidth) - rxHalfWidth = regexp.MustCompile(HalfWidth) - rxBase64 = regexp.MustCompile(Base64) - rxDataURI = regexp.MustCompile(DataURI) - rxMagnetURI = regexp.MustCompile(MagnetURI) - rxLatitude = regexp.MustCompile(Latitude) - rxLongitude = regexp.MustCompile(Longitude) - rxDNSName = regexp.MustCompile(DNSName) - rxURL = regexp.MustCompile(URL) - rxSSN = regexp.MustCompile(SSN) - rxWinPath = regexp.MustCompile(WinPath) - rxUnixPath = regexp.MustCompile(UnixPath) - rxARWinPath = regexp.MustCompile(WinARPath) - rxARUnixPath = regexp.MustCompile(UnixARPath) - rxSemver = regexp.MustCompile(Semver) - rxHasLowerCase = regexp.MustCompile(hasLowerCase) - rxHasUpperCase = regexp.MustCompile(hasUpperCase) - rxHasWhitespace = regexp.MustCompile(hasWhitespace) - rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) - rxIMEI = regexp.MustCompile(IMEI) - rxIMSI = regexp.MustCompile(IMSI) - rxE164 = regexp.MustCompile(E164) -) diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go deleted file mode 100644 index c573abb51a..0000000000 --- a/vendor/github.com/asaskevich/govalidator/types.go +++ /dev/null @@ -1,656 +0,0 @@ -package govalidator - -import ( - "reflect" - "regexp" - "sort" - "sync" -) - -// Validator is a wrapper for a validator function that returns bool and accepts string. -type Validator func(str string) bool - -// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. -// The second parameter should be the context (in the case of validating a struct: the whole object being validated). -type CustomTypeValidator func(i interface{}, o interface{}) bool - -// ParamValidator is a wrapper for validator functions that accept additional parameters. -type ParamValidator func(str string, params ...string) bool - -// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value -type InterfaceParamValidator func(in interface{}, params ...string) bool -type tagOptionsMap map[string]tagOption - -func (t tagOptionsMap) orderedKeys() []string { - var keys []string - for k := range t { - keys = append(keys, k) - } - - sort.Slice(keys, func(a, b int) bool { - return t[keys[a]].order < t[keys[b]].order - }) - - return keys -} - -type tagOption struct { - name string - customErrorMessage string - order int -} - -// UnsupportedTypeError is a wrapper for reflect.Type -type UnsupportedTypeError struct { - Type reflect.Type -} - -// stringValues is a slice of reflect.Value holding *reflect.StringValue. -// It implements the methods to sort by string. -type stringValues []reflect.Value - -// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value -var InterfaceParamTagMap = map[string]InterfaceParamValidator{ - "type": IsType, -} - -// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. -var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ - "type": regexp.MustCompile(`^type\((.*)\)$`), -} - -// ParamTagMap is a map of functions accept variants parameters -var ParamTagMap = map[string]ParamValidator{ - "length": ByteLength, - "range": Range, - "runelength": RuneLength, - "stringlength": StringLength, - "matches": StringMatches, - "in": IsInRaw, - "rsapub": IsRsaPub, - "minstringlength": MinStringLength, - "maxstringlength": MaxStringLength, -} - -// ParamTagRegexMap maps param tags to their respective regexes. -var ParamTagRegexMap = map[string]*regexp.Regexp{ - "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"), - "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"), - "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"), - "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"), - "in": regexp.MustCompile(`^in\((.*)\)`), - "matches": regexp.MustCompile(`^matches\((.+)\)$`), - "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), - "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), - "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), -} - -type customTypeTagMap struct { - validators map[string]CustomTypeValidator - - sync.RWMutex -} - -func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) { - tm.RLock() - defer tm.RUnlock() - v, ok := tm.validators[name] - return v, ok -} - -func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) { - tm.Lock() - defer tm.Unlock() - tm.validators[name] = ctv -} - -// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. -// Use this to validate compound or custom types that need to be handled as a whole, e.g. -// `type UUID [16]byte` (this would be handled as an array of bytes). -var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)} - -// TagMap is a map of functions, that can be used as tags for ValidateStruct function. -var TagMap = map[string]Validator{ - "email": IsEmail, - "url": IsURL, - "dialstring": IsDialString, - "requrl": IsRequestURL, - "requri": IsRequestURI, - "alpha": IsAlpha, - "utfletter": IsUTFLetter, - "alphanum": IsAlphanumeric, - "utfletternum": IsUTFLetterNumeric, - "numeric": IsNumeric, - "utfnumeric": IsUTFNumeric, - "utfdigit": IsUTFDigit, - "hexadecimal": IsHexadecimal, - "hexcolor": IsHexcolor, - "rgbcolor": IsRGBcolor, - "lowercase": IsLowerCase, - "uppercase": IsUpperCase, - "int": IsInt, - "float": IsFloat, - "null": IsNull, - "notnull": IsNotNull, - "uuid": IsUUID, - "uuidv3": IsUUIDv3, - "uuidv4": IsUUIDv4, - "uuidv5": IsUUIDv5, - "creditcard": IsCreditCard, - "isbn10": IsISBN10, - "isbn13": IsISBN13, - "json": IsJSON, - "multibyte": IsMultibyte, - "ascii": IsASCII, - "printableascii": IsPrintableASCII, - "fullwidth": IsFullWidth, - "halfwidth": IsHalfWidth, - "variablewidth": IsVariableWidth, - "base64": IsBase64, - "datauri": IsDataURI, - "ip": IsIP, - "port": IsPort, - "ipv4": IsIPv4, - "ipv6": IsIPv6, - "dns": IsDNSName, - "host": IsHost, - "mac": IsMAC, - "latitude": IsLatitude, - "longitude": IsLongitude, - "ssn": IsSSN, - "semver": IsSemver, - "rfc3339": IsRFC3339, - "rfc3339WithoutZone": IsRFC3339WithoutZone, - "ISO3166Alpha2": IsISO3166Alpha2, - "ISO3166Alpha3": IsISO3166Alpha3, - "ISO4217": IsISO4217, - "IMEI": IsIMEI, - "ulid": IsULID, -} - -// ISO3166Entry stores country codes -type ISO3166Entry struct { - EnglishShortName string - FrenchShortName string - Alpha2Code string - Alpha3Code string - Numeric string -} - -//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" -var ISO3166List = []ISO3166Entry{ - {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, - {"Albania", "Albanie (l')", "AL", "ALB", "008"}, - {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"}, - {"Algeria", "Algérie (l')", "DZ", "DZA", "012"}, - {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"}, - {"Andorra", "Andorre (l')", "AD", "AND", "020"}, - {"Angola", "Angola (l')", "AO", "AGO", "024"}, - {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"}, - {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"}, - {"Argentina", "Argentine (l')", "AR", "ARG", "032"}, - {"Australia", "Australie (l')", "AU", "AUS", "036"}, - {"Austria", "Autriche (l')", "AT", "AUT", "040"}, - {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"}, - {"Bahrain", "Bahreïn", "BH", "BHR", "048"}, - {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"}, - {"Armenia", "Arménie (l')", "AM", "ARM", "051"}, - {"Barbados", "Barbade (la)", "BB", "BRB", "052"}, - {"Belgium", "Belgique (la)", "BE", "BEL", "056"}, - {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"}, - {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"}, - {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"}, - {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"}, - {"Botswana", "Botswana (le)", "BW", "BWA", "072"}, - {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"}, - {"Brazil", "Brésil (le)", "BR", "BRA", "076"}, - {"Belize", "Belize (le)", "BZ", "BLZ", "084"}, - {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"}, - {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"}, - {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"}, - {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"}, - {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"}, - {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"}, - {"Burundi", "Burundi (le)", "BI", "BDI", "108"}, - {"Belarus", "Bélarus (le)", "BY", "BLR", "112"}, - {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"}, - {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"}, - {"Canada", "Canada (le)", "CA", "CAN", "124"}, - {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"}, - {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"}, - {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"}, - {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"}, - {"Chad", "Tchad (le)", "TD", "TCD", "148"}, - {"Chile", "Chili (le)", "CL", "CHL", "152"}, - {"China", "Chine (la)", "CN", "CHN", "156"}, - {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"}, - {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"}, - {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"}, - {"Colombia", "Colombie (la)", "CO", "COL", "170"}, - {"Comoros (the)", "Comores (les)", "KM", "COM", "174"}, - {"Mayotte", "Mayotte", "YT", "MYT", "175"}, - {"Congo (the)", "Congo (le)", "CG", "COG", "178"}, - {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"}, - {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"}, - {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"}, - {"Croatia", "Croatie (la)", "HR", "HRV", "191"}, - {"Cuba", "Cuba", "CU", "CUB", "192"}, - {"Cyprus", "Chypre", "CY", "CYP", "196"}, - {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"}, - {"Benin", "Bénin (le)", "BJ", "BEN", "204"}, - {"Denmark", "Danemark (le)", "DK", "DNK", "208"}, - {"Dominica", "Dominique (la)", "DM", "DMA", "212"}, - {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"}, - {"Ecuador", "Équateur (l')", "EC", "ECU", "218"}, - {"El Salvador", "El Salvador", "SV", "SLV", "222"}, - {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"}, - {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"}, - {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"}, - {"Estonia", "Estonie (l')", "EE", "EST", "233"}, - {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"}, - {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"}, - {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"}, - {"Fiji", "Fidji (les)", "FJ", "FJI", "242"}, - {"Finland", "Finlande (la)", "FI", "FIN", "246"}, - {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"}, - {"France", "France (la)", "FR", "FRA", "250"}, - {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"}, - {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"}, - {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"}, - {"Djibouti", "Djibouti", "DJ", "DJI", "262"}, - {"Gabon", "Gabon (le)", "GA", "GAB", "266"}, - {"Georgia", "Géorgie (la)", "GE", "GEO", "268"}, - {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"}, - {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"}, - {"Germany", "Allemagne (l')", "DE", "DEU", "276"}, - {"Ghana", "Ghana (le)", "GH", "GHA", "288"}, - {"Gibraltar", "Gibraltar", "GI", "GIB", "292"}, - {"Kiribati", "Kiribati", "KI", "KIR", "296"}, - {"Greece", "Grèce (la)", "GR", "GRC", "300"}, - {"Greenland", "Groenland (le)", "GL", "GRL", "304"}, - {"Grenada", "Grenade (la)", "GD", "GRD", "308"}, - {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"}, - {"Guam", "Guam", "GU", "GUM", "316"}, - {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"}, - {"Guinea", "Guinée (la)", "GN", "GIN", "324"}, - {"Guyana", "Guyana (le)", "GY", "GUY", "328"}, - {"Haiti", "Haïti", "HT", "HTI", "332"}, - {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"}, - {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"}, - {"Honduras", "Honduras (le)", "HN", "HND", "340"}, - {"Hong Kong", "Hong Kong", "HK", "HKG", "344"}, - {"Hungary", "Hongrie (la)", "HU", "HUN", "348"}, - {"Iceland", "Islande (l')", "IS", "ISL", "352"}, - {"India", "Inde (l')", "IN", "IND", "356"}, - {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"}, - {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"}, - {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"}, - {"Ireland", "Irlande (l')", "IE", "IRL", "372"}, - {"Israel", "Israël", "IL", "ISR", "376"}, - {"Italy", "Italie (l')", "IT", "ITA", "380"}, - {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"}, - {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"}, - {"Japan", "Japon (le)", "JP", "JPN", "392"}, - {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"}, - {"Jordan", "Jordanie (la)", "JO", "JOR", "400"}, - {"Kenya", "Kenya (le)", "KE", "KEN", "404"}, - {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"}, - {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"}, - {"Kuwait", "Koweït (le)", "KW", "KWT", "414"}, - {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"}, - {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"}, - {"Lebanon", "Liban (le)", "LB", "LBN", "422"}, - {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"}, - {"Latvia", "Lettonie (la)", "LV", "LVA", "428"}, - {"Liberia", "Libéria (le)", "LR", "LBR", "430"}, - {"Libya", "Libye (la)", "LY", "LBY", "434"}, - {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"}, - {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"}, - {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"}, - {"Macao", "Macao", "MO", "MAC", "446"}, - {"Madagascar", "Madagascar", "MG", "MDG", "450"}, - {"Malawi", "Malawi (le)", "MW", "MWI", "454"}, - {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"}, - {"Maldives", "Maldives (les)", "MV", "MDV", "462"}, - {"Mali", "Mali (le)", "ML", "MLI", "466"}, - {"Malta", "Malte", "MT", "MLT", "470"}, - {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"}, - {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"}, - {"Mauritius", "Maurice", "MU", "MUS", "480"}, - {"Mexico", "Mexique (le)", "MX", "MEX", "484"}, - {"Monaco", "Monaco", "MC", "MCO", "492"}, - {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"}, - {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"}, - {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"}, - {"Montserrat", "Montserrat", "MS", "MSR", "500"}, - {"Morocco", "Maroc (le)", "MA", "MAR", "504"}, - {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"}, - {"Oman", "Oman", "OM", "OMN", "512"}, - {"Namibia", "Namibie (la)", "NA", "NAM", "516"}, - {"Nauru", "Nauru", "NR", "NRU", "520"}, - {"Nepal", "Népal (le)", "NP", "NPL", "524"}, - {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"}, - {"Curaçao", "Curaçao", "CW", "CUW", "531"}, - {"Aruba", "Aruba", "AW", "ABW", "533"}, - {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"}, - {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"}, - {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"}, - {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"}, - {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"}, - {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"}, - {"Niger (the)", "Niger (le)", "NE", "NER", "562"}, - {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"}, - {"Niue", "Niue", "NU", "NIU", "570"}, - {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"}, - {"Norway", "Norvège (la)", "NO", "NOR", "578"}, - {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"}, - {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"}, - {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"}, - {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"}, - {"Palau", "Palaos (les)", "PW", "PLW", "585"}, - {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"}, - {"Panama", "Panama (le)", "PA", "PAN", "591"}, - {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"}, - {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"}, - {"Peru", "Pérou (le)", "PE", "PER", "604"}, - {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"}, - {"Pitcairn", "Pitcairn", "PN", "PCN", "612"}, - {"Poland", "Pologne (la)", "PL", "POL", "616"}, - {"Portugal", "Portugal (le)", "PT", "PRT", "620"}, - {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"}, - {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"}, - {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"}, - {"Qatar", "Qatar (le)", "QA", "QAT", "634"}, - {"Réunion", "Réunion (La)", "RE", "REU", "638"}, - {"Romania", "Roumanie (la)", "RO", "ROU", "642"}, - {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"}, - {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"}, - {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"}, - {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"}, - {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"}, - {"Anguilla", "Anguilla", "AI", "AIA", "660"}, - {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"}, - {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"}, - {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"}, - {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"}, - {"San Marino", "Saint-Marin", "SM", "SMR", "674"}, - {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"}, - {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"}, - {"Senegal", "Sénégal (le)", "SN", "SEN", "686"}, - {"Serbia", "Serbie (la)", "RS", "SRB", "688"}, - {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"}, - {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"}, - {"Singapore", "Singapour", "SG", "SGP", "702"}, - {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"}, - {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"}, - {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"}, - {"Somalia", "Somalie (la)", "SO", "SOM", "706"}, - {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"}, - {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"}, - {"Spain", "Espagne (l')", "ES", "ESP", "724"}, - {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"}, - {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"}, - {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"}, - {"Suriname", "Suriname (le)", "SR", "SUR", "740"}, - {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"}, - {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"}, - {"Sweden", "Suède (la)", "SE", "SWE", "752"}, - {"Switzerland", "Suisse (la)", "CH", "CHE", "756"}, - {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"}, - {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"}, - {"Thailand", "Thaïlande (la)", "TH", "THA", "764"}, - {"Togo", "Togo (le)", "TG", "TGO", "768"}, - {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"}, - {"Tonga", "Tonga (les)", "TO", "TON", "776"}, - {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"}, - {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"}, - {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"}, - {"Turkey", "Turquie (la)", "TR", "TUR", "792"}, - {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"}, - {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"}, - {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"}, - {"Uganda", "Ouganda (l')", "UG", "UGA", "800"}, - {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"}, - {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"}, - {"Egypt", "Égypte (l')", "EG", "EGY", "818"}, - {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"}, - {"Guernsey", "Guernesey", "GG", "GGY", "831"}, - {"Jersey", "Jersey", "JE", "JEY", "832"}, - {"Isle of Man", "Île de Man", "IM", "IMN", "833"}, - {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"}, - {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"}, - {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"}, - {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"}, - {"Uruguay", "Uruguay (l')", "UY", "URY", "858"}, - {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"}, - {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"}, - {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"}, - {"Samoa", "Samoa (le)", "WS", "WSM", "882"}, - {"Yemen", "Yémen (le)", "YE", "YEM", "887"}, - {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"}, -} - -// ISO4217List is the list of ISO currency codes -var ISO4217List = []string{ - "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", - "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", - "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", - "DJF", "DKK", "DOP", "DZD", - "EGP", "ERN", "ETB", "EUR", - "FJD", "FKP", - "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", - "HKD", "HNL", "HRK", "HTG", "HUF", - "IDR", "ILS", "INR", "IQD", "IRR", "ISK", - "JMD", "JOD", "JPY", - "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", - "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", - "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", - "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", - "OMR", - "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", - "QAR", - "RON", "RSD", "RUB", "RWF", - "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL", - "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", - "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", - "VEF", "VES", "VND", "VUV", - "WST", - "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", - "YER", - "ZAR", "ZMW", "ZWL", -} - -// ISO693Entry stores ISO language codes -type ISO693Entry struct { - Alpha3bCode string - Alpha2Code string - English string -} - -//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json -var ISO693List = []ISO693Entry{ - {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, - {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, - {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"}, - {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"}, - {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"}, - {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"}, - {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"}, - {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"}, - {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"}, - {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"}, - {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"}, - {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"}, - {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"}, - {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"}, - {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"}, - {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"}, - {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"}, - {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"}, - {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"}, - {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"}, - {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"}, - {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"}, - {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"}, - {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"}, - {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"}, - {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"}, - {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"}, - {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"}, - {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"}, - {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"}, - {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"}, - {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"}, - {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"}, - {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"}, - {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"}, - {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"}, - {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"}, - {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"}, - {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"}, - {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"}, - {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"}, - {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"}, - {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"}, - {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"}, - {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"}, - {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"}, - {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"}, - {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"}, - {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"}, - {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"}, - {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"}, - {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"}, - {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"}, - {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"}, - {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"}, - {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"}, - {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"}, - {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"}, - {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"}, - {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"}, - {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"}, - {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"}, - {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"}, - {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"}, - {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"}, - {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"}, - {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"}, - {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"}, - {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"}, - {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"}, - {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"}, - {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"}, - {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"}, - {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"}, - {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"}, - {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"}, - {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"}, - {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"}, - {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"}, - {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"}, - {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"}, - {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"}, - {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"}, - {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"}, - {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"}, - {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"}, - {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"}, - {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"}, - {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"}, - {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"}, - {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"}, - {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"}, - {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"}, - {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"}, - {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"}, - {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"}, - {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"}, - {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"}, - {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"}, - {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"}, - {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"}, - {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"}, - {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"}, - {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"}, - {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"}, - {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"}, - {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"}, - {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"}, - {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"}, - {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"}, - {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"}, - {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"}, - {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"}, - {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"}, - {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"}, - {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"}, - {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"}, - {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"}, - {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"}, - {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"}, - {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"}, - {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"}, - {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"}, - {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"}, - {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"}, - {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"}, - {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"}, - {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"}, - {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"}, - {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"}, - {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"}, - {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"}, - {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"}, - {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"}, - {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"}, - {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"}, - {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"}, - {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"}, - {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"}, - {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"}, - {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"}, - {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"}, - {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"}, - {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"}, - {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"}, - {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"}, - {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"}, - {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"}, - {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"}, - {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"}, - {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"}, - {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"}, - {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"}, - {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"}, - {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"}, - {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"}, - {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"}, - {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"}, - {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"}, - {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"}, - {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"}, - {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"}, - {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"}, - {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"}, - {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"}, - {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"}, - {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"}, - {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"}, - {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"}, - {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"}, - {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"}, - {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"}, - {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"}, - {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"}, - {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"}, - {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"}, - {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"}, - {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"}, - {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"}, - {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"}, - {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"}, - {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"}, - {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"}, - {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"}, -} diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go deleted file mode 100644 index f4c30f824a..0000000000 --- a/vendor/github.com/asaskevich/govalidator/utils.go +++ /dev/null @@ -1,270 +0,0 @@ -package govalidator - -import ( - "errors" - "fmt" - "html" - "math" - "path" - "regexp" - "strings" - "unicode" - "unicode/utf8" -) - -// Contains checks if the string contains the substring. -func Contains(str, substring string) bool { - return strings.Contains(str, substring) -} - -// Matches checks if string matches the pattern (pattern is regular expression) -// In case of error return false -func Matches(str, pattern string) bool { - match, _ := regexp.MatchString(pattern, str) - return match -} - -// LeftTrim trims characters from the left side of the input. -// If second argument is empty, it will remove leading spaces. -func LeftTrim(str, chars string) string { - if chars == "" { - return strings.TrimLeftFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("^[" + chars + "]+") - return r.ReplaceAllString(str, "") -} - -// RightTrim trims characters from the right side of the input. -// If second argument is empty, it will remove trailing spaces. -func RightTrim(str, chars string) string { - if chars == "" { - return strings.TrimRightFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("[" + chars + "]+$") - return r.ReplaceAllString(str, "") -} - -// Trim trims characters from both sides of the input. -// If second argument is empty, it will remove spaces. -func Trim(str, chars string) string { - return LeftTrim(RightTrim(str, chars), chars) -} - -// WhiteList removes characters that do not appear in the whitelist. -func WhiteList(str, chars string) string { - pattern := "[^" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// BlackList removes characters that appear in the blacklist. -func BlackList(str, chars string) string { - pattern := "[" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. -// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). -func StripLow(str string, keepNewLines bool) string { - chars := "" - if keepNewLines { - chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F" - } else { - chars = "\x00-\x1F\x7F" - } - return BlackList(str, chars) -} - -// ReplacePattern replaces regular expression pattern in string -func ReplacePattern(str, pattern, replace string) string { - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, replace) -} - -// Escape replaces <, >, & and " with HTML entities. -var Escape = html.EscapeString - -func addSegment(inrune, segment []rune) []rune { - if len(segment) == 0 { - return inrune - } - if len(inrune) != 0 { - inrune = append(inrune, '_') - } - inrune = append(inrune, segment...) - return inrune -} - -// UnderscoreToCamelCase converts from underscore separated form to camel case form. -// Ex.: my_func => MyFunc -func UnderscoreToCamelCase(s string) string { - return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1) -} - -// CamelCaseToUnderscore converts from camel case form to underscore separated form. -// Ex.: MyFunc => my_func -func CamelCaseToUnderscore(str string) string { - var output []rune - var segment []rune - for _, r := range str { - - // not treat number as separate segment - if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) { - output = addSegment(output, segment) - segment = nil - } - segment = append(segment, unicode.ToLower(r)) - } - output = addSegment(output, segment) - return string(output) -} - -// Reverse returns reversed string -func Reverse(s string) string { - r := []rune(s) - for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r) -} - -// GetLines splits string by "\n" and return array of lines -func GetLines(s string) []string { - return strings.Split(s, "\n") -} - -// GetLine returns specified line of multiline string -func GetLine(s string, index int) (string, error) { - lines := GetLines(s) - if index < 0 || index >= len(lines) { - return "", errors.New("line index out of bounds") - } - return lines[index], nil -} - -// RemoveTags removes all tags from HTML string -func RemoveTags(s string) string { - return ReplacePattern(s, "<[^>]*>", "") -} - -// SafeFileName returns safe string that can be used in file names -func SafeFileName(str string) string { - name := strings.ToLower(str) - name = path.Clean(path.Base(name)) - name = strings.Trim(name, " ") - separators, err := regexp.Compile(`[ &_=+:]`) - if err == nil { - name = separators.ReplaceAllString(name, "-") - } - legal, err := regexp.Compile(`[^[:alnum:]-.]`) - if err == nil { - name = legal.ReplaceAllString(name, "") - } - for strings.Contains(name, "--") { - name = strings.Replace(name, "--", "-", -1) - } - return name -} - -// NormalizeEmail canonicalize an email address. -// The local part of the email address is lowercased for all domains; the hostname is always lowercased and -// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). -// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and -// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are -// normalized to @gmail.com. -func NormalizeEmail(str string) (string, error) { - if !IsEmail(str) { - return "", fmt.Errorf("%s is not an email", str) - } - parts := strings.Split(str, "@") - parts[0] = strings.ToLower(parts[0]) - parts[1] = strings.ToLower(parts[1]) - if parts[1] == "gmail.com" || parts[1] == "googlemail.com" { - parts[1] = "gmail.com" - parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0] - } - return strings.Join(parts, "@"), nil -} - -// Truncate a string to the closest length without breaking words. -func Truncate(str string, length int, ending string) string { - var aftstr, befstr string - if len(str) > length { - words := strings.Fields(str) - before, present := 0, 0 - for i := range words { - befstr = aftstr - before = present - aftstr = aftstr + words[i] + " " - present = len(aftstr) - if present > length && i != 0 { - if (length - before) < (present - length) { - return Trim(befstr, " /\\.,\"'#!?&@+-") + ending - } - return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending - } - } - } - - return str -} - -// PadLeft pads left side of a string if size of string is less then indicated pad length -func PadLeft(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, false) -} - -// PadRight pads right side of a string if size of string is less then indicated pad length -func PadRight(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, false, true) -} - -// PadBoth pads both sides of a string if size of string is less then indicated pad length -func PadBoth(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, true) -} - -// PadString either left, right or both sides. -// Note that padding string can be unicode and more then one character -func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { - - // When padded length is less then the current string size - if padLen < utf8.RuneCountInString(str) { - return str - } - - padLen -= utf8.RuneCountInString(str) - - targetLen := padLen - - targetLenLeft := targetLen - targetLenRight := targetLen - if padLeft && padRight { - targetLenLeft = padLen / 2 - targetLenRight = padLen - targetLenLeft - } - - strToRepeatLen := utf8.RuneCountInString(padStr) - - repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen))) - repeatedString := strings.Repeat(padStr, repeatTimes) - - leftSide := "" - if padLeft { - leftSide = repeatedString[0:targetLenLeft] - } - - rightSide := "" - if padRight { - rightSide = repeatedString[0:targetLenRight] - } - - return leftSide + str + rightSide -} - -// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object -func TruncatingErrorf(str string, args ...interface{}) error { - n := strings.Count(str, "%s") - return fmt.Errorf(str, args[:n]...) -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/.gitignore b/vendor/github.com/asaskevich/govalidator/v11/.gitignore deleted file mode 100644 index 8d69a9418a..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -bin/ -.idea/ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - diff --git a/vendor/github.com/asaskevich/govalidator/v11/.travis.yml b/vendor/github.com/asaskevich/govalidator/v11/.travis.yml deleted file mode 100644 index bb83c6670d..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -dist: xenial -go: - - '1.10' - - '1.11' - - '1.12' - - '1.13' - - 'tip' - -script: - - go test -coverpkg=./... -coverprofile=coverage.info -timeout=5s - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md b/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md deleted file mode 100644 index 4b462b0d81..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor Code of Conduct - -This project adheres to [The Code Manifesto](http://codemanifesto.com) -as its guidelines for contributor interactions. - -## The Code Manifesto - -We want to work in an ecosystem that empowers developers to reach their -potential — one that encourages growth and effective collaboration. A space -that is safe for all. - -A space such as this benefits everyone that participates in it. It encourages -new developers to enter our field. It is through discussion and collaboration -that we grow, and through growth that we improve. - -In the effort to create such a place, we hold to these values: - -1. **Discrimination limits us.** This includes discrimination on the basis of - race, gender, sexual orientation, gender identity, age, nationality, - technology and any other arbitrary exclusion of a group of people. -2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort - levels. Remember that, and if brought to your attention, heed it. -3. **We are our biggest assets.** None of us were born masters of our trade. - Each of us has been helped along the way. Return that favor, when and where - you can. -4. **We are resources for the future.** As an extension of #3, share what you - know. Make yourself a resource to help those that come after you. -5. **Respect defines us.** Treat others as you wish to be treated. Make your - discussions, criticisms and debates from a position of respectfulness. Ask - yourself, is it true? Is it necessary? Is it constructive? Anything less is - unacceptable. -6. **Reactions require grace.** Angry responses are valid, but abusive language - and vindictive actions are toxic. When something happens that offends you, - handle it assertively, but be respectful. Escalate reasonably, and try to - allow the offender an opportunity to explain themselves, and possibly - correct the issue. -7. **Opinions are just that: opinions.** Each and every one of us, due to our - background and upbringing, have varying opinions. That is perfectly - acceptable. Remember this: if you respect your own opinions, you should - respect the opinions of others. -8. **To err is human.** You might not intend it, but mistakes do happen and - contribute to build experience. Tolerate honest mistakes, and don't - hesitate to apologize if you make one yourself. diff --git a/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md deleted file mode 100644 index 7ed268a1ed..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md +++ /dev/null @@ -1,63 +0,0 @@ -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Financial contributions - -We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator). -Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. - - -## Credits - - -### Contributors - -Thank you to all the people who have already contributed to govalidator! - - - -### Backers - -Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor)) - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/v11/LICENSE b/vendor/github.com/asaskevich/govalidator/v11/LICENSE deleted file mode 100644 index cacba91024..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2020 Alex Saskevich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/v11/README.md b/vendor/github.com/asaskevich/govalidator/v11/README.md deleted file mode 100644 index fa56e3c4c8..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/README.md +++ /dev/null @@ -1,624 +0,0 @@ -govalidator -=========== -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GoDoc](https://godoc.org/github.com/asaskevich/govalidator?status.png)](https://godoc.org/github.com/asaskevich/govalidator) -[![Build Status](https://travis-ci.org/asaskevich/govalidator.svg?branch=master)](https://travis-ci.org/asaskevich/govalidator) -[![Coverage](https://codecov.io/gh/asaskevich/govalidator/branch/master/graph/badge.svg)](https://codecov.io/gh/asaskevich/govalidator) [![Go Report Card](https://goreportcard.com/badge/github.com/asaskevich/govalidator)](https://goreportcard.com/report/github.com/asaskevich/govalidator) [![GoSearch](http://go-search.org/badge?id=github.com%2Fasaskevich%2Fgovalidator)](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [![Backers on Open Collective](https://opencollective.com/govalidator/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/govalidator/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield) - -A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js). - -#### Installation -Make sure that Go is installed on your computer. -Type the following command in your terminal: - - go get github.com/asaskevich/govalidator/v11 - -or you can get specified release of the package with `gopkg.in`: - - go get gopkg.in/asaskevich/govalidator.v10 - -After it the package is ready to use. - - -#### Import package in your project -Add following line in your `*.go` file: -```go -import "github.com/asaskevich/govalidator/v11" -``` -If you are unhappy to use long `govalidator`, you can do something like this: -```go -import ( - valid "github.com/asaskevich/govalidator/v11" -) -``` - -#### Activate behavior to require all fields have a validation tag by default -`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function. - -`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors. - -```go -import "github.com/asaskevich/govalidator/v11" - -func init() { - govalidator.SetFieldsRequiredByDefault(true) -} -``` - -Here's some code to explain it: -```go -// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -type exampleStruct struct { - Name string `` - Email string `valid:"email"` -} - -// this, however, will only fail when Email is empty or an invalid email address: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email"` -} - -// lastly, this will only fail when Email is an invalid email address but not when it's empty: -type exampleStruct2 struct { - Name string `valid:"-"` - Email string `valid:"email,optional"` -} -``` - -#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123)) -##### Custom validator function signature -A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible. -```go -import "github.com/asaskevich/govalidator/v11" - -// old signature -func(i interface{}) bool - -// new signature -func(i interface{}, o interface{}) bool -``` - -##### Adding a custom validator -This was changed to prevent data races when accessing custom validators. -```go -import "github.com/asaskevich/govalidator/v11" - -// before -govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool { - // ... -} - -// after -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool { - // ... -}) -``` - -#### List of functions: -```go -func Abs(value float64) float64 -func BlackList(str, chars string) string -func ByteLength(str string, params ...string) bool -func CamelCaseToUnderscore(str string) string -func Contains(str, substring string) bool -func Count(array []interface{}, iterator ConditionIterator) int -func Each(array []interface{}, iterator Iterator) -func ErrorByField(e error, field string) string -func ErrorsByField(e error) map[string]string -func Filter(array []interface{}, iterator ConditionIterator) []interface{} -func Find(array []interface{}, iterator ConditionIterator) interface{} -func GetLine(s string, index int) (string, error) -func GetLines(s string) []string -func HasLowerCase(str string) bool -func HasUpperCase(str string) bool -func HasWhitespace(str string) bool -func HasWhitespaceOnly(str string) bool -func InRange(value interface{}, left interface{}, right interface{}) bool -func InRangeFloat32(value, left, right float32) bool -func InRangeFloat64(value, left, right float64) bool -func InRangeInt(value, left, right interface{}) bool -func IsASCII(str string) bool -func IsAlpha(str string) bool -func IsAlphanumeric(str string) bool -func IsBase64(str string) bool -func IsByteLength(str string, min, max int) bool -func IsCIDR(str string) bool -func IsCRC32(str string) bool -func IsCRC32b(str string) bool -func IsCreditCard(str string) bool -func IsDNSName(str string) bool -func IsDataURI(str string) bool -func IsDialString(str string) bool -func IsDivisibleBy(str, num string) bool -func IsEmail(str string) bool -func IsExistingEmail(email string) bool -func IsFilePath(str string) (bool, int) -func IsFloat(str string) bool -func IsFullWidth(str string) bool -func IsHalfWidth(str string) bool -func IsHash(str string, algorithm string) bool -func IsHexadecimal(str string) bool -func IsHexcolor(str string) bool -func IsHost(str string) bool -func IsIP(str string) bool -func IsIPv4(str string) bool -func IsIPv6(str string) bool -func IsISBN(str string, version int) bool -func IsISBN10(str string) bool -func IsISBN13(str string) bool -func IsISO3166Alpha2(str string) bool -func IsISO3166Alpha3(str string) bool -func IsISO4217(str string) bool -func IsISO693Alpha2(str string) bool -func IsISO693Alpha3b(str string) bool -func IsIn(str string, params ...string) bool -func IsInRaw(str string, params ...string) bool -func IsInt(str string) bool -func IsJSON(str string) bool -func IsLatitude(str string) bool -func IsLongitude(str string) bool -func IsLowerCase(str string) bool -func IsMAC(str string) bool -func IsMD4(str string) bool -func IsMD5(str string) bool -func IsMagnetURI(str string) bool -func IsMongoID(str string) bool -func IsMultibyte(str string) bool -func IsNatural(value float64) bool -func IsNegative(value float64) bool -func IsNonNegative(value float64) bool -func IsNonPositive(value float64) bool -func IsNotNull(str string) bool -func IsNull(str string) bool -func IsNumeric(str string) bool -func IsPort(str string) bool -func IsPositive(value float64) bool -func IsPrintableASCII(str string) bool -func IsRFC3339(str string) bool -func IsRFC3339WithoutZone(str string) bool -func IsRGBcolor(str string) bool -func IsRegex(str string) bool -func IsRequestURI(rawurl string) bool -func IsRequestURL(rawurl string) bool -func IsRipeMD128(str string) bool -func IsRipeMD160(str string) bool -func IsRsaPub(str string, params ...string) bool -func IsRsaPublicKey(str string, keylen int) bool -func IsSHA1(str string) bool -func IsSHA256(str string) bool -func IsSHA384(str string) bool -func IsSHA512(str string) bool -func IsSSN(str string) bool -func IsSemver(str string) bool -func IsTiger128(str string) bool -func IsTiger160(str string) bool -func IsTiger192(str string) bool -func IsTime(str string, format string) bool -func IsType(v interface{}, params ...string) bool -func IsURL(str string) bool -func IsUTFDigit(str string) bool -func IsUTFLetter(str string) bool -func IsUTFLetterNumeric(str string) bool -func IsUTFNumeric(str string) bool -func IsUUID(str string) bool -func IsUUIDv3(str string) bool -func IsUUIDv4(str string) bool -func IsUUIDv5(str string) bool -func IsULID(str string) bool -func IsUnixTime(str string) bool -func IsUpperCase(str string) bool -func IsVariableWidth(str string) bool -func IsYYYYMMDD(str string) bool -func IsWhole(value float64) bool -func LeftTrim(str, chars string) string -func Map(array []interface{}, iterator ResultIterator) []interface{} -func Matches(str, pattern string) bool -func MaxStringLength(str string, params ...string) bool -func MinStringLength(str string, params ...string) bool -func NormalizeEmail(str string) (string, error) -func PadBoth(str string, padStr string, padLen int) string -func PadLeft(str string, padStr string, padLen int) string -func PadRight(str string, padStr string, padLen int) string -func PrependPathToErrors(err error, path string) error -func Range(str string, params ...string) bool -func RemoveTags(s string) string -func ReplacePattern(str, pattern, replace string) string -func Reverse(s string) string -func RightTrim(str, chars string) string -func RuneLength(str string, params ...string) bool -func SafeFileName(str string) string -func SetFieldsRequiredByDefault(value bool) -func SetNilPtrAllowedByRequired(value bool) -func Sign(value float64) float64 -func StringLength(str string, params ...string) bool -func StringMatches(s string, params ...string) bool -func StripLow(str string, keepNewLines bool) string -func ToBoolean(str string) (bool, error) -func ToFloat(str string) (float64, error) -func ToInt(value interface{}) (res int64, err error) -func ToJSON(obj interface{}) (string, error) -func ToString(obj interface{}) string -func Trim(str, chars string) string -func Truncate(str string, length int, ending string) string -func TruncatingErrorf(str string, args ...interface{}) error -func UnderscoreToCamelCase(s string) string -func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error) -func ValidateStruct(s interface{}) (bool, error) -func WhiteList(str, chars string) string -type ConditionIterator -type CustomTypeValidator -type Error -func (e Error) Error() string -type Errors -func (es Errors) Error() string -func (es Errors) Errors() []error -type ISO3166Entry -type ISO693Entry -type InterfaceParamValidator -type Iterator -type ParamValidator -type ResultIterator -type UnsupportedTypeError -func (e *UnsupportedTypeError) Error() string -type Validator -``` - -#### Examples -###### IsURL -```go -println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) -``` -###### IsType -```go -println(govalidator.IsType("Bob", "string")) -println(govalidator.IsType(1, "int")) -i := 1 -println(govalidator.IsType(&i, "*int")) -``` - -IsType can be used through the tag `type` which is essential for map validation: -```go -type User struct { - Name string `valid:"type(string)"` - Age int `valid:"type(int)"` - Meta interface{} `valid:"type(string)"` -} -result, err := govalidator.ValidateStruct(User{"Bob", 20, "meta"}) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ToString -```go -type User struct { - FirstName string - LastName string -} - -str := govalidator.ToString(&User{"John", "Juan"}) -println(str) -``` -###### Each, Map, Filter, Count for slices -Each iterates over the slice/array and calls Iterator for every item -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.Iterator = func(value interface{}, index int) { - println(value.(int)) -} -govalidator.Each(data, fn) -``` -```go -data := []interface{}{1, 2, 3, 4, 5} -var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} { - return value.(int) * 3 -} -_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15} -``` -```go -data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} -var fn govalidator.ConditionIterator = func(value interface{}, index int) bool { - return value.(int)%2 == 0 -} -_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10} -_ = govalidator.Count(data, fn) // result = 5 -``` -###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2) -If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this: -```go -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) -``` -For completely custom validators (interface-based), see below. - -Here is a list of available validators for struct fields (validator - used function): -```go -"email": IsEmail, -"url": IsURL, -"dialstring": IsDialString, -"requrl": IsRequestURL, -"requri": IsRequestURI, -"alpha": IsAlpha, -"utfletter": IsUTFLetter, -"alphanum": IsAlphanumeric, -"utfletternum": IsUTFLetterNumeric, -"numeric": IsNumeric, -"utfnumeric": IsUTFNumeric, -"utfdigit": IsUTFDigit, -"hexadecimal": IsHexadecimal, -"hexcolor": IsHexcolor, -"rgbcolor": IsRGBcolor, -"lowercase": IsLowerCase, -"uppercase": IsUpperCase, -"int": IsInt, -"float": IsFloat, -"null": IsNull, -"uuid": IsUUID, -"uuidv3": IsUUIDv3, -"uuidv4": IsUUIDv4, -"uuidv5": IsUUIDv5, -"creditcard": IsCreditCard, -"isbn10": IsISBN10, -"isbn13": IsISBN13, -"json": IsJSON, -"multibyte": IsMultibyte, -"ascii": IsASCII, -"printableascii": IsPrintableASCII, -"fullwidth": IsFullWidth, -"halfwidth": IsHalfWidth, -"variablewidth": IsVariableWidth, -"base64": IsBase64, -"datauri": IsDataURI, -"ip": IsIP, -"port": IsPort, -"ipv4": IsIPv4, -"ipv6": IsIPv6, -"dns": IsDNSName, -"host": IsHost, -"mac": IsMAC, -"latitude": IsLatitude, -"longitude": IsLongitude, -"ssn": IsSSN, -"semver": IsSemver, -"rfc3339": IsRFC3339, -"rfc3339WithoutZone": IsRFC3339WithoutZone, -"ISO3166Alpha2": IsISO3166Alpha2, -"ISO3166Alpha3": IsISO3166Alpha3, -"ulid": IsULID, -"yyyymmdd": IsYYYYMMDD, -``` -Validators with parameters - -```go -"range(min|max)": Range, -"length(min|max)": ByteLength, -"runelength(min|max)": RuneLength, -"stringlength(min|max)": StringLength, -"matches(pattern)": StringMatches, -"in(string1|string2|...|stringN)": IsIn, -"rsapub(keylength)" : IsRsaPub, -"minstringlength(int): MinStringLength, -"maxstringlength(int): MaxStringLength, -``` -Validators with parameters for any type - -```go -"type(type)": IsType, -``` - -And here is small example of usage: -```go -type Post struct { - Title string `valid:"alphanum,required"` - Message string `valid:"duck,ascii"` - Message2 string `valid:"animal(dog)"` - AuthorIP string `valid:"ipv4"` - Date string `valid:"-"` -} -post := &Post{ - Title: "My Example Post", - Message: "duck", - Message2: "dog", - AuthorIP: "123.234.54.3", -} - -// Add your own struct validation tags -govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { - return str == "duck" -}) - -// Add your own struct validation tags with parameter -govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool { - species := params[0] - return str == species -}) -govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$") - -result, err := govalidator.ValidateStruct(post) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` -###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) -If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` - -So here is small example of usage: -```go -var mapTemplate = map[string]interface{}{ - "name":"required,alpha", - "family":"required,alpha", - "email":"required,email", - "cell-phone":"numeric", - "address":map[string]interface{}{ - "line1":"required,alphanum", - "line2":"alphanum", - "postal-code":"numeric", - }, -} - -var inputMap = map[string]interface{}{ - "name":"Bob", - "family":"Smith", - "email":"foo@bar.baz", - "address":map[string]interface{}{ - "line1":"", - "line2":"", - "postal-code":"", - }, -} - -result, err := govalidator.ValidateMap(inputMap, mapTemplate) -if err != nil { - println("error: " + err.Error()) -} -println(result) -``` - -###### WhiteList -```go -// Remove all characters from string ignoring characters between "a" and "z" -println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa") -``` - -###### Custom validation functions -Custom validation using your own domain specific validators is also available - here's an example of how to use it: -```go -import "github.com/asaskevich/govalidator/v11" - -type CustomByteArray [6]byte // custom types are supported and can be validated - -type StructWithCustomByteArray struct { - ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence - Email string `valid:"email"` - CustomMinLength int `valid:"-"` -} - -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // you can type switch on the context interface being validated - case StructWithCustomByteArray: - // you can check and validate against some other field in the context, - // return early or not validate against the context at all – your choice - case SomeOtherType: - // ... - default: - // expecting some other type? Throw/panic here or continue - } - - switch v := i.(type) { // type switch on the struct field being validated - case CustomByteArray: - for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes - if e != 0 { - return true - } - } - } - return false -}) -govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool { - switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation - case StructWithCustomByteArray: - return len(v.ID) >= v.CustomMinLength - } - return false -}) -``` - -###### Loop over Error() -By default .Error() returns all errors in a single String. To access each error you can do this: -```go - if err != nil { - errs := err.(govalidator.Errors).Errors() - for _, e := range errs { - fmt.Println(e.Error()) - } - } -``` - -###### Custom error messages -Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it: -```go -type Ticket struct { - Id int64 `json:"id"` - FirstName string `json:"firstname" valid:"required~First name is blank"` -} -``` - -#### Notes -Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator). -Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator). - -#### Support -If you do have a contribution to the package, feel free to create a Pull Request or an Issue. - -#### What to contribute -If you don't know what to do, there are some features and functions that need to be done - -- [ ] Refactor code -- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check -- [ ] Create actual list of contributors and projects that currently using this package -- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) -- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) -- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new -- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) -- [ ] Implement fuzzing testing -- [ ] Implement some struct/map/array utilities -- [ ] Implement map/array validation -- [ ] Implement benchmarking -- [ ] Implement batch of examples -- [ ] Look at forks for new features and fixes - -#### Advice -Feel free to create what you want, but keep in mind when you implement new features: -- Code must be clear and readable, names of variables/constants clearly describes what they are doing -- Public functions must be documented and described in source file and added to README.md to the list of available functions -- There are must be unit-tests for any new functions and improvements - -## Credits -### Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - -#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors) -* [Daniel Lohse](https://github.com/annismckenzie) -* [Attila Oláh](https://github.com/attilaolah) -* [Daniel Korner](https://github.com/Dadie) -* [Steven Wilkin](https://github.com/stevenwilkin) -* [Deiwin Sarjas](https://github.com/deiwin) -* [Noah Shibley](https://github.com/slugmobile) -* [Nathan Davies](https://github.com/nathj07) -* [Matt Sanford](https://github.com/mzsanford) -* [Simon ccl1115](https://github.com/ccl1115) - - - - -### Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)] - - - - -### Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)] - - - - - - - - - - - - - - - -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) diff --git a/vendor/github.com/asaskevich/govalidator/v11/arrays.go b/vendor/github.com/asaskevich/govalidator/v11/arrays.go deleted file mode 100644 index 3e1da7cb48..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/arrays.go +++ /dev/null @@ -1,87 +0,0 @@ -package govalidator - -// Iterator is the function that accepts element of slice/array and its index -type Iterator func(interface{}, int) - -// ResultIterator is the function that accepts element of slice/array and its index and returns any result -type ResultIterator func(interface{}, int) interface{} - -// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean -type ConditionIterator func(interface{}, int) bool - -// ReduceIterator is the function that accepts two element of slice/array and returns result of merging those values -type ReduceIterator func(interface{}, interface{}) interface{} - -// Some validates that any item of array corresponds to ConditionIterator. Returns boolean. -func Some(array []interface{}, iterator ConditionIterator) bool { - res := false - for index, data := range array { - res = res || iterator(data, index) - } - return res -} - -// Every validates that every item of array corresponds to ConditionIterator. Returns boolean. -func Every(array []interface{}, iterator ConditionIterator) bool { - res := true - for index, data := range array { - res = res && iterator(data, index) - } - return res -} - -// Reduce boils down a list of values into a single value by ReduceIterator -func Reduce(array []interface{}, iterator ReduceIterator, initialValue interface{}) interface{} { - for _, data := range array { - initialValue = iterator(initialValue, data) - } - return initialValue -} - -// Each iterates over the slice and apply Iterator to every item -func Each(array []interface{}, iterator Iterator) { - for index, data := range array { - iterator(data, index) - } -} - -// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. -func Map(array []interface{}, iterator ResultIterator) []interface{} { - var result = make([]interface{}, len(array)) - for index, data := range array { - result[index] = iterator(data, index) - } - return result -} - -// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. -func Find(array []interface{}, iterator ConditionIterator) interface{} { - for index, data := range array { - if iterator(data, index) { - return data - } - } - return nil -} - -// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. -func Filter(array []interface{}, iterator ConditionIterator) []interface{} { - var result = make([]interface{}, 0) - for index, data := range array { - if iterator(data, index) { - result = append(result, data) - } - } - return result -} - -// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. -func Count(array []interface{}, iterator ConditionIterator) int { - count := 0 - for index, data := range array { - if iterator(data, index) { - count = count + 1 - } - } - return count -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/converter.go b/vendor/github.com/asaskevich/govalidator/v11/converter.go deleted file mode 100644 index d68e990fc2..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/converter.go +++ /dev/null @@ -1,81 +0,0 @@ -package govalidator - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" -) - -// ToString convert the input to a string. -func ToString(obj interface{}) string { - res := fmt.Sprintf("%v", obj) - return res -} - -// ToJSON convert the input to a valid JSON string -func ToJSON(obj interface{}) (string, error) { - res, err := json.Marshal(obj) - if err != nil { - res = []byte("") - } - return string(res), err -} - -// ToFloat convert the input string to a float, or 0.0 if the input is not a float. -func ToFloat(value interface{}) (res float64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = float64(val.Int()) - case uint, uint8, uint16, uint32, uint64: - res = float64(val.Uint()) - case float32, float64: - res = val.Float() - case string: - res, err = strconv.ParseFloat(val.String(), 64) - if err != nil { - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. -func ToInt(value interface{}) (res int64, err error) { - val := reflect.ValueOf(value) - - switch value.(type) { - case int, int8, int16, int32, int64: - res = val.Int() - case uint, uint8, uint16, uint32, uint64: - res = int64(val.Uint()) - case float32, float64: - res = int64(val.Float()) - case string: - if IsInt(val.String()) { - res, err = strconv.ParseInt(val.String(), 0, 64) - if err != nil { - res = 0 - } - } else { - err = fmt.Errorf("ToInt: invalid numeric format %g", value) - res = 0 - } - default: - err = fmt.Errorf("ToInt: unknown interface type %T", value) - res = 0 - } - - return -} - -// ToBoolean convert the input string to a boolean. -func ToBoolean(str string) (bool, error) { - return strconv.ParseBool(str) -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/doc.go b/vendor/github.com/asaskevich/govalidator/v11/doc.go deleted file mode 100644 index 55dce62dc8..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -package govalidator - -// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/v11/error.go b/vendor/github.com/asaskevich/govalidator/v11/error.go deleted file mode 100644 index 1da2336f47..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/error.go +++ /dev/null @@ -1,47 +0,0 @@ -package govalidator - -import ( - "sort" - "strings" -) - -// Errors is an array of multiple errors and conforms to the error interface. -type Errors []error - -// Errors returns itself. -func (es Errors) Errors() []error { - return es -} - -func (es Errors) Error() string { - var errs []string - for _, e := range es { - errs = append(errs, e.Error()) - } - sort.Strings(errs) - return strings.Join(errs, ";") -} - -// Error encapsulates a name, an error and whether there's a custom error message or not. -type Error struct { - Name string - Err error - CustomErrorMessageExists bool - - // Validator indicates the name of the validator that failed - Validator string - Path []string -} - -func (e Error) Error() string { - if e.CustomErrorMessageExists { - return e.Err.Error() - } - - errName := e.Name - if len(e.Path) > 0 { - errName = strings.Join(append(e.Path, e.Name), ".") - } - - return errName + ": " + e.Err.Error() -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/numerics.go b/vendor/github.com/asaskevich/govalidator/v11/numerics.go deleted file mode 100644 index 5041d9e868..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/numerics.go +++ /dev/null @@ -1,100 +0,0 @@ -package govalidator - -import ( - "math" -) - -// Abs returns absolute value of number -func Abs(value float64) float64 { - return math.Abs(value) -} - -// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise -func Sign(value float64) float64 { - if value > 0 { - return 1 - } else if value < 0 { - return -1 - } else { - return 0 - } -} - -// IsNegative returns true if value < 0 -func IsNegative(value float64) bool { - return value < 0 -} - -// IsPositive returns true if value > 0 -func IsPositive(value float64) bool { - return value > 0 -} - -// IsNonNegative returns true if value >= 0 -func IsNonNegative(value float64) bool { - return value >= 0 -} - -// IsNonPositive returns true if value <= 0 -func IsNonPositive(value float64) bool { - return value <= 0 -} - -// InRangeInt returns true if value lies between left and right border -func InRangeInt(value, left, right interface{}) bool { - value64, _ := ToInt(value) - left64, _ := ToInt(left) - right64, _ := ToInt(right) - if left64 > right64 { - left64, right64 = right64, left64 - } - return value64 >= left64 && value64 <= right64 -} - -// InRangeFloat32 returns true if value lies between left and right border -func InRangeFloat32(value, left, right float32) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRangeFloat64 returns true if value lies between left and right border -func InRangeFloat64(value, left, right float64) bool { - if left > right { - left, right = right, left - } - return value >= left && value <= right -} - -// InRange returns true if value lies between left and right border, generic type to handle int, float32, float64 and string. -// All types must the same type. -// False if value doesn't lie in range or if it incompatible or not comparable -func InRange(value interface{}, left interface{}, right interface{}) bool { - switch value.(type) { - case int: - intValue, _ := ToInt(value) - intLeft, _ := ToInt(left) - intRight, _ := ToInt(right) - return InRangeInt(intValue, intLeft, intRight) - case float32, float64: - intValue, _ := ToFloat(value) - intLeft, _ := ToFloat(left) - intRight, _ := ToFloat(right) - return InRangeFloat64(intValue, intLeft, intRight) - case string: - return value.(string) >= left.(string) && value.(string) <= right.(string) - default: - return false - } -} - -// IsWhole returns true if value is whole number -func IsWhole(value float64) bool { - return math.Remainder(value, 1) == 0 -} - -// IsNatural returns true if value is natural number (positive and whole) -func IsNatural(value float64) bool { - return IsWhole(value) && IsPositive(value) -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/patterns.go b/vendor/github.com/asaskevich/govalidator/v11/patterns.go deleted file mode 100644 index bafc3765ea..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/patterns.go +++ /dev/null @@ -1,113 +0,0 @@ -package govalidator - -import "regexp" - -// Basic regular expressions for validating strings -const ( - Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" - CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" - ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" - ISBN13 string = "^(?:[0-9]{13})$" - UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" - UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" - Alpha string = "^[a-zA-Z]+$" - Alphanumeric string = "^[a-zA-Z0-9]+$" - Numeric string = "^[0-9]+$" - Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" - Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" - Hexadecimal string = "^[0-9a-fA-F]+$" - Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" - ASCII string = "^[\x00-\x7F]+$" - Multibyte string = "[^\x00-\x7F]" - FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" - PrintableASCII string = "^[\x20-\x7E]+$" - DataURI string = "^data:.+\\/(.+);base64$" - MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" - Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" - Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" - DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` - IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` - URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` - URLUsername string = `(\S+(:\S*)?@)` - URLPath string = `((\/|\?|#)[^\s]*)` - URLPort string = `(:(\d{1,5}))` - URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` - URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` - URL = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` - SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` - WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixPath string = `^(/[^/\x00]*)+/?$` - WinARPath string = `^(?:(?:[a-zA-Z]:|\\\\[a-z0-9_.$●-]+\\[a-z0-9_.$●-]+)\\|\\?[^\\/:*?"<>|\r\n]+\\?)(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixARPath string = `^((\.{0,2}/)?([^/\x00]*))+/?$` - Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" - tagName string = "valid" - hasLowerCase string = ".*[[:lower:]]" - hasUpperCase string = ".*[[:upper:]]" - hasWhitespace string = ".*[[:space:]]" - hasWhitespaceOnly string = "^[[:space:]]+$" - IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$" - IMSI string = "^\\d{14,15}$" - E164 string = `^\+?[1-9]\d{1,14}$` -) - -// Used by IsFilePath func -const ( - // Unknown is unresolved OS type - Unknown = iota - // Win is Windows type - Win - // Unix is *nix OS types - Unix -) - -var ( - userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") - hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") - userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") - rxEmail = regexp.MustCompile(Email) - rxCreditCard = regexp.MustCompile(CreditCard) - rxISBN10 = regexp.MustCompile(ISBN10) - rxISBN13 = regexp.MustCompile(ISBN13) - rxUUID3 = regexp.MustCompile(UUID3) - rxUUID4 = regexp.MustCompile(UUID4) - rxUUID5 = regexp.MustCompile(UUID5) - rxUUID = regexp.MustCompile(UUID) - rxAlpha = regexp.MustCompile(Alpha) - rxAlphanumeric = regexp.MustCompile(Alphanumeric) - rxNumeric = regexp.MustCompile(Numeric) - rxInt = regexp.MustCompile(Int) - rxFloat = regexp.MustCompile(Float) - rxHexadecimal = regexp.MustCompile(Hexadecimal) - rxHexcolor = regexp.MustCompile(Hexcolor) - rxRGBcolor = regexp.MustCompile(RGBcolor) - rxASCII = regexp.MustCompile(ASCII) - rxPrintableASCII = regexp.MustCompile(PrintableASCII) - rxMultibyte = regexp.MustCompile(Multibyte) - rxFullWidth = regexp.MustCompile(FullWidth) - rxHalfWidth = regexp.MustCompile(HalfWidth) - rxBase64 = regexp.MustCompile(Base64) - rxDataURI = regexp.MustCompile(DataURI) - rxMagnetURI = regexp.MustCompile(MagnetURI) - rxLatitude = regexp.MustCompile(Latitude) - rxLongitude = regexp.MustCompile(Longitude) - rxDNSName = regexp.MustCompile(DNSName) - rxURL = regexp.MustCompile(URL) - rxSSN = regexp.MustCompile(SSN) - rxWinPath = regexp.MustCompile(WinPath) - rxUnixPath = regexp.MustCompile(UnixPath) - rxARWinPath = regexp.MustCompile(WinARPath) - rxARUnixPath = regexp.MustCompile(UnixARPath) - rxSemver = regexp.MustCompile(Semver) - rxHasLowerCase = regexp.MustCompile(hasLowerCase) - rxHasUpperCase = regexp.MustCompile(hasUpperCase) - rxHasWhitespace = regexp.MustCompile(hasWhitespace) - rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) - rxIMEI = regexp.MustCompile(IMEI) - rxIMSI = regexp.MustCompile(IMSI) - rxE164 = regexp.MustCompile(E164) -) diff --git a/vendor/github.com/asaskevich/govalidator/v11/types.go b/vendor/github.com/asaskevich/govalidator/v11/types.go deleted file mode 100644 index 6347d5fa6e..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/types.go +++ /dev/null @@ -1,657 +0,0 @@ -package govalidator - -import ( - "reflect" - "regexp" - "sort" - "sync" -) - -// Validator is a wrapper for a validator function that returns bool and accepts string. -type Validator func(str string) bool - -// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. -// The second parameter should be the context (in the case of validating a struct: the whole object being validated). -type CustomTypeValidator func(i interface{}, o interface{}) bool - -// ParamValidator is a wrapper for validator functions that accept additional parameters. -type ParamValidator func(str string, params ...string) bool - -// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value -type InterfaceParamValidator func(in interface{}, params ...string) bool -type tagOptionsMap map[string]tagOption - -func (t tagOptionsMap) orderedKeys() []string { - var keys []string - for k := range t { - keys = append(keys, k) - } - - sort.Slice(keys, func(a, b int) bool { - return t[keys[a]].order < t[keys[b]].order - }) - - return keys -} - -type tagOption struct { - name string - customErrorMessage string - order int -} - -// UnsupportedTypeError is a wrapper for reflect.Type -type UnsupportedTypeError struct { - Type reflect.Type -} - -// stringValues is a slice of reflect.Value holding *reflect.StringValue. -// It implements the methods to sort by string. -type stringValues []reflect.Value - -// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value -var InterfaceParamTagMap = map[string]InterfaceParamValidator{ - "type": IsType, -} - -// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. -var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ - "type": regexp.MustCompile(`^type\((.*)\)$`), -} - -// ParamTagMap is a map of functions accept variants parameters -var ParamTagMap = map[string]ParamValidator{ - "length": ByteLength, - "range": Range, - "runelength": RuneLength, - "stringlength": StringLength, - "matches": StringMatches, - "in": IsInRaw, - "rsapub": IsRsaPub, - "minstringlength": MinStringLength, - "maxstringlength": MaxStringLength, -} - -// ParamTagRegexMap maps param tags to their respective regexes. -var ParamTagRegexMap = map[string]*regexp.Regexp{ - "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"), - "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"), - "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"), - "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"), - "in": regexp.MustCompile(`^in\((.*)\)`), - "matches": regexp.MustCompile(`^matches\((.+)\)$`), - "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), - "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), - "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), -} - -type customTypeTagMap struct { - validators map[string]CustomTypeValidator - - sync.RWMutex -} - -func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) { - tm.RLock() - defer tm.RUnlock() - v, ok := tm.validators[name] - return v, ok -} - -func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) { - tm.Lock() - defer tm.Unlock() - tm.validators[name] = ctv -} - -// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. -// Use this to validate compound or custom types that need to be handled as a whole, e.g. -// `type UUID [16]byte` (this would be handled as an array of bytes). -var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)} - -// TagMap is a map of functions, that can be used as tags for ValidateStruct function. -var TagMap = map[string]Validator{ - "email": IsEmail, - "url": IsURL, - "dialstring": IsDialString, - "requrl": IsRequestURL, - "requri": IsRequestURI, - "alpha": IsAlpha, - "utfletter": IsUTFLetter, - "alphanum": IsAlphanumeric, - "utfletternum": IsUTFLetterNumeric, - "numeric": IsNumeric, - "utfnumeric": IsUTFNumeric, - "utfdigit": IsUTFDigit, - "hexadecimal": IsHexadecimal, - "hexcolor": IsHexcolor, - "rgbcolor": IsRGBcolor, - "lowercase": IsLowerCase, - "uppercase": IsUpperCase, - "int": IsInt, - "float": IsFloat, - "null": IsNull, - "notnull": IsNotNull, - "uuid": IsUUID, - "uuidv3": IsUUIDv3, - "uuidv4": IsUUIDv4, - "uuidv5": IsUUIDv5, - "creditcard": IsCreditCard, - "isbn10": IsISBN10, - "isbn13": IsISBN13, - "json": IsJSON, - "multibyte": IsMultibyte, - "ascii": IsASCII, - "printableascii": IsPrintableASCII, - "fullwidth": IsFullWidth, - "halfwidth": IsHalfWidth, - "variablewidth": IsVariableWidth, - "base64": IsBase64, - "datauri": IsDataURI, - "ip": IsIP, - "port": IsPort, - "ipv4": IsIPv4, - "ipv6": IsIPv6, - "dns": IsDNSName, - "host": IsHost, - "mac": IsMAC, - "latitude": IsLatitude, - "longitude": IsLongitude, - "ssn": IsSSN, - "semver": IsSemver, - "rfc3339": IsRFC3339, - "rfc3339WithoutZone": IsRFC3339WithoutZone, - "ISO3166Alpha2": IsISO3166Alpha2, - "ISO3166Alpha3": IsISO3166Alpha3, - "ISO4217": IsISO4217, - "IMEI": IsIMEI, - "ulid": IsULID, - "yyyymmdd": IsYYYYMMDD, -} - -// ISO3166Entry stores country codes -type ISO3166Entry struct { - EnglishShortName string - FrenchShortName string - Alpha2Code string - Alpha3Code string - Numeric string -} - -//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" -var ISO3166List = []ISO3166Entry{ - {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, - {"Albania", "Albanie (l')", "AL", "ALB", "008"}, - {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"}, - {"Algeria", "Algérie (l')", "DZ", "DZA", "012"}, - {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"}, - {"Andorra", "Andorre (l')", "AD", "AND", "020"}, - {"Angola", "Angola (l')", "AO", "AGO", "024"}, - {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"}, - {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"}, - {"Argentina", "Argentine (l')", "AR", "ARG", "032"}, - {"Australia", "Australie (l')", "AU", "AUS", "036"}, - {"Austria", "Autriche (l')", "AT", "AUT", "040"}, - {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"}, - {"Bahrain", "Bahreïn", "BH", "BHR", "048"}, - {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"}, - {"Armenia", "Arménie (l')", "AM", "ARM", "051"}, - {"Barbados", "Barbade (la)", "BB", "BRB", "052"}, - {"Belgium", "Belgique (la)", "BE", "BEL", "056"}, - {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"}, - {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"}, - {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"}, - {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"}, - {"Botswana", "Botswana (le)", "BW", "BWA", "072"}, - {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"}, - {"Brazil", "Brésil (le)", "BR", "BRA", "076"}, - {"Belize", "Belize (le)", "BZ", "BLZ", "084"}, - {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"}, - {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"}, - {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"}, - {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"}, - {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"}, - {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"}, - {"Burundi", "Burundi (le)", "BI", "BDI", "108"}, - {"Belarus", "Bélarus (le)", "BY", "BLR", "112"}, - {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"}, - {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"}, - {"Canada", "Canada (le)", "CA", "CAN", "124"}, - {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"}, - {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"}, - {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"}, - {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"}, - {"Chad", "Tchad (le)", "TD", "TCD", "148"}, - {"Chile", "Chili (le)", "CL", "CHL", "152"}, - {"China", "Chine (la)", "CN", "CHN", "156"}, - {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"}, - {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"}, - {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"}, - {"Colombia", "Colombie (la)", "CO", "COL", "170"}, - {"Comoros (the)", "Comores (les)", "KM", "COM", "174"}, - {"Mayotte", "Mayotte", "YT", "MYT", "175"}, - {"Congo (the)", "Congo (le)", "CG", "COG", "178"}, - {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"}, - {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"}, - {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"}, - {"Croatia", "Croatie (la)", "HR", "HRV", "191"}, - {"Cuba", "Cuba", "CU", "CUB", "192"}, - {"Cyprus", "Chypre", "CY", "CYP", "196"}, - {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"}, - {"Benin", "Bénin (le)", "BJ", "BEN", "204"}, - {"Denmark", "Danemark (le)", "DK", "DNK", "208"}, - {"Dominica", "Dominique (la)", "DM", "DMA", "212"}, - {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"}, - {"Ecuador", "Équateur (l')", "EC", "ECU", "218"}, - {"El Salvador", "El Salvador", "SV", "SLV", "222"}, - {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"}, - {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"}, - {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"}, - {"Estonia", "Estonie (l')", "EE", "EST", "233"}, - {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"}, - {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"}, - {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"}, - {"Fiji", "Fidji (les)", "FJ", "FJI", "242"}, - {"Finland", "Finlande (la)", "FI", "FIN", "246"}, - {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"}, - {"France", "France (la)", "FR", "FRA", "250"}, - {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"}, - {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"}, - {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"}, - {"Djibouti", "Djibouti", "DJ", "DJI", "262"}, - {"Gabon", "Gabon (le)", "GA", "GAB", "266"}, - {"Georgia", "Géorgie (la)", "GE", "GEO", "268"}, - {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"}, - {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"}, - {"Germany", "Allemagne (l')", "DE", "DEU", "276"}, - {"Ghana", "Ghana (le)", "GH", "GHA", "288"}, - {"Gibraltar", "Gibraltar", "GI", "GIB", "292"}, - {"Kiribati", "Kiribati", "KI", "KIR", "296"}, - {"Greece", "Grèce (la)", "GR", "GRC", "300"}, - {"Greenland", "Groenland (le)", "GL", "GRL", "304"}, - {"Grenada", "Grenade (la)", "GD", "GRD", "308"}, - {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"}, - {"Guam", "Guam", "GU", "GUM", "316"}, - {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"}, - {"Guinea", "Guinée (la)", "GN", "GIN", "324"}, - {"Guyana", "Guyana (le)", "GY", "GUY", "328"}, - {"Haiti", "Haïti", "HT", "HTI", "332"}, - {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"}, - {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"}, - {"Honduras", "Honduras (le)", "HN", "HND", "340"}, - {"Hong Kong", "Hong Kong", "HK", "HKG", "344"}, - {"Hungary", "Hongrie (la)", "HU", "HUN", "348"}, - {"Iceland", "Islande (l')", "IS", "ISL", "352"}, - {"India", "Inde (l')", "IN", "IND", "356"}, - {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"}, - {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"}, - {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"}, - {"Ireland", "Irlande (l')", "IE", "IRL", "372"}, - {"Israel", "Israël", "IL", "ISR", "376"}, - {"Italy", "Italie (l')", "IT", "ITA", "380"}, - {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"}, - {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"}, - {"Japan", "Japon (le)", "JP", "JPN", "392"}, - {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"}, - {"Jordan", "Jordanie (la)", "JO", "JOR", "400"}, - {"Kenya", "Kenya (le)", "KE", "KEN", "404"}, - {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"}, - {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"}, - {"Kuwait", "Koweït (le)", "KW", "KWT", "414"}, - {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"}, - {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"}, - {"Lebanon", "Liban (le)", "LB", "LBN", "422"}, - {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"}, - {"Latvia", "Lettonie (la)", "LV", "LVA", "428"}, - {"Liberia", "Libéria (le)", "LR", "LBR", "430"}, - {"Libya", "Libye (la)", "LY", "LBY", "434"}, - {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"}, - {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"}, - {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"}, - {"Macao", "Macao", "MO", "MAC", "446"}, - {"Madagascar", "Madagascar", "MG", "MDG", "450"}, - {"Malawi", "Malawi (le)", "MW", "MWI", "454"}, - {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"}, - {"Maldives", "Maldives (les)", "MV", "MDV", "462"}, - {"Mali", "Mali (le)", "ML", "MLI", "466"}, - {"Malta", "Malte", "MT", "MLT", "470"}, - {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"}, - {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"}, - {"Mauritius", "Maurice", "MU", "MUS", "480"}, - {"Mexico", "Mexique (le)", "MX", "MEX", "484"}, - {"Monaco", "Monaco", "MC", "MCO", "492"}, - {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"}, - {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"}, - {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"}, - {"Montserrat", "Montserrat", "MS", "MSR", "500"}, - {"Morocco", "Maroc (le)", "MA", "MAR", "504"}, - {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"}, - {"Oman", "Oman", "OM", "OMN", "512"}, - {"Namibia", "Namibie (la)", "NA", "NAM", "516"}, - {"Nauru", "Nauru", "NR", "NRU", "520"}, - {"Nepal", "Népal (le)", "NP", "NPL", "524"}, - {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"}, - {"Curaçao", "Curaçao", "CW", "CUW", "531"}, - {"Aruba", "Aruba", "AW", "ABW", "533"}, - {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"}, - {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"}, - {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"}, - {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"}, - {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"}, - {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"}, - {"Niger (the)", "Niger (le)", "NE", "NER", "562"}, - {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"}, - {"Niue", "Niue", "NU", "NIU", "570"}, - {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"}, - {"Norway", "Norvège (la)", "NO", "NOR", "578"}, - {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"}, - {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"}, - {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"}, - {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"}, - {"Palau", "Palaos (les)", "PW", "PLW", "585"}, - {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"}, - {"Panama", "Panama (le)", "PA", "PAN", "591"}, - {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"}, - {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"}, - {"Peru", "Pérou (le)", "PE", "PER", "604"}, - {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"}, - {"Pitcairn", "Pitcairn", "PN", "PCN", "612"}, - {"Poland", "Pologne (la)", "PL", "POL", "616"}, - {"Portugal", "Portugal (le)", "PT", "PRT", "620"}, - {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"}, - {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"}, - {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"}, - {"Qatar", "Qatar (le)", "QA", "QAT", "634"}, - {"Réunion", "Réunion (La)", "RE", "REU", "638"}, - {"Romania", "Roumanie (la)", "RO", "ROU", "642"}, - {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"}, - {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"}, - {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"}, - {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"}, - {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"}, - {"Anguilla", "Anguilla", "AI", "AIA", "660"}, - {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"}, - {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"}, - {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"}, - {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"}, - {"San Marino", "Saint-Marin", "SM", "SMR", "674"}, - {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"}, - {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"}, - {"Senegal", "Sénégal (le)", "SN", "SEN", "686"}, - {"Serbia", "Serbie (la)", "RS", "SRB", "688"}, - {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"}, - {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"}, - {"Singapore", "Singapour", "SG", "SGP", "702"}, - {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"}, - {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"}, - {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"}, - {"Somalia", "Somalie (la)", "SO", "SOM", "706"}, - {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"}, - {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"}, - {"Spain", "Espagne (l')", "ES", "ESP", "724"}, - {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"}, - {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"}, - {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"}, - {"Suriname", "Suriname (le)", "SR", "SUR", "740"}, - {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"}, - {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"}, - {"Sweden", "Suède (la)", "SE", "SWE", "752"}, - {"Switzerland", "Suisse (la)", "CH", "CHE", "756"}, - {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"}, - {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"}, - {"Thailand", "Thaïlande (la)", "TH", "THA", "764"}, - {"Togo", "Togo (le)", "TG", "TGO", "768"}, - {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"}, - {"Tonga", "Tonga (les)", "TO", "TON", "776"}, - {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"}, - {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"}, - {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"}, - {"Turkey", "Turquie (la)", "TR", "TUR", "792"}, - {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"}, - {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"}, - {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"}, - {"Uganda", "Ouganda (l')", "UG", "UGA", "800"}, - {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"}, - {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"}, - {"Egypt", "Égypte (l')", "EG", "EGY", "818"}, - {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"}, - {"Guernsey", "Guernesey", "GG", "GGY", "831"}, - {"Jersey", "Jersey", "JE", "JEY", "832"}, - {"Isle of Man", "Île de Man", "IM", "IMN", "833"}, - {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"}, - {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"}, - {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"}, - {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"}, - {"Uruguay", "Uruguay (l')", "UY", "URY", "858"}, - {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"}, - {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"}, - {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"}, - {"Samoa", "Samoa (le)", "WS", "WSM", "882"}, - {"Yemen", "Yémen (le)", "YE", "YEM", "887"}, - {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"}, -} - -// ISO4217List is the list of ISO currency codes -var ISO4217List = []string{ - "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", - "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", - "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", - "DJF", "DKK", "DOP", "DZD", - "EGP", "ERN", "ETB", "EUR", - "FJD", "FKP", - "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", - "HKD", "HNL", "HRK", "HTG", "HUF", - "IDR", "ILS", "INR", "IQD", "IRR", "ISK", - "JMD", "JOD", "JPY", - "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", - "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", - "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", - "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", - "OMR", - "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", - "QAR", - "RON", "RSD", "RUB", "RWF", - "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "STN", "SVC", "SYP", "SZL", - "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", - "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", - "VEF", "VES", "VND", "VUV", - "WST", - "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", - "YER", - "ZAR", "ZMW", "ZWL", -} - -// ISO693Entry stores ISO language codes -type ISO693Entry struct { - Alpha3bCode string - Alpha2Code string - English string -} - -//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json -var ISO693List = []ISO693Entry{ - {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, - {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, - {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"}, - {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"}, - {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"}, - {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"}, - {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"}, - {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"}, - {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"}, - {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"}, - {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"}, - {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"}, - {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"}, - {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"}, - {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"}, - {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"}, - {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"}, - {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"}, - {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"}, - {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"}, - {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"}, - {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"}, - {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"}, - {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"}, - {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"}, - {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"}, - {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"}, - {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"}, - {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"}, - {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"}, - {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"}, - {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"}, - {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"}, - {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"}, - {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"}, - {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"}, - {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"}, - {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"}, - {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"}, - {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"}, - {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"}, - {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"}, - {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"}, - {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"}, - {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"}, - {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"}, - {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"}, - {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"}, - {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"}, - {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"}, - {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"}, - {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"}, - {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"}, - {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"}, - {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"}, - {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"}, - {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"}, - {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"}, - {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"}, - {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"}, - {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"}, - {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"}, - {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"}, - {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"}, - {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"}, - {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"}, - {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"}, - {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"}, - {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"}, - {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"}, - {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"}, - {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"}, - {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"}, - {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"}, - {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"}, - {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"}, - {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"}, - {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"}, - {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"}, - {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"}, - {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"}, - {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"}, - {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"}, - {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"}, - {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"}, - {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"}, - {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"}, - {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"}, - {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"}, - {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"}, - {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"}, - {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"}, - {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"}, - {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"}, - {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"}, - {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"}, - {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"}, - {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"}, - {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"}, - {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"}, - {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"}, - {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"}, - {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"}, - {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"}, - {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"}, - {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"}, - {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"}, - {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"}, - {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"}, - {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"}, - {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"}, - {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"}, - {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"}, - {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"}, - {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"}, - {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"}, - {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"}, - {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"}, - {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"}, - {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"}, - {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"}, - {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"}, - {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"}, - {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"}, - {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"}, - {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"}, - {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"}, - {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"}, - {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"}, - {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"}, - {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"}, - {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"}, - {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"}, - {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"}, - {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"}, - {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"}, - {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"}, - {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"}, - {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"}, - {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"}, - {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"}, - {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"}, - {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"}, - {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"}, - {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"}, - {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"}, - {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"}, - {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"}, - {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"}, - {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"}, - {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"}, - {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"}, - {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"}, - {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"}, - {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"}, - {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"}, - {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"}, - {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"}, - {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"}, - {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"}, - {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"}, - {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"}, - {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"}, - {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"}, - {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"}, - {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"}, - {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"}, - {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"}, - {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"}, - {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"}, - {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"}, - {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"}, - {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"}, - {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"}, - {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"}, - {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"}, - {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"}, - {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"}, - {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"}, - {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"}, - {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"}, - {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"}, - {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"}, - {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"}, -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/utils.go b/vendor/github.com/asaskevich/govalidator/v11/utils.go deleted file mode 100644 index f4c30f824a..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/utils.go +++ /dev/null @@ -1,270 +0,0 @@ -package govalidator - -import ( - "errors" - "fmt" - "html" - "math" - "path" - "regexp" - "strings" - "unicode" - "unicode/utf8" -) - -// Contains checks if the string contains the substring. -func Contains(str, substring string) bool { - return strings.Contains(str, substring) -} - -// Matches checks if string matches the pattern (pattern is regular expression) -// In case of error return false -func Matches(str, pattern string) bool { - match, _ := regexp.MatchString(pattern, str) - return match -} - -// LeftTrim trims characters from the left side of the input. -// If second argument is empty, it will remove leading spaces. -func LeftTrim(str, chars string) string { - if chars == "" { - return strings.TrimLeftFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("^[" + chars + "]+") - return r.ReplaceAllString(str, "") -} - -// RightTrim trims characters from the right side of the input. -// If second argument is empty, it will remove trailing spaces. -func RightTrim(str, chars string) string { - if chars == "" { - return strings.TrimRightFunc(str, unicode.IsSpace) - } - r, _ := regexp.Compile("[" + chars + "]+$") - return r.ReplaceAllString(str, "") -} - -// Trim trims characters from both sides of the input. -// If second argument is empty, it will remove spaces. -func Trim(str, chars string) string { - return LeftTrim(RightTrim(str, chars), chars) -} - -// WhiteList removes characters that do not appear in the whitelist. -func WhiteList(str, chars string) string { - pattern := "[^" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// BlackList removes characters that appear in the blacklist. -func BlackList(str, chars string) string { - pattern := "[" + chars + "]+" - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, "") -} - -// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. -// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). -func StripLow(str string, keepNewLines bool) string { - chars := "" - if keepNewLines { - chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F" - } else { - chars = "\x00-\x1F\x7F" - } - return BlackList(str, chars) -} - -// ReplacePattern replaces regular expression pattern in string -func ReplacePattern(str, pattern, replace string) string { - r, _ := regexp.Compile(pattern) - return r.ReplaceAllString(str, replace) -} - -// Escape replaces <, >, & and " with HTML entities. -var Escape = html.EscapeString - -func addSegment(inrune, segment []rune) []rune { - if len(segment) == 0 { - return inrune - } - if len(inrune) != 0 { - inrune = append(inrune, '_') - } - inrune = append(inrune, segment...) - return inrune -} - -// UnderscoreToCamelCase converts from underscore separated form to camel case form. -// Ex.: my_func => MyFunc -func UnderscoreToCamelCase(s string) string { - return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1) -} - -// CamelCaseToUnderscore converts from camel case form to underscore separated form. -// Ex.: MyFunc => my_func -func CamelCaseToUnderscore(str string) string { - var output []rune - var segment []rune - for _, r := range str { - - // not treat number as separate segment - if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) { - output = addSegment(output, segment) - segment = nil - } - segment = append(segment, unicode.ToLower(r)) - } - output = addSegment(output, segment) - return string(output) -} - -// Reverse returns reversed string -func Reverse(s string) string { - r := []rune(s) - for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r) -} - -// GetLines splits string by "\n" and return array of lines -func GetLines(s string) []string { - return strings.Split(s, "\n") -} - -// GetLine returns specified line of multiline string -func GetLine(s string, index int) (string, error) { - lines := GetLines(s) - if index < 0 || index >= len(lines) { - return "", errors.New("line index out of bounds") - } - return lines[index], nil -} - -// RemoveTags removes all tags from HTML string -func RemoveTags(s string) string { - return ReplacePattern(s, "<[^>]*>", "") -} - -// SafeFileName returns safe string that can be used in file names -func SafeFileName(str string) string { - name := strings.ToLower(str) - name = path.Clean(path.Base(name)) - name = strings.Trim(name, " ") - separators, err := regexp.Compile(`[ &_=+:]`) - if err == nil { - name = separators.ReplaceAllString(name, "-") - } - legal, err := regexp.Compile(`[^[:alnum:]-.]`) - if err == nil { - name = legal.ReplaceAllString(name, "") - } - for strings.Contains(name, "--") { - name = strings.Replace(name, "--", "-", -1) - } - return name -} - -// NormalizeEmail canonicalize an email address. -// The local part of the email address is lowercased for all domains; the hostname is always lowercased and -// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). -// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and -// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are -// normalized to @gmail.com. -func NormalizeEmail(str string) (string, error) { - if !IsEmail(str) { - return "", fmt.Errorf("%s is not an email", str) - } - parts := strings.Split(str, "@") - parts[0] = strings.ToLower(parts[0]) - parts[1] = strings.ToLower(parts[1]) - if parts[1] == "gmail.com" || parts[1] == "googlemail.com" { - parts[1] = "gmail.com" - parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0] - } - return strings.Join(parts, "@"), nil -} - -// Truncate a string to the closest length without breaking words. -func Truncate(str string, length int, ending string) string { - var aftstr, befstr string - if len(str) > length { - words := strings.Fields(str) - before, present := 0, 0 - for i := range words { - befstr = aftstr - before = present - aftstr = aftstr + words[i] + " " - present = len(aftstr) - if present > length && i != 0 { - if (length - before) < (present - length) { - return Trim(befstr, " /\\.,\"'#!?&@+-") + ending - } - return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending - } - } - } - - return str -} - -// PadLeft pads left side of a string if size of string is less then indicated pad length -func PadLeft(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, false) -} - -// PadRight pads right side of a string if size of string is less then indicated pad length -func PadRight(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, false, true) -} - -// PadBoth pads both sides of a string if size of string is less then indicated pad length -func PadBoth(str string, padStr string, padLen int) string { - return buildPadStr(str, padStr, padLen, true, true) -} - -// PadString either left, right or both sides. -// Note that padding string can be unicode and more then one character -func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { - - // When padded length is less then the current string size - if padLen < utf8.RuneCountInString(str) { - return str - } - - padLen -= utf8.RuneCountInString(str) - - targetLen := padLen - - targetLenLeft := targetLen - targetLenRight := targetLen - if padLeft && padRight { - targetLenLeft = padLen / 2 - targetLenRight = padLen - targetLenLeft - } - - strToRepeatLen := utf8.RuneCountInString(padStr) - - repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen))) - repeatedString := strings.Repeat(padStr, repeatTimes) - - leftSide := "" - if padLeft { - leftSide = repeatedString[0:targetLenLeft] - } - - rightSide := "" - if padRight { - rightSide = repeatedString[0:targetLenRight] - } - - return leftSide + str + rightSide -} - -// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object -func TruncatingErrorf(str string, args ...interface{}) error { - n := strings.Count(str, "%s") - return fmt.Errorf(str, args[:n]...) -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/validator.go b/vendor/github.com/asaskevich/govalidator/v11/validator.go deleted file mode 100644 index 740be790e6..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/validator.go +++ /dev/null @@ -1,1775 +0,0 @@ -// Package govalidator is package of validators and sanitizers for strings, structs and collections. -package govalidator - -import ( - "bytes" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "fmt" - "io/ioutil" - "net" - "net/url" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode" - "unicode/utf8" -) - -var ( - fieldsRequiredByDefault bool - nilPtrAllowedByRequired = false - notNumberRegexp = regexp.MustCompile("[^0-9]+") - whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) - paramsRegexp = regexp.MustCompile(`\(.*\)$`) -) - -const maxURLRuneCount = 2083 -const minURLRuneCount = 3 -const rfc3339WithoutZone = "2006-01-02T15:04:05" - -// SetFieldsRequiredByDefault causes validation to fail when struct fields -// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). -// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -// type exampleStruct struct { -// Name string `` -// Email string `valid:"email"` -// This, however, will only fail when Email is empty or an invalid email address: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email"` -// Lastly, this will only fail when Email is an invalid email address but not when it's empty: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email,optional"` -func SetFieldsRequiredByDefault(value bool) { - fieldsRequiredByDefault = value -} - -// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. -// The validation will still reject ptr fields in their zero value state. Example with this enabled: -// type exampleStruct struct { -// Name *string `valid:"required"` -// With `Name` set to "", this will be considered invalid input and will cause a validation error. -// With `Name` set to nil, this will be considered valid by validation. -// By default this is disabled. -func SetNilPtrAllowedByRequired(value bool) { - nilPtrAllowedByRequired = value -} - -// IsEmail checks if the string is an email. -func IsEmail(str string) bool { - // TODO uppercase letters are not supported - return rxEmail.MatchString(str) -} - -// IsExistingEmail checks if the string is an email of existing domain -func IsExistingEmail(email string) bool { - - if len(email) < 6 || len(email) > 254 { - return false - } - at := strings.LastIndex(email, "@") - if at <= 0 || at > len(email)-3 { - return false - } - user := email[:at] - host := email[at+1:] - if len(user) > 64 { - return false - } - switch host { - case "localhost", "example.com": - return true - } - if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) { - return false - } - if _, err := net.LookupMX(host); err != nil { - if _, err := net.LookupIP(host); err != nil { - return false - } - } - - return true -} - -// IsURL checks if the string is an URL. -func IsURL(str string) bool { - if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") { - return false - } - strTemp := str - if strings.Contains(str, ":") && !strings.Contains(str, "://") { - // support no indicated urlscheme but with colon for port number - // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString - strTemp = "http://" + str - } - u, err := url.Parse(strTemp) - if err != nil { - return false - } - if strings.HasPrefix(u.Host, ".") { - return false - } - if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) { - return false - } - return rxURL.MatchString(str) -} - -// IsRequestURL checks if the string rawurl, assuming -// it was received in an HTTP request, is a valid -// URL confirm to RFC 3986 -func IsRequestURL(rawurl string) bool { - url, err := url.ParseRequestURI(rawurl) - if err != nil { - return false //Couldn't even parse the rawurl - } - if len(url.Scheme) == 0 { - return false //No Scheme found - } - return true -} - -// IsRequestURI checks if the string rawurl, assuming -// it was received in an HTTP request, is an -// absolute URI or an absolute path. -func IsRequestURI(rawurl string) bool { - _, err := url.ParseRequestURI(rawurl) - return err == nil -} - -// IsAlpha checks if the string contains only letters (a-zA-Z). Empty string is valid. -func IsAlpha(str string) bool { - if IsNull(str) { - return true - } - return rxAlpha.MatchString(str) -} - -//IsUTFLetter checks if the string contains only unicode letter characters. -//Similar to IsAlpha but for all languages. Empty string is valid. -func IsUTFLetter(str string) bool { - if IsNull(str) { - return true - } - - for _, c := range str { - if !unicode.IsLetter(c) { - return false - } - } - return true - -} - -// IsAlphanumeric checks if the string contains only letters and numbers. Empty string is valid. -func IsAlphanumeric(str string) bool { - if IsNull(str) { - return true - } - return rxAlphanumeric.MatchString(str) -} - -// IsUTFLetterNumeric checks if the string contains only unicode letters and numbers. Empty string is valid. -func IsUTFLetterNumeric(str string) bool { - if IsNull(str) { - return true - } - for _, c := range str { - if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok - return false - } - } - return true - -} - -// IsNumeric checks if the string contains only numbers. Empty string is valid. -func IsNumeric(str string) bool { - if IsNull(str) { - return true - } - return rxNumeric.MatchString(str) -} - -// IsUTFNumeric checks if the string contains only unicode numbers of any kind. -// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid. -func IsUTFNumeric(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsNumber(c) { //numbers && minus sign are ok - return false - } - } - return true - -} - -// IsUTFDigit checks if the string contains only unicode radix-10 decimal digits. Empty string is valid. -func IsUTFDigit(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsDigit(c) { //digits && minus sign are ok - return false - } - } - return true - -} - -// IsHexadecimal checks if the string is a hexadecimal number. -func IsHexadecimal(str string) bool { - return rxHexadecimal.MatchString(str) -} - -// IsHexcolor checks if the string is a hexadecimal color. -func IsHexcolor(str string) bool { - return rxHexcolor.MatchString(str) -} - -// IsRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB). -func IsRGBcolor(str string) bool { - return rxRGBcolor.MatchString(str) -} - -// IsLowerCase checks if the string is lowercase. Empty string is valid. -func IsLowerCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToLower(str) -} - -// IsUpperCase checks if the string is uppercase. Empty string is valid. -func IsUpperCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToUpper(str) -} - -// HasLowerCase checks if the string contains at least 1 lowercase. Empty string is valid. -func HasLowerCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasLowerCase.MatchString(str) -} - -// HasUpperCase checks if the string contains as least 1 uppercase. Empty string is valid. -func HasUpperCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasUpperCase.MatchString(str) -} - -// IsInt checks if the string is an integer. Empty string is valid. -func IsInt(str string) bool { - if IsNull(str) { - return true - } - return rxInt.MatchString(str) -} - -// IsFloat checks if the string is a float. -func IsFloat(str string) bool { - return str != "" && rxFloat.MatchString(str) -} - -// IsDivisibleBy checks if the string is a number that's divisible by another. -// If second argument is not valid integer or zero, it's return false. -// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero). -func IsDivisibleBy(str, num string) bool { - f, _ := ToFloat(str) - p := int64(f) - q, _ := ToInt(num) - if q == 0 { - return false - } - return (p == 0) || (p%q == 0) -} - -// IsNull checks if the string is null. -func IsNull(str string) bool { - return len(str) == 0 -} - -// IsNotNull checks if the string is not null. -func IsNotNull(str string) bool { - return !IsNull(str) -} - -// HasWhitespaceOnly checks the string only contains whitespace -func HasWhitespaceOnly(str string) bool { - return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) -} - -// HasWhitespace checks if the string contains any whitespace -func HasWhitespace(str string) bool { - return len(str) > 0 && rxHasWhitespace.MatchString(str) -} - -// IsByteLength checks if the string's length (in bytes) falls in a range. -func IsByteLength(str string, min, max int) bool { - return len(str) >= min && len(str) <= max -} - -// IsUUIDv3 checks if the string is a UUID version 3. -func IsUUIDv3(str string) bool { - return rxUUID3.MatchString(str) -} - -// IsUUIDv4 checks if the string is a UUID version 4. -func IsUUIDv4(str string) bool { - return rxUUID4.MatchString(str) -} - -// IsUUIDv5 checks if the string is a UUID version 5. -func IsUUIDv5(str string) bool { - return rxUUID5.MatchString(str) -} - -// IsUUID checks if the string is a UUID (version 3, 4 or 5). -func IsUUID(str string) bool { - return rxUUID.MatchString(str) -} - -// Byte to index table for O(1) lookups when unmarshaling. -// We use 0xFF as sentinel value for invalid indexes. -var ulidDec = [...]byte{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, - 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, - 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF, - 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, - 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, - 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, - 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -} - -// EncodedSize is the length of a text encoded ULID. -const ulidEncodedSize = 26 - -// IsULID checks if the string is a ULID. -// -// Implementation got from: -// https://github.com/oklog/ulid (Apache-2.0 License) -// -func IsULID(str string) bool { - // Check if a base32 encoded ULID is the right length. - if len(str) != ulidEncodedSize { - return false - } - - // Check if all the characters in a base32 encoded ULID are part of the - // expected base32 character set. - if ulidDec[str[0]] == 0xFF || - ulidDec[str[1]] == 0xFF || - ulidDec[str[2]] == 0xFF || - ulidDec[str[3]] == 0xFF || - ulidDec[str[4]] == 0xFF || - ulidDec[str[5]] == 0xFF || - ulidDec[str[6]] == 0xFF || - ulidDec[str[7]] == 0xFF || - ulidDec[str[8]] == 0xFF || - ulidDec[str[9]] == 0xFF || - ulidDec[str[10]] == 0xFF || - ulidDec[str[11]] == 0xFF || - ulidDec[str[12]] == 0xFF || - ulidDec[str[13]] == 0xFF || - ulidDec[str[14]] == 0xFF || - ulidDec[str[15]] == 0xFF || - ulidDec[str[16]] == 0xFF || - ulidDec[str[17]] == 0xFF || - ulidDec[str[18]] == 0xFF || - ulidDec[str[19]] == 0xFF || - ulidDec[str[20]] == 0xFF || - ulidDec[str[21]] == 0xFF || - ulidDec[str[22]] == 0xFF || - ulidDec[str[23]] == 0xFF || - ulidDec[str[24]] == 0xFF || - ulidDec[str[25]] == 0xFF { - return false - } - - // Check if the first character in a base32 encoded ULID will overflow. This - // happens because the base32 representation encodes 130 bits, while the - // ULID is only 128 bits. - // - // See https://github.com/oklog/ulid/issues/9 for details. - if str[0] > '7' { - return false - } - return true -} - -// IsCreditCard checks if the string is a credit card. -func IsCreditCard(str string) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - if !rxCreditCard.MatchString(sanitized) { - return false - } - - number, _ := ToInt(sanitized) - number, lastDigit := number/10, number%10 - - var sum int64 - for i := 0; number > 0; i++ { - digit := number % 10 - - if i%2 == 0 { - digit *= 2 - if digit > 9 { - digit -= 9 - } - } - - sum += digit - number = number / 10 - } - - return (sum+lastDigit)%10 == 0 -} - -// IsISBN10 checks if the string is an ISBN version 10. -func IsISBN10(str string) bool { - return IsISBN(str, 10) -} - -// IsISBN13 checks if the string is an ISBN version 13. -func IsISBN13(str string) bool { - return IsISBN(str, 13) -} - -// IsISBN checks if the string is an ISBN (version 10 or 13). -// If version value is not equal to 10 or 13, it will be checks both variants. -func IsISBN(str string, version int) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - var checksum int32 - var i int32 - if version == 10 { - if !rxISBN10.MatchString(sanitized) { - return false - } - for i = 0; i < 9; i++ { - checksum += (i + 1) * int32(sanitized[i]-'0') - } - if sanitized[9] == 'X' { - checksum += 10 * 10 - } else { - checksum += 10 * int32(sanitized[9]-'0') - } - if checksum%11 == 0 { - return true - } - return false - } else if version == 13 { - if !rxISBN13.MatchString(sanitized) { - return false - } - factor := []int32{1, 3} - for i = 0; i < 12; i++ { - checksum += factor[i%2] * int32(sanitized[i]-'0') - } - return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0 - } - return IsISBN(str, 10) || IsISBN(str, 13) -} - -// IsJSON checks if the string is valid JSON (note: uses json.Unmarshal). -func IsJSON(str string) bool { - var js json.RawMessage - return json.Unmarshal([]byte(str), &js) == nil -} - -// IsMultibyte checks if the string contains one or more multibyte chars. Empty string is valid. -func IsMultibyte(str string) bool { - if IsNull(str) { - return true - } - return rxMultibyte.MatchString(str) -} - -// IsASCII checks if the string contains ASCII chars only. Empty string is valid. -func IsASCII(str string) bool { - if IsNull(str) { - return true - } - return rxASCII.MatchString(str) -} - -// IsPrintableASCII checks if the string contains printable ASCII chars only. Empty string is valid. -func IsPrintableASCII(str string) bool { - if IsNull(str) { - return true - } - return rxPrintableASCII.MatchString(str) -} - -// IsFullWidth checks if the string contains any full-width chars. Empty string is valid. -func IsFullWidth(str string) bool { - if IsNull(str) { - return true - } - return rxFullWidth.MatchString(str) -} - -// IsHalfWidth checks if the string contains any half-width chars. Empty string is valid. -func IsHalfWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) -} - -// IsVariableWidth checks if the string contains a mixture of full and half-width chars. Empty string is valid. -func IsVariableWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str) -} - -// IsBase64 checks if a string is base64 encoded. -func IsBase64(str string) bool { - return rxBase64.MatchString(str) -} - -// IsFilePath checks is a string is Win or Unix file path and returns it's type. -func IsFilePath(str string) (bool, int) { - if rxWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false, Win - } - return true, Win - } else if rxUnixPath.MatchString(str) { - return true, Unix - } - return false, Unknown -} - -//IsWinFilePath checks both relative & absolute paths in Windows -func IsWinFilePath(str string) bool { - if rxARWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false - } - return true - } - return false -} - -//IsUnixFilePath checks both relative & absolute paths in Unix -func IsUnixFilePath(str string) bool { - if rxARUnixPath.MatchString(str) { - return true - } - return false -} - -// IsDataURI checks if a string is base64 encoded data URI such as an image -func IsDataURI(str string) bool { - dataURI := strings.Split(str, ",") - if !rxDataURI.MatchString(dataURI[0]) { - return false - } - return IsBase64(dataURI[1]) -} - -// IsMagnetURI checks if a string is valid magnet URI -func IsMagnetURI(str string) bool { - return rxMagnetURI.MatchString(str) -} - -// IsISO3166Alpha2 checks if a string is valid two-letter country code -func IsISO3166Alpha2(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO3166Alpha3 checks if a string is valid three-letter country code -func IsISO3166Alpha3(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha3Code { - return true - } - } - return false -} - -// IsISO693Alpha2 checks if a string is valid two-letter language code -func IsISO693Alpha2(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO693Alpha3b checks if a string is valid three-letter language code -func IsISO693Alpha3b(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha3bCode { - return true - } - } - return false -} - -// IsDNSName will validate the given string as a DNS name -func IsDNSName(str string) bool { - if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 { - // constraints already violated - return false - } - return !IsIP(str) && rxDNSName.MatchString(str) -} - -// IsHash checks if a string is a hash of type algorithm. -// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] -func IsHash(str string, algorithm string) bool { - var len string - algo := strings.ToLower(algorithm) - - if algo == "crc32" || algo == "crc32b" { - len = "8" - } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" { - len = "32" - } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" { - len = "40" - } else if algo == "tiger192" { - len = "48" - } else if algo == "sha3-224" { - len = "56" - } else if algo == "sha256" || algo == "sha3-256" { - len = "64" - } else if algo == "sha384" || algo == "sha3-384" { - len = "96" - } else if algo == "sha512" || algo == "sha3-512" { - len = "128" - } else { - return false - } - - return Matches(str, "^[a-f0-9]{"+len+"}$") -} - -// IsSHA3224 checks is a string is a SHA3-224 hash. Alias for `IsHash(str, "sha3-224")` -func IsSHA3224(str string) bool { - return IsHash(str, "sha3-224") -} - -// IsSHA3256 checks is a string is a SHA3-256 hash. Alias for `IsHash(str, "sha3-256")` -func IsSHA3256(str string) bool { - return IsHash(str, "sha3-256") -} - -// IsSHA3384 checks is a string is a SHA3-384 hash. Alias for `IsHash(str, "sha3-384")` -func IsSHA3384(str string) bool { - return IsHash(str, "sha3-384") -} - -// IsSHA3512 checks is a string is a SHA3-512 hash. Alias for `IsHash(str, "sha3-512")` -func IsSHA3512(str string) bool { - return IsHash(str, "sha3-512") -} - -// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` -func IsSHA512(str string) bool { - return IsHash(str, "sha512") -} - -// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` -func IsSHA384(str string) bool { - return IsHash(str, "sha384") -} - -// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` -func IsSHA256(str string) bool { - return IsHash(str, "sha256") -} - -// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` -func IsTiger192(str string) bool { - return IsHash(str, "tiger192") -} - -// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` -func IsTiger160(str string) bool { - return IsHash(str, "tiger160") -} - -// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` -func IsRipeMD160(str string) bool { - return IsHash(str, "ripemd160") -} - -// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` -func IsSHA1(str string) bool { - return IsHash(str, "sha1") -} - -// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` -func IsTiger128(str string) bool { - return IsHash(str, "tiger128") -} - -// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` -func IsRipeMD128(str string) bool { - return IsHash(str, "ripemd128") -} - -// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` -func IsCRC32(str string) bool { - return IsHash(str, "crc32") -} - -// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` -func IsCRC32b(str string) bool { - return IsHash(str, "crc32b") -} - -// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` -func IsMD5(str string) bool { - return IsHash(str, "md5") -} - -// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` -func IsMD4(str string) bool { - return IsHash(str, "md4") -} - -// IsDialString validates the given string for usage with the various Dial() functions -func IsDialString(str string) bool { - if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { - return true - } - - return false -} - -// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` -func IsIP(str string) bool { - return net.ParseIP(str) != nil -} - -// IsPort checks if a string represents a valid port -func IsPort(str string) bool { - if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 { - return true - } - return false -} - -// IsIPv4 checks if the string is an IP version 4. -func IsIPv4(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ".") -} - -// IsIPv6 checks if the string is an IP version 6. -func IsIPv6(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ":") -} - -// IsCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6) -func IsCIDR(str string) bool { - _, _, err := net.ParseCIDR(str) - return err == nil -} - -// IsMAC checks if a string is valid MAC address. -// Possible MAC formats: -// 01:23:45:67:89:ab -// 01:23:45:67:89:ab:cd:ef -// 01-23-45-67-89-ab -// 01-23-45-67-89-ab-cd-ef -// 0123.4567.89ab -// 0123.4567.89ab.cdef -func IsMAC(str string) bool { - _, err := net.ParseMAC(str) - return err == nil -} - -// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name -func IsHost(str string) bool { - return IsIP(str) || IsDNSName(str) -} - -// IsMongoID checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. -func IsMongoID(str string) bool { - return rxHexadecimal.MatchString(str) && (len(str) == 24) -} - -// IsLatitude checks if a string is valid latitude. -func IsLatitude(str string) bool { - return rxLatitude.MatchString(str) -} - -// IsLongitude checks if a string is valid longitude. -func IsLongitude(str string) bool { - return rxLongitude.MatchString(str) -} - -// IsIMEI checks if a string is valid IMEI -func IsIMEI(str string) bool { - return rxIMEI.MatchString(str) -} - -// IsIMSI checks if a string is valid IMSI -func IsIMSI(str string) bool { - if !rxIMSI.MatchString(str) { - return false - } - - mcc, err := strconv.ParseInt(str[0:3], 10, 32) - if err != nil { - return false - } - - switch mcc { - case 202, 204, 206, 208, 212, 213, 214, 216, 218, 219: - case 220, 221, 222, 226, 228, 230, 231, 232, 234, 235: - case 238, 240, 242, 244, 246, 247, 248, 250, 255, 257: - case 259, 260, 262, 266, 268, 270, 272, 274, 276, 278: - case 280, 282, 283, 284, 286, 288, 289, 290, 292, 293: - case 294, 295, 297, 302, 308, 310, 311, 312, 313, 314: - case 315, 316, 330, 332, 334, 338, 340, 342, 344, 346: - case 348, 350, 352, 354, 356, 358, 360, 362, 363, 364: - case 365, 366, 368, 370, 372, 374, 376, 400, 401, 402: - case 404, 405, 406, 410, 412, 413, 414, 415, 416, 417: - case 418, 419, 420, 421, 422, 424, 425, 426, 427, 428: - case 429, 430, 431, 432, 434, 436, 437, 438, 440, 441: - case 450, 452, 454, 455, 456, 457, 460, 461, 466, 467: - case 470, 472, 502, 505, 510, 514, 515, 520, 525, 528: - case 530, 536, 537, 539, 540, 541, 542, 543, 544, 545: - case 546, 547, 548, 549, 550, 551, 552, 553, 554, 555: - case 602, 603, 604, 605, 606, 607, 608, 609, 610, 611: - case 612, 613, 614, 615, 616, 617, 618, 619, 620, 621: - case 622, 623, 624, 625, 626, 627, 628, 629, 630, 631: - case 632, 633, 634, 635, 636, 637, 638, 639, 640, 641: - case 642, 643, 645, 646, 647, 648, 649, 650, 651, 652: - case 653, 654, 655, 657, 658, 659, 702, 704, 706, 708: - case 710, 712, 714, 716, 722, 724, 730, 732, 734, 736: - case 738, 740, 742, 744, 746, 748, 750, 995: - return true - default: - return false - } - return true -} - -// IsRsaPublicKey checks if a string is valid public key with provided length -func IsRsaPublicKey(str string, keylen int) bool { - bb := bytes.NewBufferString(str) - pemBytes, err := ioutil.ReadAll(bb) - if err != nil { - return false - } - block, _ := pem.Decode(pemBytes) - if block != nil && block.Type != "PUBLIC KEY" { - return false - } - var der []byte - - if block != nil { - der = block.Bytes - } else { - der, err = base64.StdEncoding.DecodeString(str) - if err != nil { - return false - } - } - - key, err := x509.ParsePKIXPublicKey(der) - if err != nil { - return false - } - pubkey, ok := key.(*rsa.PublicKey) - if !ok { - return false - } - bitlen := len(pubkey.N.Bytes()) * 8 - return bitlen == int(keylen) -} - -// IsRegex checks if a give string is a valid regex with RE2 syntax or not -func IsRegex(str string) bool { - if _, err := regexp.Compile(str); err == nil { - return true - } - return false -} - -func toJSONName(tag string) string { - if tag == "" { - return "" - } - - // JSON name always comes first. If there's no options then split[0] is - // JSON name, if JSON name is not set, then split[0] is an empty string. - split := strings.SplitN(tag, ",", 2) - - name := split[0] - - // However it is possible that the field is skipped when - // (de-)serializing from/to JSON, in which case assume that there is no - // tag name to use - if name == "-" { - return "" - } - return name -} - -func prependPathToErrors(err error, path string) error { - switch err2 := err.(type) { - case Error: - err2.Path = append([]string{path}, err2.Path...) - return err2 - case Errors: - errors := err2.Errors() - for i, err3 := range errors { - errors[i] = prependPathToErrors(err3, path) - } - return err2 - } - return err -} - -// ValidateArray performs validation according to condition iterator that validates every element of the array -func ValidateArray(array []interface{}, iterator ConditionIterator) bool { - return Every(array, iterator) -} - -// ValidateMap use validation map for fields. -// result will be equal to `false` if there are any errors. -// s is the map containing the data to be validated. -// m is the validation map in the form: -// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} -func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - var errs Errors - var index int - val := reflect.ValueOf(s) - for key, value := range s { - presentResult := true - validator, ok := m[key] - if !ok { - presentResult = false - var err error - err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - valueField := reflect.ValueOf(value) - mapResult := true - typeResult := true - structResult := true - resultField := true - switch subValidator := validator.(type) { - case map[string]interface{}: - var err error - if v, ok := value.(map[string]interface{}); !ok { - mapResult = false - err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } else { - mapResult, err = ValidateMap(v, subValidator) - if err != nil { - mapResult = false - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - case string: - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - subValidator != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - resultField, err = typeCheck(valueField, reflect.StructField{ - Name: key, - PkgPath: "", - Type: val.Type(), - Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), - Offset: 0, - Index: []int{index}, - Anonymous: false, - }, val, nil) - if err != nil { - errs = append(errs, err) - } - case nil: - // already handlerd when checked before - default: - typeResult = false - err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - result = result && presentResult && typeResult && resultField && structResult && mapResult - index++ - } - // checks required keys - requiredResult := true - for key, value := range m { - if schema, ok := value.(string); ok { - tags := parseTagIntoMap(schema) - if required, ok := tags["required"]; ok { - if _, ok := s[key]; !ok { - requiredResult = false - if required.customErrorMessage != "" { - err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} - } else { - err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} - } - errs = append(errs, err) - } - } - } - } - - if len(errs) > 0 { - err = errs - } - return result && requiredResult, err -} - -// ValidateStruct use tags for fields. -// result will be equal to `false` if there are any errors. -// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) -func ValidateStruct(s interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - val := reflect.ValueOf(s) - if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { - val = val.Elem() - } - // we only accept structs - if val.Kind() != reflect.Struct { - return false, fmt.Errorf("function only accepts structs; got %s", val.Kind()) - } - var errs Errors - for i := 0; i < val.NumField(); i++ { - valueField := val.Field(i) - typeField := val.Type().Field(i) - if typeField.PkgPath != "" { - continue // Private field - } - structResult := true - if valueField.Kind() == reflect.Interface { - valueField = valueField.Elem() - } - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - typeField.Tag.Get(tagName) != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, typeField.Name) - errs = append(errs, err) - } - } - resultField, err2 := typeCheck(valueField, typeField, val, nil) - if err2 != nil { - - // Replace structure name with JSON name if there is a tag on the variable - jsonTag := toJSONName(typeField.Tag.Get("json")) - if jsonTag != "" { - switch jsonError := err2.(type) { - case Error: - jsonError.Name = jsonTag - err2 = jsonError - case Errors: - for i2, err3 := range jsonError { - switch customErr := err3.(type) { - case Error: - customErr.Name = jsonTag - jsonError[i2] = customErr - } - } - - err2 = jsonError - } - } - - errs = append(errs, err2) - } - result = result && resultField && structResult - } - if len(errs) > 0 { - err = errs - } - return result, err -} - -// ValidateStructAsync performs async validation of the struct and returns results through the channels -func ValidateStructAsync(s interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateStruct(s) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// ValidateMapAsync performs async validation of the map and returns results through the channels -func ValidateMapAsync(s map[string]interface{}, m map[string]interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateMap(s, m) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""} -func parseTagIntoMap(tag string) tagOptionsMap { - optionsMap := make(tagOptionsMap) - options := strings.Split(tag, ",") - - for i, option := range options { - option = strings.TrimSpace(option) - - validationOptions := strings.Split(option, "~") - if !isValidTag(validationOptions[0]) { - continue - } - if len(validationOptions) == 2 { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i} - } else { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i} - } - } - return optionsMap -} - -func isValidTag(s string) bool { - if s == "" { - return false - } - for _, c := range s { - switch { - case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c): - // Backslash and quote chars are reserved, but - // otherwise any punctuation chars are allowed - // in a tag name. - default: - if !unicode.IsLetter(c) && !unicode.IsDigit(c) { - return false - } - } - } - return true -} - -// IsSSN will validate the given string as a U.S. Social Security Number -func IsSSN(str string) bool { - if str == "" || len(str) != 11 { - return false - } - return rxSSN.MatchString(str) -} - -// IsSemver checks if string is valid semantic version -func IsSemver(str string) bool { - return rxSemver.MatchString(str) -} - -// IsType checks if interface is of some type -func IsType(v interface{}, params ...string) bool { - if len(params) == 1 { - typ := params[0] - return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) - } - return false -} - -// IsTime checks if string is valid according to given format -func IsTime(str string, format string) bool { - _, err := time.Parse(format, str) - return err == nil -} - -// IsUnixTime checks if string is valid unix timestamp value -func IsUnixTime(str string) bool { - if _, err := strconv.Atoi(str); err == nil { - return true - } - return false -} - -// IsRFC3339 checks if string is valid timestamp value according to RFC3339 -func IsRFC3339(str string) bool { - return IsTime(str, time.RFC3339) -} - -// IsRFC3339WithoutZone checks if string is valid timestamp value according to RFC3339 which excludes the timezone. -func IsRFC3339WithoutZone(str string) bool { - return IsTime(str, rfc3339WithoutZone) -} - -// IsISO4217 checks if string is valid ISO currency code -func IsISO4217(str string) bool { - for _, currency := range ISO4217List { - if str == currency { - return true - } - } - - return false -} - -// ByteLength checks string's length -func ByteLength(str string, params ...string) bool { - if len(params) == 2 { - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return len(str) >= int(min) && len(str) <= int(max) - } - - return false -} - -// RuneLength checks string's length -// Alias for StringLength -func RuneLength(str string, params ...string) bool { - return StringLength(str, params...) -} - -// IsRsaPub checks whether string is valid RSA key -// Alias for IsRsaPublicKey -func IsRsaPub(str string, params ...string) bool { - if len(params) == 1 { - len, _ := ToInt(params[0]) - return IsRsaPublicKey(str, int(len)) - } - - return false -} - -// StringMatches checks if a string matches a given pattern. -func StringMatches(s string, params ...string) bool { - if len(params) == 1 { - pattern := params[0] - return Matches(s, pattern) - } - return false -} - -// StringLength checks string's length (including multi byte strings) -func StringLength(str string, params ...string) bool { - - if len(params) == 2 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return strLength >= int(min) && strLength <= int(max) - } - - return false -} - -// MinStringLength checks string's minimum length (including multi byte strings) -func MinStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - return strLength >= int(min) - } - - return false -} - -// MaxStringLength checks string's maximum length (including multi byte strings) -func MaxStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - max, _ := ToInt(params[0]) - return strLength <= int(max) - } - - return false -} - -// Range checks string's length -func Range(str string, params ...string) bool { - if len(params) == 2 { - value, _ := ToFloat(str) - min, _ := ToFloat(params[0]) - max, _ := ToFloat(params[1]) - return InRange(value, min, max) - } - - return false -} - -// IsInRaw checks if string is in list of allowed values -func IsInRaw(str string, params ...string) bool { - if len(params) == 1 { - rawParams := params[0] - - parsedParams := strings.Split(rawParams, "|") - - return IsIn(str, parsedParams...) - } - - return false -} - -// IsIn checks if string str is a member of the set of strings params -func IsIn(str string, params ...string) bool { - for _, param := range params { - if str == param { - return true - } - } - - return false -} - -func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) { - if nilPtrAllowedByRequired { - k := v.Kind() - if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() { - return true, nil - } - } - - if requiredOption, isRequired := options["required"]; isRequired { - if len(requiredOption.customErrorMessage) > 0 { - return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}} - } - return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}} - } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional { - return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}} - } - // not required and empty is valid - return true, nil -} - -func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) { - if !v.IsValid() { - return false, nil - } - - tag := t.Tag.Get(tagName) - - // checks if the field should be ignored - switch tag { - case "": - if v.Kind() != reflect.Slice && v.Kind() != reflect.Map { - if !fieldsRequiredByDefault { - return true, nil - } - return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}} - } - case "-": - return true, nil - } - - isRootType := false - if options == nil { - isRootType = true - options = parseTagIntoMap(tag) - } - - if isEmptyValue(v) { - // an empty value is not validated, checks only required - isValid, resultErr = checkRequired(v, t, options) - for key := range options { - delete(options, key) - } - return isValid, resultErr - } - - var customTypeErrors Errors - optionsOrder := options.orderedKeys() - for _, validatorName := range optionsOrder { - validatorStruct := options[validatorName] - if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok { - delete(options, validatorName) - - if result := validatefunc(v.Interface(), o.Interface()); !result { - if len(validatorStruct.customErrorMessage) > 0 { - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)}) - continue - } - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)}) - } - } - } - - if len(customTypeErrors.Errors()) > 0 { - return false, customTypeErrors - } - - if isRootType { - // Ensure that we've checked the value by all specified validators before report that the value is valid - defer func() { - delete(options, "optional") - delete(options, "required") - - if isValid && resultErr == nil && len(options) != 0 { - optionsOrder := options.orderedKeys() - for _, validator := range optionsOrder { - isValid = false - resultErr = Error{t.Name, fmt.Errorf( - "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}} - return - } - } - }() - } - - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for interface param validators - for key, value := range InterfaceParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := InterfaceParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - field := fmt.Sprint(v) - if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - } - } - - switch v.Kind() { - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Float32, reflect.Float64, - reflect.String: - // for each tag option checks the map of validator functions - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for param validators - for key, value := range ParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := ParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - // type not yet supported, fail - return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}} - } - } - - if validatefunc, ok := TagMap[validator]; ok { - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field); !result && !negate || result && negate { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - //Not Yet Supported Types (Fail here!) - err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v) - return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}} - } - } - } - return true, nil - case reflect.Map: - if v.Type().Key().Kind() != reflect.String { - return false, &UnsupportedTypeError{v.Type()} - } - var sv stringValues - sv = v.MapKeys() - sort.Sort(sv) - result := true - for i, k := range sv { - var resultItem bool - var err error - if v.MapIndex(k).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.MapIndex(k), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.MapIndex(k).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+sv[i].Interface().(string)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Slice, reflect.Array: - result := true - for i := 0; i < v.Len(); i++ { - var resultItem bool - var err error - if v.Index(i).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.Index(i), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.Index(i).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+strconv.Itoa(i)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Interface: - // If the value is an interface then encode its element - if v.IsNil() { - return true, nil - } - return ValidateStruct(v.Interface()) - case reflect.Ptr: - // If the value is a pointer then checks its element - if v.IsNil() { - return true, nil - } - return typeCheck(v.Elem(), t, o, options) - case reflect.Struct: - return true, nil - default: - return false, &UnsupportedTypeError{v.Type()} - } -} - -func stripParams(validatorString string) string { - return paramsRegexp.ReplaceAllString(validatorString, "") -} - -// isEmptyValue checks whether value empty or not -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.String, reflect.Array: - return v.Len() == 0 - case reflect.Map, reflect.Slice: - return v.Len() == 0 || v.IsNil() - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - - return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) -} - -// ErrorByField returns error for specified field of the struct -// validated by ValidateStruct or empty string if there are no errors -// or this field doesn't exists or doesn't have any errors. -func ErrorByField(e error, field string) string { - if e == nil { - return "" - } - return ErrorsByField(e)[field] -} - -// ErrorsByField returns map of errors of the struct validated -// by ValidateStruct or empty map if there are no errors. -func ErrorsByField(e error) map[string]string { - m := make(map[string]string) - if e == nil { - return m - } - // prototype for ValidateStruct - - switch e := e.(type) { - case Error: - m[e.Name] = e.Err.Error() - case Errors: - for _, item := range e.Errors() { - n := ErrorsByField(item) - for k, v := range n { - m[k] = v - } - } - } - - return m -} - -// Error returns string equivalent for reflect.Type -func (e *UnsupportedTypeError) Error() string { - return "validator: unsupported type: " + e.Type.String() -} - -func (sv stringValues) Len() int { return len(sv) } -func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } -func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) } -func (sv stringValues) get(i int) string { return sv[i].String() } - -func IsE164(str string) bool { - return rxE164.MatchString(str) -} - -// IsYYYYMMDD checks if a string is in the "YYYY-MM-DD" date format and returns true if valid. -func IsYYYYMMDD(str string) bool { - layout := "2006-01-02" - _, err := time.Parse(layout, str) - return err == nil -} diff --git a/vendor/github.com/asaskevich/govalidator/v11/wercker.yml b/vendor/github.com/asaskevich/govalidator/v11/wercker.yml deleted file mode 100644 index bc5f7b0864..0000000000 --- a/vendor/github.com/asaskevich/govalidator/v11/wercker.yml +++ /dev/null @@ -1,15 +0,0 @@ -box: golang -build: - steps: - - setup-go-workspace - - - script: - name: go get - code: | - go version - go get -t ./... - - - script: - name: go test - code: | - go test -race -v ./... diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go deleted file mode 100644 index c9c4fac065..0000000000 --- a/vendor/github.com/asaskevich/govalidator/validator.go +++ /dev/null @@ -1,1768 +0,0 @@ -// Package govalidator is package of validators and sanitizers for strings, structs and collections. -package govalidator - -import ( - "bytes" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "fmt" - "io/ioutil" - "net" - "net/url" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode" - "unicode/utf8" -) - -var ( - fieldsRequiredByDefault bool - nilPtrAllowedByRequired = false - notNumberRegexp = regexp.MustCompile("[^0-9]+") - whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) - paramsRegexp = regexp.MustCompile(`\(.*\)$`) -) - -const maxURLRuneCount = 2083 -const minURLRuneCount = 3 -const rfc3339WithoutZone = "2006-01-02T15:04:05" - -// SetFieldsRequiredByDefault causes validation to fail when struct fields -// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). -// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): -// type exampleStruct struct { -// Name string `` -// Email string `valid:"email"` -// This, however, will only fail when Email is empty or an invalid email address: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email"` -// Lastly, this will only fail when Email is an invalid email address but not when it's empty: -// type exampleStruct2 struct { -// Name string `valid:"-"` -// Email string `valid:"email,optional"` -func SetFieldsRequiredByDefault(value bool) { - fieldsRequiredByDefault = value -} - -// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. -// The validation will still reject ptr fields in their zero value state. Example with this enabled: -// type exampleStruct struct { -// Name *string `valid:"required"` -// With `Name` set to "", this will be considered invalid input and will cause a validation error. -// With `Name` set to nil, this will be considered valid by validation. -// By default this is disabled. -func SetNilPtrAllowedByRequired(value bool) { - nilPtrAllowedByRequired = value -} - -// IsEmail checks if the string is an email. -func IsEmail(str string) bool { - // TODO uppercase letters are not supported - return rxEmail.MatchString(str) -} - -// IsExistingEmail checks if the string is an email of existing domain -func IsExistingEmail(email string) bool { - - if len(email) < 6 || len(email) > 254 { - return false - } - at := strings.LastIndex(email, "@") - if at <= 0 || at > len(email)-3 { - return false - } - user := email[:at] - host := email[at+1:] - if len(user) > 64 { - return false - } - switch host { - case "localhost", "example.com": - return true - } - if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) { - return false - } - if _, err := net.LookupMX(host); err != nil { - if _, err := net.LookupIP(host); err != nil { - return false - } - } - - return true -} - -// IsURL checks if the string is an URL. -func IsURL(str string) bool { - if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") { - return false - } - strTemp := str - if strings.Contains(str, ":") && !strings.Contains(str, "://") { - // support no indicated urlscheme but with colon for port number - // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString - strTemp = "http://" + str - } - u, err := url.Parse(strTemp) - if err != nil { - return false - } - if strings.HasPrefix(u.Host, ".") { - return false - } - if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) { - return false - } - return rxURL.MatchString(str) -} - -// IsRequestURL checks if the string rawurl, assuming -// it was received in an HTTP request, is a valid -// URL confirm to RFC 3986 -func IsRequestURL(rawurl string) bool { - url, err := url.ParseRequestURI(rawurl) - if err != nil { - return false //Couldn't even parse the rawurl - } - if len(url.Scheme) == 0 { - return false //No Scheme found - } - return true -} - -// IsRequestURI checks if the string rawurl, assuming -// it was received in an HTTP request, is an -// absolute URI or an absolute path. -func IsRequestURI(rawurl string) bool { - _, err := url.ParseRequestURI(rawurl) - return err == nil -} - -// IsAlpha checks if the string contains only letters (a-zA-Z). Empty string is valid. -func IsAlpha(str string) bool { - if IsNull(str) { - return true - } - return rxAlpha.MatchString(str) -} - -//IsUTFLetter checks if the string contains only unicode letter characters. -//Similar to IsAlpha but for all languages. Empty string is valid. -func IsUTFLetter(str string) bool { - if IsNull(str) { - return true - } - - for _, c := range str { - if !unicode.IsLetter(c) { - return false - } - } - return true - -} - -// IsAlphanumeric checks if the string contains only letters and numbers. Empty string is valid. -func IsAlphanumeric(str string) bool { - if IsNull(str) { - return true - } - return rxAlphanumeric.MatchString(str) -} - -// IsUTFLetterNumeric checks if the string contains only unicode letters and numbers. Empty string is valid. -func IsUTFLetterNumeric(str string) bool { - if IsNull(str) { - return true - } - for _, c := range str { - if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok - return false - } - } - return true - -} - -// IsNumeric checks if the string contains only numbers. Empty string is valid. -func IsNumeric(str string) bool { - if IsNull(str) { - return true - } - return rxNumeric.MatchString(str) -} - -// IsUTFNumeric checks if the string contains only unicode numbers of any kind. -// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid. -func IsUTFNumeric(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsNumber(c) { //numbers && minus sign are ok - return false - } - } - return true - -} - -// IsUTFDigit checks if the string contains only unicode radix-10 decimal digits. Empty string is valid. -func IsUTFDigit(str string) bool { - if IsNull(str) { - return true - } - if strings.IndexAny(str, "+-") > 0 { - return false - } - if len(str) > 1 { - str = strings.TrimPrefix(str, "-") - str = strings.TrimPrefix(str, "+") - } - for _, c := range str { - if !unicode.IsDigit(c) { //digits && minus sign are ok - return false - } - } - return true - -} - -// IsHexadecimal checks if the string is a hexadecimal number. -func IsHexadecimal(str string) bool { - return rxHexadecimal.MatchString(str) -} - -// IsHexcolor checks if the string is a hexadecimal color. -func IsHexcolor(str string) bool { - return rxHexcolor.MatchString(str) -} - -// IsRGBcolor checks if the string is a valid RGB color in form rgb(RRR, GGG, BBB). -func IsRGBcolor(str string) bool { - return rxRGBcolor.MatchString(str) -} - -// IsLowerCase checks if the string is lowercase. Empty string is valid. -func IsLowerCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToLower(str) -} - -// IsUpperCase checks if the string is uppercase. Empty string is valid. -func IsUpperCase(str string) bool { - if IsNull(str) { - return true - } - return str == strings.ToUpper(str) -} - -// HasLowerCase checks if the string contains at least 1 lowercase. Empty string is valid. -func HasLowerCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasLowerCase.MatchString(str) -} - -// HasUpperCase checks if the string contains as least 1 uppercase. Empty string is valid. -func HasUpperCase(str string) bool { - if IsNull(str) { - return true - } - return rxHasUpperCase.MatchString(str) -} - -// IsInt checks if the string is an integer. Empty string is valid. -func IsInt(str string) bool { - if IsNull(str) { - return true - } - return rxInt.MatchString(str) -} - -// IsFloat checks if the string is a float. -func IsFloat(str string) bool { - return str != "" && rxFloat.MatchString(str) -} - -// IsDivisibleBy checks if the string is a number that's divisible by another. -// If second argument is not valid integer or zero, it's return false. -// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero). -func IsDivisibleBy(str, num string) bool { - f, _ := ToFloat(str) - p := int64(f) - q, _ := ToInt(num) - if q == 0 { - return false - } - return (p == 0) || (p%q == 0) -} - -// IsNull checks if the string is null. -func IsNull(str string) bool { - return len(str) == 0 -} - -// IsNotNull checks if the string is not null. -func IsNotNull(str string) bool { - return !IsNull(str) -} - -// HasWhitespaceOnly checks the string only contains whitespace -func HasWhitespaceOnly(str string) bool { - return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) -} - -// HasWhitespace checks if the string contains any whitespace -func HasWhitespace(str string) bool { - return len(str) > 0 && rxHasWhitespace.MatchString(str) -} - -// IsByteLength checks if the string's length (in bytes) falls in a range. -func IsByteLength(str string, min, max int) bool { - return len(str) >= min && len(str) <= max -} - -// IsUUIDv3 checks if the string is a UUID version 3. -func IsUUIDv3(str string) bool { - return rxUUID3.MatchString(str) -} - -// IsUUIDv4 checks if the string is a UUID version 4. -func IsUUIDv4(str string) bool { - return rxUUID4.MatchString(str) -} - -// IsUUIDv5 checks if the string is a UUID version 5. -func IsUUIDv5(str string) bool { - return rxUUID5.MatchString(str) -} - -// IsUUID checks if the string is a UUID (version 3, 4 or 5). -func IsUUID(str string) bool { - return rxUUID.MatchString(str) -} - -// Byte to index table for O(1) lookups when unmarshaling. -// We use 0xFF as sentinel value for invalid indexes. -var ulidDec = [...]byte{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, - 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, - 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, 0x15, 0xFF, - 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, 0x1D, 0x1E, - 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0A, 0x0B, 0x0C, - 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0xFF, 0x12, 0x13, 0xFF, 0x14, - 0x15, 0xFF, 0x16, 0x17, 0x18, 0x19, 0x1A, 0xFF, 0x1B, 0x1C, - 0x1D, 0x1E, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -} - -// EncodedSize is the length of a text encoded ULID. -const ulidEncodedSize = 26 - -// IsULID checks if the string is a ULID. -// -// Implementation got from: -// https://github.com/oklog/ulid (Apache-2.0 License) -// -func IsULID(str string) bool { - // Check if a base32 encoded ULID is the right length. - if len(str) != ulidEncodedSize { - return false - } - - // Check if all the characters in a base32 encoded ULID are part of the - // expected base32 character set. - if ulidDec[str[0]] == 0xFF || - ulidDec[str[1]] == 0xFF || - ulidDec[str[2]] == 0xFF || - ulidDec[str[3]] == 0xFF || - ulidDec[str[4]] == 0xFF || - ulidDec[str[5]] == 0xFF || - ulidDec[str[6]] == 0xFF || - ulidDec[str[7]] == 0xFF || - ulidDec[str[8]] == 0xFF || - ulidDec[str[9]] == 0xFF || - ulidDec[str[10]] == 0xFF || - ulidDec[str[11]] == 0xFF || - ulidDec[str[12]] == 0xFF || - ulidDec[str[13]] == 0xFF || - ulidDec[str[14]] == 0xFF || - ulidDec[str[15]] == 0xFF || - ulidDec[str[16]] == 0xFF || - ulidDec[str[17]] == 0xFF || - ulidDec[str[18]] == 0xFF || - ulidDec[str[19]] == 0xFF || - ulidDec[str[20]] == 0xFF || - ulidDec[str[21]] == 0xFF || - ulidDec[str[22]] == 0xFF || - ulidDec[str[23]] == 0xFF || - ulidDec[str[24]] == 0xFF || - ulidDec[str[25]] == 0xFF { - return false - } - - // Check if the first character in a base32 encoded ULID will overflow. This - // happens because the base32 representation encodes 130 bits, while the - // ULID is only 128 bits. - // - // See https://github.com/oklog/ulid/issues/9 for details. - if str[0] > '7' { - return false - } - return true -} - -// IsCreditCard checks if the string is a credit card. -func IsCreditCard(str string) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - if !rxCreditCard.MatchString(sanitized) { - return false - } - - number, _ := ToInt(sanitized) - number, lastDigit := number / 10, number % 10 - - var sum int64 - for i:=0; number > 0; i++ { - digit := number % 10 - - if i % 2 == 0 { - digit *= 2 - if digit > 9 { - digit -= 9 - } - } - - sum += digit - number = number / 10 - } - - return (sum + lastDigit) % 10 == 0 -} - -// IsISBN10 checks if the string is an ISBN version 10. -func IsISBN10(str string) bool { - return IsISBN(str, 10) -} - -// IsISBN13 checks if the string is an ISBN version 13. -func IsISBN13(str string) bool { - return IsISBN(str, 13) -} - -// IsISBN checks if the string is an ISBN (version 10 or 13). -// If version value is not equal to 10 or 13, it will be checks both variants. -func IsISBN(str string, version int) bool { - sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") - var checksum int32 - var i int32 - if version == 10 { - if !rxISBN10.MatchString(sanitized) { - return false - } - for i = 0; i < 9; i++ { - checksum += (i + 1) * int32(sanitized[i]-'0') - } - if sanitized[9] == 'X' { - checksum += 10 * 10 - } else { - checksum += 10 * int32(sanitized[9]-'0') - } - if checksum%11 == 0 { - return true - } - return false - } else if version == 13 { - if !rxISBN13.MatchString(sanitized) { - return false - } - factor := []int32{1, 3} - for i = 0; i < 12; i++ { - checksum += factor[i%2] * int32(sanitized[i]-'0') - } - return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0 - } - return IsISBN(str, 10) || IsISBN(str, 13) -} - -// IsJSON checks if the string is valid JSON (note: uses json.Unmarshal). -func IsJSON(str string) bool { - var js json.RawMessage - return json.Unmarshal([]byte(str), &js) == nil -} - -// IsMultibyte checks if the string contains one or more multibyte chars. Empty string is valid. -func IsMultibyte(str string) bool { - if IsNull(str) { - return true - } - return rxMultibyte.MatchString(str) -} - -// IsASCII checks if the string contains ASCII chars only. Empty string is valid. -func IsASCII(str string) bool { - if IsNull(str) { - return true - } - return rxASCII.MatchString(str) -} - -// IsPrintableASCII checks if the string contains printable ASCII chars only. Empty string is valid. -func IsPrintableASCII(str string) bool { - if IsNull(str) { - return true - } - return rxPrintableASCII.MatchString(str) -} - -// IsFullWidth checks if the string contains any full-width chars. Empty string is valid. -func IsFullWidth(str string) bool { - if IsNull(str) { - return true - } - return rxFullWidth.MatchString(str) -} - -// IsHalfWidth checks if the string contains any half-width chars. Empty string is valid. -func IsHalfWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) -} - -// IsVariableWidth checks if the string contains a mixture of full and half-width chars. Empty string is valid. -func IsVariableWidth(str string) bool { - if IsNull(str) { - return true - } - return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str) -} - -// IsBase64 checks if a string is base64 encoded. -func IsBase64(str string) bool { - return rxBase64.MatchString(str) -} - -// IsFilePath checks is a string is Win or Unix file path and returns it's type. -func IsFilePath(str string) (bool, int) { - if rxWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false, Win - } - return true, Win - } else if rxUnixPath.MatchString(str) { - return true, Unix - } - return false, Unknown -} - -//IsWinFilePath checks both relative & absolute paths in Windows -func IsWinFilePath(str string) bool { - if rxARWinPath.MatchString(str) { - //check windows path limit see: - // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath - if len(str[3:]) > 32767 { - return false - } - return true - } - return false -} - -//IsUnixFilePath checks both relative & absolute paths in Unix -func IsUnixFilePath(str string) bool { - if rxARUnixPath.MatchString(str) { - return true - } - return false -} - -// IsDataURI checks if a string is base64 encoded data URI such as an image -func IsDataURI(str string) bool { - dataURI := strings.Split(str, ",") - if !rxDataURI.MatchString(dataURI[0]) { - return false - } - return IsBase64(dataURI[1]) -} - -// IsMagnetURI checks if a string is valid magnet URI -func IsMagnetURI(str string) bool { - return rxMagnetURI.MatchString(str) -} - -// IsISO3166Alpha2 checks if a string is valid two-letter country code -func IsISO3166Alpha2(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO3166Alpha3 checks if a string is valid three-letter country code -func IsISO3166Alpha3(str string) bool { - for _, entry := range ISO3166List { - if str == entry.Alpha3Code { - return true - } - } - return false -} - -// IsISO693Alpha2 checks if a string is valid two-letter language code -func IsISO693Alpha2(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha2Code { - return true - } - } - return false -} - -// IsISO693Alpha3b checks if a string is valid three-letter language code -func IsISO693Alpha3b(str string) bool { - for _, entry := range ISO693List { - if str == entry.Alpha3bCode { - return true - } - } - return false -} - -// IsDNSName will validate the given string as a DNS name -func IsDNSName(str string) bool { - if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 { - // constraints already violated - return false - } - return !IsIP(str) && rxDNSName.MatchString(str) -} - -// IsHash checks if a string is a hash of type algorithm. -// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] -func IsHash(str string, algorithm string) bool { - var len string - algo := strings.ToLower(algorithm) - - if algo == "crc32" || algo == "crc32b" { - len = "8" - } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" { - len = "32" - } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" { - len = "40" - } else if algo == "tiger192" { - len = "48" - } else if algo == "sha3-224" { - len = "56" - } else if algo == "sha256" || algo == "sha3-256" { - len = "64" - } else if algo == "sha384" || algo == "sha3-384" { - len = "96" - } else if algo == "sha512" || algo == "sha3-512" { - len = "128" - } else { - return false - } - - return Matches(str, "^[a-f0-9]{"+len+"}$") -} - -// IsSHA3224 checks is a string is a SHA3-224 hash. Alias for `IsHash(str, "sha3-224")` -func IsSHA3224(str string) bool { - return IsHash(str, "sha3-224") -} - -// IsSHA3256 checks is a string is a SHA3-256 hash. Alias for `IsHash(str, "sha3-256")` -func IsSHA3256(str string) bool { - return IsHash(str, "sha3-256") -} - -// IsSHA3384 checks is a string is a SHA3-384 hash. Alias for `IsHash(str, "sha3-384")` -func IsSHA3384(str string) bool { - return IsHash(str, "sha3-384") -} - -// IsSHA3512 checks is a string is a SHA3-512 hash. Alias for `IsHash(str, "sha3-512")` -func IsSHA3512(str string) bool { - return IsHash(str, "sha3-512") -} - -// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` -func IsSHA512(str string) bool { - return IsHash(str, "sha512") -} - -// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` -func IsSHA384(str string) bool { - return IsHash(str, "sha384") -} - -// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` -func IsSHA256(str string) bool { - return IsHash(str, "sha256") -} - -// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` -func IsTiger192(str string) bool { - return IsHash(str, "tiger192") -} - -// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` -func IsTiger160(str string) bool { - return IsHash(str, "tiger160") -} - -// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` -func IsRipeMD160(str string) bool { - return IsHash(str, "ripemd160") -} - -// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` -func IsSHA1(str string) bool { - return IsHash(str, "sha1") -} - -// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` -func IsTiger128(str string) bool { - return IsHash(str, "tiger128") -} - -// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` -func IsRipeMD128(str string) bool { - return IsHash(str, "ripemd128") -} - -// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` -func IsCRC32(str string) bool { - return IsHash(str, "crc32") -} - -// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` -func IsCRC32b(str string) bool { - return IsHash(str, "crc32b") -} - -// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` -func IsMD5(str string) bool { - return IsHash(str, "md5") -} - -// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` -func IsMD4(str string) bool { - return IsHash(str, "md4") -} - -// IsDialString validates the given string for usage with the various Dial() functions -func IsDialString(str string) bool { - if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { - return true - } - - return false -} - -// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` -func IsIP(str string) bool { - return net.ParseIP(str) != nil -} - -// IsPort checks if a string represents a valid port -func IsPort(str string) bool { - if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 { - return true - } - return false -} - -// IsIPv4 checks if the string is an IP version 4. -func IsIPv4(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ".") -} - -// IsIPv6 checks if the string is an IP version 6. -func IsIPv6(str string) bool { - ip := net.ParseIP(str) - return ip != nil && strings.Contains(str, ":") -} - -// IsCIDR checks if the string is an valid CIDR notiation (IPV4 & IPV6) -func IsCIDR(str string) bool { - _, _, err := net.ParseCIDR(str) - return err == nil -} - -// IsMAC checks if a string is valid MAC address. -// Possible MAC formats: -// 01:23:45:67:89:ab -// 01:23:45:67:89:ab:cd:ef -// 01-23-45-67-89-ab -// 01-23-45-67-89-ab-cd-ef -// 0123.4567.89ab -// 0123.4567.89ab.cdef -func IsMAC(str string) bool { - _, err := net.ParseMAC(str) - return err == nil -} - -// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name -func IsHost(str string) bool { - return IsIP(str) || IsDNSName(str) -} - -// IsMongoID checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. -func IsMongoID(str string) bool { - return rxHexadecimal.MatchString(str) && (len(str) == 24) -} - -// IsLatitude checks if a string is valid latitude. -func IsLatitude(str string) bool { - return rxLatitude.MatchString(str) -} - -// IsLongitude checks if a string is valid longitude. -func IsLongitude(str string) bool { - return rxLongitude.MatchString(str) -} - -// IsIMEI checks if a string is valid IMEI -func IsIMEI(str string) bool { - return rxIMEI.MatchString(str) -} - -// IsIMSI checks if a string is valid IMSI -func IsIMSI(str string) bool { - if !rxIMSI.MatchString(str) { - return false - } - - mcc, err := strconv.ParseInt(str[0:3], 10, 32) - if err != nil { - return false - } - - switch mcc { - case 202, 204, 206, 208, 212, 213, 214, 216, 218, 219: - case 220, 221, 222, 226, 228, 230, 231, 232, 234, 235: - case 238, 240, 242, 244, 246, 247, 248, 250, 255, 257: - case 259, 260, 262, 266, 268, 270, 272, 274, 276, 278: - case 280, 282, 283, 284, 286, 288, 289, 290, 292, 293: - case 294, 295, 297, 302, 308, 310, 311, 312, 313, 314: - case 315, 316, 330, 332, 334, 338, 340, 342, 344, 346: - case 348, 350, 352, 354, 356, 358, 360, 362, 363, 364: - case 365, 366, 368, 370, 372, 374, 376, 400, 401, 402: - case 404, 405, 406, 410, 412, 413, 414, 415, 416, 417: - case 418, 419, 420, 421, 422, 424, 425, 426, 427, 428: - case 429, 430, 431, 432, 434, 436, 437, 438, 440, 441: - case 450, 452, 454, 455, 456, 457, 460, 461, 466, 467: - case 470, 472, 502, 505, 510, 514, 515, 520, 525, 528: - case 530, 536, 537, 539, 540, 541, 542, 543, 544, 545: - case 546, 547, 548, 549, 550, 551, 552, 553, 554, 555: - case 602, 603, 604, 605, 606, 607, 608, 609, 610, 611: - case 612, 613, 614, 615, 616, 617, 618, 619, 620, 621: - case 622, 623, 624, 625, 626, 627, 628, 629, 630, 631: - case 632, 633, 634, 635, 636, 637, 638, 639, 640, 641: - case 642, 643, 645, 646, 647, 648, 649, 650, 651, 652: - case 653, 654, 655, 657, 658, 659, 702, 704, 706, 708: - case 710, 712, 714, 716, 722, 724, 730, 732, 734, 736: - case 738, 740, 742, 744, 746, 748, 750, 995: - return true - default: - return false - } - return true -} - -// IsRsaPublicKey checks if a string is valid public key with provided length -func IsRsaPublicKey(str string, keylen int) bool { - bb := bytes.NewBufferString(str) - pemBytes, err := ioutil.ReadAll(bb) - if err != nil { - return false - } - block, _ := pem.Decode(pemBytes) - if block != nil && block.Type != "PUBLIC KEY" { - return false - } - var der []byte - - if block != nil { - der = block.Bytes - } else { - der, err = base64.StdEncoding.DecodeString(str) - if err != nil { - return false - } - } - - key, err := x509.ParsePKIXPublicKey(der) - if err != nil { - return false - } - pubkey, ok := key.(*rsa.PublicKey) - if !ok { - return false - } - bitlen := len(pubkey.N.Bytes()) * 8 - return bitlen == int(keylen) -} - -// IsRegex checks if a give string is a valid regex with RE2 syntax or not -func IsRegex(str string) bool { - if _, err := regexp.Compile(str); err == nil { - return true - } - return false -} - -func toJSONName(tag string) string { - if tag == "" { - return "" - } - - // JSON name always comes first. If there's no options then split[0] is - // JSON name, if JSON name is not set, then split[0] is an empty string. - split := strings.SplitN(tag, ",", 2) - - name := split[0] - - // However it is possible that the field is skipped when - // (de-)serializing from/to JSON, in which case assume that there is no - // tag name to use - if name == "-" { - return "" - } - return name -} - -func prependPathToErrors(err error, path string) error { - switch err2 := err.(type) { - case Error: - err2.Path = append([]string{path}, err2.Path...) - return err2 - case Errors: - errors := err2.Errors() - for i, err3 := range errors { - errors[i] = prependPathToErrors(err3, path) - } - return err2 - } - return err -} - -// ValidateArray performs validation according to condition iterator that validates every element of the array -func ValidateArray(array []interface{}, iterator ConditionIterator) bool { - return Every(array, iterator) -} - -// ValidateMap use validation map for fields. -// result will be equal to `false` if there are any errors. -// s is the map containing the data to be validated. -// m is the validation map in the form: -// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} -func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - var errs Errors - var index int - val := reflect.ValueOf(s) - for key, value := range s { - presentResult := true - validator, ok := m[key] - if !ok { - presentResult = false - var err error - err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - valueField := reflect.ValueOf(value) - mapResult := true - typeResult := true - structResult := true - resultField := true - switch subValidator := validator.(type) { - case map[string]interface{}: - var err error - if v, ok := value.(map[string]interface{}); !ok { - mapResult = false - err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } else { - mapResult, err = ValidateMap(v, subValidator) - if err != nil { - mapResult = false - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - case string: - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - subValidator != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - } - resultField, err = typeCheck(valueField, reflect.StructField{ - Name: key, - PkgPath: "", - Type: val.Type(), - Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), - Offset: 0, - Index: []int{index}, - Anonymous: false, - }, val, nil) - if err != nil { - errs = append(errs, err) - } - case nil: - // already handlerd when checked before - default: - typeResult = false - err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) - err = prependPathToErrors(err, key) - errs = append(errs, err) - } - result = result && presentResult && typeResult && resultField && structResult && mapResult - index++ - } - // checks required keys - requiredResult := true - for key, value := range m { - if schema, ok := value.(string); ok { - tags := parseTagIntoMap(schema) - if required, ok := tags["required"]; ok { - if _, ok := s[key]; !ok { - requiredResult = false - if required.customErrorMessage != "" { - err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} - } else { - err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} - } - errs = append(errs, err) - } - } - } - } - - if len(errs) > 0 { - err = errs - } - return result && requiredResult, err -} - -// ValidateStruct use tags for fields. -// result will be equal to `false` if there are any errors. -// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) -func ValidateStruct(s interface{}) (bool, error) { - if s == nil { - return true, nil - } - result := true - var err error - val := reflect.ValueOf(s) - if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { - val = val.Elem() - } - // we only accept structs - if val.Kind() != reflect.Struct { - return false, fmt.Errorf("function only accepts structs; got %s", val.Kind()) - } - var errs Errors - for i := 0; i < val.NumField(); i++ { - valueField := val.Field(i) - typeField := val.Type().Field(i) - if typeField.PkgPath != "" { - continue // Private field - } - structResult := true - if valueField.Kind() == reflect.Interface { - valueField = valueField.Elem() - } - if (valueField.Kind() == reflect.Struct || - (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && - typeField.Tag.Get(tagName) != "-" { - var err error - structResult, err = ValidateStruct(valueField.Interface()) - if err != nil { - err = prependPathToErrors(err, typeField.Name) - errs = append(errs, err) - } - } - resultField, err2 := typeCheck(valueField, typeField, val, nil) - if err2 != nil { - - // Replace structure name with JSON name if there is a tag on the variable - jsonTag := toJSONName(typeField.Tag.Get("json")) - if jsonTag != "" { - switch jsonError := err2.(type) { - case Error: - jsonError.Name = jsonTag - err2 = jsonError - case Errors: - for i2, err3 := range jsonError { - switch customErr := err3.(type) { - case Error: - customErr.Name = jsonTag - jsonError[i2] = customErr - } - } - - err2 = jsonError - } - } - - errs = append(errs, err2) - } - result = result && resultField && structResult - } - if len(errs) > 0 { - err = errs - } - return result, err -} - -// ValidateStructAsync performs async validation of the struct and returns results through the channels -func ValidateStructAsync(s interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateStruct(s) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// ValidateMapAsync performs async validation of the map and returns results through the channels -func ValidateMapAsync(s map[string]interface{}, m map[string]interface{}) (<-chan bool, <-chan error) { - res := make(chan bool) - errors := make(chan error) - - go func() { - defer close(res) - defer close(errors) - - isValid, isFailed := ValidateMap(s, m) - - res <- isValid - errors <- isFailed - }() - - return res, errors -} - -// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""} -func parseTagIntoMap(tag string) tagOptionsMap { - optionsMap := make(tagOptionsMap) - options := strings.Split(tag, ",") - - for i, option := range options { - option = strings.TrimSpace(option) - - validationOptions := strings.Split(option, "~") - if !isValidTag(validationOptions[0]) { - continue - } - if len(validationOptions) == 2 { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i} - } else { - optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i} - } - } - return optionsMap -} - -func isValidTag(s string) bool { - if s == "" { - return false - } - for _, c := range s { - switch { - case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c): - // Backslash and quote chars are reserved, but - // otherwise any punctuation chars are allowed - // in a tag name. - default: - if !unicode.IsLetter(c) && !unicode.IsDigit(c) { - return false - } - } - } - return true -} - -// IsSSN will validate the given string as a U.S. Social Security Number -func IsSSN(str string) bool { - if str == "" || len(str) != 11 { - return false - } - return rxSSN.MatchString(str) -} - -// IsSemver checks if string is valid semantic version -func IsSemver(str string) bool { - return rxSemver.MatchString(str) -} - -// IsType checks if interface is of some type -func IsType(v interface{}, params ...string) bool { - if len(params) == 1 { - typ := params[0] - return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) - } - return false -} - -// IsTime checks if string is valid according to given format -func IsTime(str string, format string) bool { - _, err := time.Parse(format, str) - return err == nil -} - -// IsUnixTime checks if string is valid unix timestamp value -func IsUnixTime(str string) bool { - if _, err := strconv.Atoi(str); err == nil { - return true - } - return false -} - -// IsRFC3339 checks if string is valid timestamp value according to RFC3339 -func IsRFC3339(str string) bool { - return IsTime(str, time.RFC3339) -} - -// IsRFC3339WithoutZone checks if string is valid timestamp value according to RFC3339 which excludes the timezone. -func IsRFC3339WithoutZone(str string) bool { - return IsTime(str, rfc3339WithoutZone) -} - -// IsISO4217 checks if string is valid ISO currency code -func IsISO4217(str string) bool { - for _, currency := range ISO4217List { - if str == currency { - return true - } - } - - return false -} - -// ByteLength checks string's length -func ByteLength(str string, params ...string) bool { - if len(params) == 2 { - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return len(str) >= int(min) && len(str) <= int(max) - } - - return false -} - -// RuneLength checks string's length -// Alias for StringLength -func RuneLength(str string, params ...string) bool { - return StringLength(str, params...) -} - -// IsRsaPub checks whether string is valid RSA key -// Alias for IsRsaPublicKey -func IsRsaPub(str string, params ...string) bool { - if len(params) == 1 { - len, _ := ToInt(params[0]) - return IsRsaPublicKey(str, int(len)) - } - - return false -} - -// StringMatches checks if a string matches a given pattern. -func StringMatches(s string, params ...string) bool { - if len(params) == 1 { - pattern := params[0] - return Matches(s, pattern) - } - return false -} - -// StringLength checks string's length (including multi byte strings) -func StringLength(str string, params ...string) bool { - - if len(params) == 2 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - max, _ := ToInt(params[1]) - return strLength >= int(min) && strLength <= int(max) - } - - return false -} - -// MinStringLength checks string's minimum length (including multi byte strings) -func MinStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - min, _ := ToInt(params[0]) - return strLength >= int(min) - } - - return false -} - -// MaxStringLength checks string's maximum length (including multi byte strings) -func MaxStringLength(str string, params ...string) bool { - - if len(params) == 1 { - strLength := utf8.RuneCountInString(str) - max, _ := ToInt(params[0]) - return strLength <= int(max) - } - - return false -} - -// Range checks string's length -func Range(str string, params ...string) bool { - if len(params) == 2 { - value, _ := ToFloat(str) - min, _ := ToFloat(params[0]) - max, _ := ToFloat(params[1]) - return InRange(value, min, max) - } - - return false -} - -// IsInRaw checks if string is in list of allowed values -func IsInRaw(str string, params ...string) bool { - if len(params) == 1 { - rawParams := params[0] - - parsedParams := strings.Split(rawParams, "|") - - return IsIn(str, parsedParams...) - } - - return false -} - -// IsIn checks if string str is a member of the set of strings params -func IsIn(str string, params ...string) bool { - for _, param := range params { - if str == param { - return true - } - } - - return false -} - -func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) { - if nilPtrAllowedByRequired { - k := v.Kind() - if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() { - return true, nil - } - } - - if requiredOption, isRequired := options["required"]; isRequired { - if len(requiredOption.customErrorMessage) > 0 { - return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}} - } - return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}} - } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional { - return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}} - } - // not required and empty is valid - return true, nil -} - -func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) { - if !v.IsValid() { - return false, nil - } - - tag := t.Tag.Get(tagName) - - // checks if the field should be ignored - switch tag { - case "": - if v.Kind() != reflect.Slice && v.Kind() != reflect.Map { - if !fieldsRequiredByDefault { - return true, nil - } - return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}} - } - case "-": - return true, nil - } - - isRootType := false - if options == nil { - isRootType = true - options = parseTagIntoMap(tag) - } - - if isEmptyValue(v) { - // an empty value is not validated, checks only required - isValid, resultErr = checkRequired(v, t, options) - for key := range options { - delete(options, key) - } - return isValid, resultErr - } - - var customTypeErrors Errors - optionsOrder := options.orderedKeys() - for _, validatorName := range optionsOrder { - validatorStruct := options[validatorName] - if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok { - delete(options, validatorName) - - if result := validatefunc(v.Interface(), o.Interface()); !result { - if len(validatorStruct.customErrorMessage) > 0 { - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)}) - continue - } - customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)}) - } - } - } - - if len(customTypeErrors.Errors()) > 0 { - return false, customTypeErrors - } - - if isRootType { - // Ensure that we've checked the value by all specified validators before report that the value is valid - defer func() { - delete(options, "optional") - delete(options, "required") - - if isValid && resultErr == nil && len(options) != 0 { - optionsOrder := options.orderedKeys() - for _, validator := range optionsOrder { - isValid = false - resultErr = Error{t.Name, fmt.Errorf( - "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}} - return - } - } - }() - } - - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for interface param validators - for key, value := range InterfaceParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := InterfaceParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - field := fmt.Sprint(v) - if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - } - } - - switch v.Kind() { - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Float32, reflect.Float64, - reflect.String: - // for each tag option checks the map of validator functions - for _, validatorSpec := range optionsOrder { - validatorStruct := options[validatorSpec] - var negate bool - validator := validatorSpec - customMsgExists := len(validatorStruct.customErrorMessage) > 0 - - // checks whether the tag looks like '!something' or 'something' - if validator[0] == '!' { - validator = validator[1:] - negate = true - } - - // checks for param validators - for key, value := range ParamTagRegexMap { - ps := value.FindStringSubmatch(validator) - if len(ps) == 0 { - continue - } - - validatefunc, ok := ParamTagMap[key] - if !ok { - continue - } - - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - // type not yet supported, fail - return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}} - } - } - - if validatefunc, ok := TagMap[validator]; ok { - delete(options, validatorSpec) - - switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - field := fmt.Sprint(v) // make value into string, then validate with regex - if result := validatefunc(field); !result && !negate || result && negate { - if customMsgExists { - return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - if negate { - return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} - } - default: - //Not Yet Supported Types (Fail here!) - err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v) - return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}} - } - } - } - return true, nil - case reflect.Map: - if v.Type().Key().Kind() != reflect.String { - return false, &UnsupportedTypeError{v.Type()} - } - var sv stringValues - sv = v.MapKeys() - sort.Sort(sv) - result := true - for i, k := range sv { - var resultItem bool - var err error - if v.MapIndex(k).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.MapIndex(k), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.MapIndex(k).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+sv[i].Interface().(string)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Slice, reflect.Array: - result := true - for i := 0; i < v.Len(); i++ { - var resultItem bool - var err error - if v.Index(i).Kind() != reflect.Struct { - resultItem, err = typeCheck(v.Index(i), t, o, options) - if err != nil { - return false, err - } - } else { - resultItem, err = ValidateStruct(v.Index(i).Interface()) - if err != nil { - err = prependPathToErrors(err, t.Name+"."+strconv.Itoa(i)) - return false, err - } - } - result = result && resultItem - } - return result, nil - case reflect.Interface: - // If the value is an interface then encode its element - if v.IsNil() { - return true, nil - } - return ValidateStruct(v.Interface()) - case reflect.Ptr: - // If the value is a pointer then checks its element - if v.IsNil() { - return true, nil - } - return typeCheck(v.Elem(), t, o, options) - case reflect.Struct: - return true, nil - default: - return false, &UnsupportedTypeError{v.Type()} - } -} - -func stripParams(validatorString string) string { - return paramsRegexp.ReplaceAllString(validatorString, "") -} - -// isEmptyValue checks whether value empty or not -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.String, reflect.Array: - return v.Len() == 0 - case reflect.Map, reflect.Slice: - return v.Len() == 0 || v.IsNil() - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - - return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) -} - -// ErrorByField returns error for specified field of the struct -// validated by ValidateStruct or empty string if there are no errors -// or this field doesn't exists or doesn't have any errors. -func ErrorByField(e error, field string) string { - if e == nil { - return "" - } - return ErrorsByField(e)[field] -} - -// ErrorsByField returns map of errors of the struct validated -// by ValidateStruct or empty map if there are no errors. -func ErrorsByField(e error) map[string]string { - m := make(map[string]string) - if e == nil { - return m - } - // prototype for ValidateStruct - - switch e := e.(type) { - case Error: - m[e.Name] = e.Err.Error() - case Errors: - for _, item := range e.Errors() { - n := ErrorsByField(item) - for k, v := range n { - m[k] = v - } - } - } - - return m -} - -// Error returns string equivalent for reflect.Type -func (e *UnsupportedTypeError) Error() string { - return "validator: unsupported type: " + e.Type.String() -} - -func (sv stringValues) Len() int { return len(sv) } -func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } -func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) } -func (sv stringValues) get(i int) string { return sv[i].String() } - -func IsE164(str string) bool { - return rxE164.MatchString(str) -} diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml deleted file mode 100644 index bc5f7b0864..0000000000 --- a/vendor/github.com/asaskevich/govalidator/wercker.yml +++ /dev/null @@ -1,15 +0,0 @@ -box: golang -build: - steps: - - setup-go-workspace - - - script: - name: go get - code: | - go version - go get -t ./... - - - script: - name: go test - code: | - go test -race -v ./... diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 3b9a5becc2..57bfbfb694 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.41.2" +const goModuleVersion = "1.41.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index 9900b32254..ba519e46f7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.7.8 (2026-03-23) + +* No change notes available for this release. + +# v1.7.7 (2026-03-13) + +* **Bug Fix**: Replace usages of the old ioutil/ package throughout the SDK. + +# v1.7.6 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 + # v1.7.5 (2026-02-23) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go index 151054971a..ca4394f8bf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go @@ -82,9 +82,9 @@ type decodedHeaders Headers func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { var jsonHeaders []struct { - Name string `json:"name"` - Type valueType `json:"type"` - Value interface{} `json:"value"` + Name string `json:"name"` + Type valueType `json:"type"` + Value any `json:"value"` } decoder := json.NewDecoder(bytes.NewReader(b)) @@ -106,7 +106,7 @@ func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { return nil } -func valueFromType(typ valueType, val interface{}) (Value, error) { +func valueFromType(typ valueType, val any) (Value, error) { switch typ { case trueValueType: return BoolValue(true), nil @@ -139,6 +139,6 @@ func valueFromType(typ valueType, val interface{}) (Value, error) { copy(tv[:], v) return tv, err default: - panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val)) + return nil, fmt.Errorf("unable to decode unknown type, %s, %T", typ.String(), val) } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go index f03ee4b934..61cf7238d9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go @@ -157,7 +157,7 @@ func EncodeHeaders(w io.Writer, headers Headers) error { return nil } -func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...interface{}) error { +func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...any) error { for _, v := range vs { if err := binary.Write(w, order, v); err != nil { return err diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go index 5481ef3079..7616214dd6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go @@ -7,7 +7,7 @@ type LengthError struct { Part string Want int Have int - Value interface{} + Value any } func (e LengthError) Error() string { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index d6984dcb03..77ac62d524 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.7.5" +const goModuleVersion = "1.7.8" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go index f6f8c5674e..b5aacca00e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go @@ -34,7 +34,7 @@ func (hs *Headers) Set(name string, value Value) { // Get returns the Value associated with the header. Nil is returned if the // value does not exist. func (hs Headers) Get(name string) Value { - for i := 0; i < len(hs); i++ { + for i := range hs { if h := hs[i]; h.Name == name { return h.Value } @@ -151,7 +151,7 @@ func decodeHeaderValue(r io.Reader) (Value, error) { err = tv.decode(r) v = tv default: - panic(fmt.Sprintf("unknown value type %d", raw.Type)) + return nil, fmt.Errorf("unable to decode header of unknown value type %d", raw.Type) } // Error could be EOF, let caller deal with it diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go index 423b6bb26c..61ed35366d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go @@ -62,7 +62,7 @@ type rawValue struct { Value []byte // byte representation of value, BigEndian encoding. } -func (r rawValue) encodeScalar(w io.Writer, v interface{}) error { +func (r rawValue) encodeScalar(w io.Writer, v any) error { return binaryWriteFields(w, binary.BigEndian, r.Type, v, @@ -158,7 +158,7 @@ func decodeStringValue(r io.Reader) (string, error) { // Value represents the abstract header value. type Value interface { - Get() interface{} + Get() any String() string valueType() valueType encode(io.Writer) error @@ -169,7 +169,7 @@ type Value interface { type BoolValue bool // Get returns the underlying type -func (v BoolValue) Get() interface{} { +func (v BoolValue) Get() any { return bool(v) } @@ -196,7 +196,7 @@ func (v BoolValue) encode(w io.Writer) error { type Int8Value int8 // Get returns the underlying value. -func (v Int8Value) Get() interface{} { +func (v Int8Value) Get() any { return int8(v) } @@ -234,7 +234,7 @@ func (v *Int8Value) decode(r io.Reader) error { type Int16Value int16 // Get returns the underlying value. -func (v Int16Value) Get() interface{} { +func (v Int16Value) Get() any { return int16(v) } @@ -271,7 +271,7 @@ func (v *Int16Value) decode(r io.Reader) error { type Int32Value int32 // Get returns the underlying value. -func (v Int32Value) Get() interface{} { +func (v Int32Value) Get() any { return int32(v) } @@ -308,7 +308,7 @@ func (v *Int32Value) decode(r io.Reader) error { type Int64Value int64 // Get returns the underlying value. -func (v Int64Value) Get() interface{} { +func (v Int64Value) Get() any { return int64(v) } @@ -345,7 +345,7 @@ func (v *Int64Value) decode(r io.Reader) error { type BytesValue []byte // Get returns the underlying value. -func (v BytesValue) Get() interface{} { +func (v BytesValue) Get() any { return []byte(v) } @@ -383,7 +383,7 @@ func (v *BytesValue) decode(r io.Reader) error { type StringValue string // Get returns the underlying value. -func (v StringValue) Get() interface{} { +func (v StringValue) Get() any { return string(v) } @@ -421,7 +421,7 @@ func (v *StringValue) decode(r io.Reader) error { type TimestampValue time.Time // Get returns the underlying value. -func (v TimestampValue) Get() interface{} { +func (v TimestampValue) Get() any { return time.Time(v) } @@ -478,7 +478,7 @@ func timeFromEpochMilli(t int64) time.Time { type UUIDValue [16]byte // Get returns the underlying value. -func (v UUIDValue) Get() interface{} { +func (v UUIDValue) Get() any { return v[:] } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go index 3603447911..39efd848cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go @@ -3,7 +3,7 @@ package query import ( "context" "fmt" - "io/ioutil" + "io" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -52,7 +52,7 @@ func (m *asGetRequest) HandleSerialize( delim = "&" } - b, err := ioutil.ReadAll(stream) + b, err := io.ReadAll(stream) if err != nil { return out, metadata, fmt.Errorf("unable to get request body %w", err) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index 5549922ab8..52acb62f91 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -6,6 +6,7 @@ import ( "fmt" "strconv" "strings" + "sync/atomic" "time" internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" @@ -43,6 +44,10 @@ type Attempt struct { // A Meter instance for recording retry-related metrics. OperationMeter metrics.Meter + // Initial clock skew that would have been saved from a previous operation + // call. + ClientSkew *atomic.Int64 + retryer aws.RetryerV2 requestCloner RequestCloner } @@ -82,8 +87,12 @@ func (r Attempt) logf(logger logging.Logger, classification logging.Classificati func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) ( out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error, ) { - var attemptNum int var attemptClockSkew time.Duration + if r.ClientSkew != nil { + attemptClockSkew = time.Duration(r.ClientSkew.Load()) + } + + var attemptNum int var attemptResults AttemptResults maxAttempts := r.retryer.MaxAttempts() @@ -99,6 +108,8 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn attemptInput := in attemptInput.Request = r.requestCloner(attemptInput.Request) + ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) + // Record the metadata for the for attempt being started. attemptCtx := setRetryMetadata(ctx, retryMetadata{ AttemptNum: attemptNum, @@ -107,9 +118,6 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn AttemptClockSkew: attemptClockSkew, }) - // Setting clock skew to be used on other context (like signing) - ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) - var attemptResult AttemptResult attemptCtx, span := tracing.StartSpan(attemptCtx, "Attempt", func(o *tracing.SpanOptions) { @@ -149,6 +157,14 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn } } + // this guarantees we are staying on top of the persistent skew value + // (either to apply it or to heal it back if the clocks realign) + if r.ClientSkew != nil { + if resultSkew, ok := awsmiddle.GetAttemptSkew(metadata); ok { + r.ClientSkew.Store(resultSkew.Nanoseconds()) + } + } + addAttemptResults(&metadata, attemptResults) return out, metadata, err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go index c7ef0acc4d..49cc31205c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go @@ -300,6 +300,17 @@ func limitedRedirect(r *http.Request, via []*http.Request) error { switch resp.StatusCode { case 307, 308: // Only allow 307 and 308 redirects as they preserve the method. + + // If redirecting to a different host, remove X-Amz-Security-Token header + // to prevent credentials from being sent to a different host, similar to + // how Authorization header is handled by the HTTP client. + if len(via) > 0 { + lastRequest := via[len(via)-1] + if lastRequest.URL.Host != r.URL.Host { + r.Header.Del("X-Amz-Security-Token") + } + } + return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 15dd8fc767..1def5e2d9f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,17 @@ +# v1.4.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.18 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go index cd4d19b898..bd731e5f58 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go @@ -14,7 +14,7 @@ type EnableEndpointDiscoveryProvider interface { // ResolveEnableEndpointDiscovery extracts the first instance of a EnableEndpointDiscoveryProvider from the config slice. // Additionally returns a aws.EndpointDiscoveryEnableState to indicate if the value was found in provided configs, // and error if one is encountered. -func ResolveEnableEndpointDiscovery(ctx context.Context, configs []interface{}) (value aws.EndpointDiscoveryEnableState, found bool, err error) { +func ResolveEnableEndpointDiscovery(ctx context.Context, configs []any) (value aws.EndpointDiscoveryEnableState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(EnableEndpointDiscoveryProvider); ok { value, found, err = p.GetEnableEndpointDiscovery(ctx) @@ -33,7 +33,7 @@ type UseDualStackEndpointProvider interface { // ResolveUseDualStackEndpoint extracts the first instance of a UseDualStackEndpoint from the config slice. // Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseDualStackEndpoint(ctx context.Context, configs []interface{}) (value aws.DualStackEndpointState, found bool, err error) { +func ResolveUseDualStackEndpoint(ctx context.Context, configs []any) (value aws.DualStackEndpointState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(UseDualStackEndpointProvider); ok { value, found, err = p.GetUseDualStackEndpoint(ctx) @@ -52,7 +52,7 @@ type UseFIPSEndpointProvider interface { // ResolveUseFIPSEndpoint extracts the first instance of a UseFIPSEndpointProvider from the config slice. // Additionally, returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseFIPSEndpoint(ctx context.Context, configs []interface{}) (value aws.FIPSEndpointState, found bool, err error) { +func ResolveUseFIPSEndpoint(ctx context.Context, configs []any) (value aws.FIPSEndpointState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(UseFIPSEndpointProvider); ok { value, found, err = p.GetUseFIPSEndpoint(ctx) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go index e7835f8524..1ebe8f4a8a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go @@ -26,7 +26,7 @@ type IgnoreConfiguredEndpointsProvider interface { // Currently duplicated from github.com/aws/aws-sdk-go-v2/config because // service packages cannot import github.com/aws/aws-sdk-go-v2/config // due to result import cycle error. -func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) { +func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []any) (value bool, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok { value, found, err = p.GetIgnoreConfiguredEndpoints(ctx) @@ -40,7 +40,7 @@ func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (v // ResolveServiceBaseEndpoint is used to retrieve service endpoints from configured sources // while allowing for configured endpoints to be disabled -func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []interface{}) (value string, found bool, err error) { +func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []any) (value string, found bool, err error) { if val, found, _ := GetIgnoreConfiguredEndpoints(ctx, configs); found && val { return "", false, nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 20f6e59e19..548da96016 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.18" +const goModuleVersion = "1.4.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index d05b70ee58..a2a1c183ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,17 @@ +# v2.7.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.18 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go index 32251a7e3c..b425031cb3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go @@ -101,7 +101,7 @@ func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, region = opts.ResolvedRegion } - for i := 0; i < len(ps); i++ { + for i := range ps { if !ps[i].canResolveEndpoint(region, opts) { continue } @@ -290,8 +290,8 @@ func getByPriority(s []string, p []string, def string) string { return def } - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { + for i := range p { + for j := range s { if s[j] == p[i] { return s[j] } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 46f9220785..03a0b8c038 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.18" +const goModuleVersion = "2.7.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go index 8e24a3f0a4..fb06d8dc05 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go @@ -3,15 +3,13 @@ package middleware import ( "context" "sync/atomic" - "time" - internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" "github.com/aws/smithy-go/middleware" ) -// AddTimeOffsetMiddleware sets a value representing clock skew on the request context. -// This can be read by other operations (such as signing) to correct the date value they send -// on the request +// AddTimeOffsetMiddleware is deprecated. +// +// Deprecated: handled in retry loop. type AddTimeOffsetMiddleware struct { Offset *atomic.Int64 } @@ -19,24 +17,16 @@ type AddTimeOffsetMiddleware struct { // ID the identifier for AddTimeOffsetMiddleware func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" } -// HandleBuild sets a value for attemptSkew on the request context if one is set on the client. +// HandleBuild is a no-op. func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( out middleware.BuildOutput, metadata middleware.Metadata, err error, ) { - if m.Offset != nil { - offset := time.Duration(m.Offset.Load()) - ctx = internalcontext.SetAttemptSkewContext(ctx, offset) - } return next.HandleBuild(ctx, in) } -// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer -// held by AddTimeOffsetMiddleware +// HandleDeserialize is a no-op. func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { - if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 { - m.Offset.Store(v.Nanoseconds()) - } return next.HandleDeserialize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index a6e8e11e1a..fa07036e8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,21 @@ +# v1.4.22 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.21 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.20 (2026-03-05) + +* **Bug Fix**: Read the correct auth property for SigV4A signing names. + +# v1.4.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.18 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index 16bfc9247f..a114a50f39 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.18" +const goModuleVersion = "1.4.22" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go index af4f6abcfa..c3b689bace 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/smithy.go @@ -63,7 +63,7 @@ func (v *SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, return fmt.Errorf("unexpected identity type: %T", identity) } - name, ok := smithyhttp.GetSigV4SigningName(&props) + name, ok := smithyhttp.GetSigV4ASigningName(&props) if !ok { return fmt.Errorf("sigv4a signing name is required") } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/v4a.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/v4a.go index f1f6ecc371..f226bcdced 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/v4a.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/v4a.go @@ -430,7 +430,7 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he var canonicalHeaders strings.Builder n := len(headers) const colon = ':' - for i := 0; i < n; i++ { + for i := range n { if headers[i] == hostHeader { canonicalHeaders.WriteString(hostHeader) canonicalHeaders.WriteRune(colon) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index 25384233ae..497d372304 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.13.7 (2026-03-13) + +* **Bug Fix**: Replace usages of the old ioutil/ package throughout the SDK. + +# v1.13.6 (2026-03-03) + +* **Dependency Update**: Bump minimum Go version to 1.24 + # v1.13.5 (2026-02-23) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index 596c9d5075..5679a2b2b1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.5" +const goModuleVersion = "1.13.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index f70232e3bb..efad62c1d1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,22 @@ +# v1.9.13 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.12 (2026-03-13) + +* **Bug Fix**: Replace usages of the old ioutil/ package throughout the SDK. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.11 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.10 (2026-02-26) + +* **Bug Fix**: Allow sending unkown checksum values if the value is precalculated on the input request + # v1.9.9 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index 707590fc9d..5eb9a2fdcb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.9.9" +const goModuleVersion = "1.9.13" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go index 274d649fb5..b1a46e58ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go @@ -13,7 +13,7 @@ type InputMiddlewareOptions struct { // // Given the input parameter value, the function must return the algorithm // and true, or false if no algorithm is specified. - GetAlgorithm func(interface{}) (string, bool) + GetAlgorithm func(any) (string, bool) // RequireChecksum indicates whether operation model forces middleware to compute the input payload's checksum. // If RequireChecksum is set to true, checksum will be calculated and RequestChecksumCalculation will be ignored, @@ -111,10 +111,10 @@ type OutputMiddlewareOptions struct { // // Given the input parameter value, the function must return the validation // mode and true, or false if no mode is specified. - GetValidationMode func(interface{}) (string, bool) + GetValidationMode func(any) (string, bool) // SetValidationMode is a function to set the checksum validation mode of input parameters - SetValidationMode func(interface{}, string) + SetValidationMode func(any, string) // ResponseChecksumValidation is the user config to opt-in/out response checksum validation ResponseChecksumValidation aws.ResponseChecksumValidation diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go index 348264bdb2..8ac7f776ee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go @@ -108,13 +108,7 @@ func (m *ComputeInputPayloadChecksum) HandleFinalize( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { var checksum string - algorithm, ok, err := getInputAlgorithm(ctx) - if err != nil { - return out, metadata, err - } - if !ok { - return next.HandleFinalize(ctx, in) - } + var algorithm Algorithm req, ok := in.Request.(*smithyhttp.Request) if !ok { @@ -137,13 +131,21 @@ func (m *ComputeInputPayloadChecksum) HandleFinalize( // If any checksum header is already set nothing to do. for header := range req.Header { h := strings.ToUpper(header) - if strings.HasPrefix(h, "X-AMZ-CHECKSUM-") { - algorithm = Algorithm(strings.TrimPrefix(h, "X-AMZ-CHECKSUM-")) + if after, ok0 := strings.CutPrefix(h, "X-AMZ-CHECKSUM-"); ok0 { + algorithm = Algorithm(after) checksum = req.Header.Get(header) return next.HandleFinalize(ctx, in) } } + algorithm, ok, err = getInputAlgorithm(ctx) + if err != nil { + return out, metadata, err + } + if !ok { + return next.HandleFinalize(ctx, in) + } + computePayloadHash := m.EnableComputePayloadHash if v := v4.GetPayloadHash(ctx); v != "" { computePayloadHash = false @@ -263,16 +265,6 @@ func (m *AddInputChecksumTrailer) HandleFinalize( ) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - algorithm, ok, err := getInputAlgorithm(ctx) - if err != nil { - return out, metadata, computeInputTrailingChecksumError{ - Msg: "failed to get algorithm", - Err: err, - } - } else if !ok { - return next.HandleFinalize(ctx, in) - } - if enabled, _ := middleware.GetStackValue(ctx, useTrailer{}).(bool); !enabled { return next.HandleFinalize(ctx, in) } @@ -297,6 +289,16 @@ func (m *AddInputChecksumTrailer) HandleFinalize( } } + algorithm, ok, err := getInputAlgorithm(ctx) + if err != nil { + return out, metadata, computeInputTrailingChecksumError{ + Msg: "failed to get algorithm", + Err: err, + } + } else if !ok { + return next.HandleFinalize(ctx, in) + } + stream := req.GetStream() streamLength, err := getRequestStreamLength(req) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go index 3347e88cce..1f77b33246 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go @@ -22,7 +22,7 @@ type SetupInputContext struct { // // Given the input parameter value, the function must return the algorithm // and true, or false if no algorithm is specified. - GetAlgorithm func(interface{}) (string, bool) + GetAlgorithm func(any) (string, bool) // RequireChecksum indicates whether operation model forces middleware to compute the input payload's checksum. // If RequireChecksum is set to true, checksum will be calculated and RequestChecksumCalculation will be ignored, @@ -68,10 +68,10 @@ type setupOutputContext struct { // // Given the input parameter value, the function must return the validation // mode and true, or false if no mode is specified. - GetValidationMode func(interface{}) (string, bool) + GetValidationMode func(any) (string, bool) // SetValidationMode is a function to set the checksum validation mode of input parameters - SetValidationMode func(interface{}, string) + SetValidationMode func(any, string) // ResponseChecksumValidation states user config to opt-in/out checksum validation ResponseChecksumValidation aws.ResponseChecksumValidation diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 825e994455..7c5e13816e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,17 @@ +# v1.13.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.18 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index 6e0d9cd74c..456855e885 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.18" +const goModuleVersion = "1.13.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go index 1e2f5c8122..8b25d03874 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go @@ -14,26 +14,26 @@ import ( // presigned URL. type URLPresigner interface { // PresignURL presigns a URL. - PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) + PresignURL(ctx context.Context, srcRegion string, params any) (*v4.PresignedHTTPRequest, error) } // ParameterAccessor provides an collection of accessor to for retrieving and // setting the values needed to PresignedURL generation type ParameterAccessor struct { // GetPresignedURL accessor points to a function that retrieves a presigned url if present - GetPresignedURL func(interface{}) (string, bool, error) + GetPresignedURL func(any) (string, bool, error) // GetSourceRegion accessor points to a function that retrieves source region for presigned url - GetSourceRegion func(interface{}) (string, bool, error) + GetSourceRegion func(any) (string, bool, error) // CopyInput accessor points to a function that takes in an input, and returns a copy. - CopyInput func(interface{}) (interface{}, error) + CopyInput func(any) (any, error) // SetDestinationRegion accessor points to a function that sets destination region on api input struct - SetDestinationRegion func(interface{}, string) error + SetDestinationRegion func(any, string) error // SetPresignedURL accessor points to a function that sets presigned url on api input struct - SetPresignedURL func(interface{}, string) error + SetPresignedURL func(any, string) error } // Options provides the set of options needed by the presigned URL middleware. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index 248bda676c..1e85da9382 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,17 @@ +# v1.19.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + # v1.19.18 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go index b51532085f..e6588b8ce4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go @@ -16,7 +16,7 @@ import ( type ARNLookup struct { // GetARNValue takes in a input interface and returns a ptr to string and a bool - GetARNValue func(interface{}) (*string, bool) + GetARNValue func(any) (*string, bool) } // ID for the middleware diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index b5bd1638db..e74f1c69e2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.19.18" +const goModuleVersion = "1.19.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go index 8573362430..94601e9a81 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go @@ -28,6 +28,6 @@ func (e *ResponseError) Error() string { // As populates target and returns true if the type of target is a error type that // the ResponseError embeds, (e.g.S3 HTTP ResponseError) -func (e *ResponseError) As(target interface{}) bool { +func (e *ResponseError) As(target any) bool { return errors.As(e.ResponseError, target) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index 845382a699..e8660d6d2a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,35 @@ +# v1.97.3 (2026-03-26) + +* **Bug Fix**: Fix a bug where a recorded clock skew could persist on the client even if the client and server clock ended up realigning. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.97.2 (2026-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.97.1 (2026-03-13) + +* **Bug Fix**: Replace usages of the old ioutil/ package throughout the SDK. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.97.0 (2026-03-12) + +* **Feature**: Adds support for account regional namespaces for general purpose buckets. The account regional namespace is a reserved subdivision of the global bucket namespace where only your account can create general purpose buckets. + +# v1.96.4 (2026-03-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.96.3 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.96.2 (2026-02-26) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.96.1 (2026-02-23) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go index e5e18d641c..9263839542 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go @@ -16,7 +16,6 @@ import ( internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" "github.com/aws/aws-sdk-go-v2/internal/v4a" acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum" @@ -25,7 +24,6 @@ import ( s3sharedconfig "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config" s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" @@ -758,10 +756,11 @@ func resolveIdempotencyTokenProvider(o *Options) { o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } -func addRetry(stack *middleware.Stack, o Options) error { +func addRetry(stack *middleware.Stack, o Options, c *Client) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/s3") + m.ClientSkew = c.timeOffset }) if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { return err @@ -832,18 +831,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - type httpSignerV4a interface { SignHTTP(ctx context.Context, credentials v4a.Credentials, r *http.Request, payloadHash, service string, regionSet []string, signingTime time.Time, @@ -864,13 +851,6 @@ func newDefaultV4aSigner(o Options) *v4a.Signer { }) } -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go index fe2eb303e6..41d05d6f54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go @@ -237,7 +237,7 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -264,9 +264,6 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go index 881f4c27da..9109addaa7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go @@ -520,7 +520,7 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -547,9 +547,6 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go index b50e49e346..e7c8a69ec3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go @@ -90,9 +90,11 @@ import ( // // - If the source object that you want to copy is in a directory bucket, you // must have the s3express:CreateSession permission in the Action element of a -// policy to read the object. By default, the session is in the ReadWrite mode. -// If you want to restrict the access, you can explicitly set the -// s3express:SessionMode condition key to ReadOnly on the copy source bucket. +// policy to read the object. If no session mode is specified, the session will be +// created with the maximum allowable privilege, attempting ReadWrite first, then +// ReadOnly if ReadWrite is not permitted. If you want to explicitly restrict the +// access to be read-only, you can set the s3express:SessionMode condition key to +// ReadOnly on the copy source bucket. // // - If the copy destination is a directory bucket, you must have the // s3express:CreateSession permission in the Action element of a policy to write @@ -979,7 +981,7 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -1006,9 +1008,6 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go index a889220ab1..33508514bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go @@ -25,6 +25,18 @@ import ( // There are two types of buckets: general purpose buckets and directory buckets. // For more information about these bucket types, see [Creating, configuring, and working with Amazon S3 buckets]in the Amazon S3 User Guide. // +// General purpose buckets exist in a global namespace, which means that each +// bucket name must be unique across all Amazon Web Services accounts in all the +// Amazon Web Services Regions within a partition. A partition is a grouping of +// Regions. Amazon Web Services currently has four partitions: aws (Standard +// Regions), aws-cn (China Regions), aws-us-gov (Amazon Web Services GovCloud +// (US)), and aws-eusc (European Sovereign Cloud). When you create a general +// purpose bucket, you can choose to create a bucket in the shared global namespace +// or you can choose to create a bucket in your account regional namespace. Your +// account regional namespace is a subdivision of the global namespace that only +// your account can create buckets in. For more information on account regional +// namespaces, see [Namespaces for general purpose buckets]. +// // - General purpose buckets - If you send your CreateBucket request to the // s3.amazonaws.com global endpoint, the request goes to the us-east-1 Region. So // the signature calculations in Signature Version 4 must use us-east-1 as the @@ -120,6 +132,7 @@ import ( // [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html // [Concepts for directory buckets in Local Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html // [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html +// [Namespaces for general purpose buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html // [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html // [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html // [Virtual hosting of buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html @@ -173,6 +186,27 @@ type CreateBucketInput struct { // This functionality is not supported for directory buckets. ACL types.BucketCannedACL + // Specifies the namespace where you want to create your general purpose bucket. + // When you create a general purpose bucket, you can choose to create a bucket in + // the shared global namespace or you can choose to create a bucket in your account + // regional namespace. Your account regional namespace is a subdivision of the + // global namespace that only your account can create buckets in. For more + // information on bucket namespaces, see [Namespaces for general purpose buckets]. + // + // General purpose buckets in your account regional namespace must follow a + // specific naming convention. These buckets consist of a bucket name prefix that + // you create, and a suffix that contains your 12-digit Amazon Web Services Account + // ID, the Amazon Web Services Region code, and ends with -an . Bucket names must + // follow the format bucket-name-prefix-accountId-region-an (for example, + // amzn-s3-demo-bucket-111122223333-us-west-2-an ). For information about bucket + // naming restrictions, see [Account regional namespace naming rules]in the Amazon S3 User Guide. + // + // This functionality is not supported for directory buckets. + // + // [Account regional namespace naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules + // [Namespaces for general purpose buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html + BucketNamespace types.BucketNamespace + // The configuration information for the bucket. CreateBucketConfiguration *types.CreateBucketConfiguration @@ -301,7 +335,7 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -328,9 +362,6 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataConfiguration.go index a46a907b85..66a605b0df 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataConfiguration.go @@ -160,7 +160,7 @@ func (c *Client) addOperationCreateBucketMetadataConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -187,9 +187,6 @@ func (c *Client) addOperationCreateBucketMetadataConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go index 6976b1ceff..a50b8df6ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go @@ -152,7 +152,7 @@ func (c *Client) addOperationCreateBucketMetadataTableConfigurationMiddlewares(s if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -179,9 +179,6 @@ func (c *Client) addOperationCreateBucketMetadataTableConfigurationMiddlewares(s if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go index 72d3d3331e..776ceb2c5c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go @@ -895,7 +895,7 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware. if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -922,9 +922,6 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware. if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go index 3b9f1a5ea3..65b52a5e9a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go @@ -234,11 +234,15 @@ type CreateSessionInput struct { ServerSideEncryption types.ServerSideEncryption // Specifies the mode of the session that will be created, either ReadWrite or - // ReadOnly . By default, a ReadWrite session is created. A ReadWrite session is - // capable of executing all the Zonal endpoint API operations on a directory - // bucket. A ReadOnly session is constrained to execute the following Zonal - // endpoint API operations: GetObject , HeadObject , ListObjectsV2 , - // GetObjectAttributes , ListParts , and ListMultipartUploads . + // ReadOnly . If no session mode is specified, the default behavior attempts to + // create a session with the maximum allowable privilege. It will first attempt to + // create a ReadWrite session, and if that is not allowed by permissions, it will + // attempt to create a ReadOnly session. If neither session type is allowed, the + // request will return an Access Denied error. A ReadWrite session is capable of + // executing all the Zonal endpoint API operations on a directory bucket. A + // ReadOnly session is constrained to execute the following Zonal endpoint API + // operations: GetObject , HeadObject , ListObjectsV2 , GetObjectAttributes , + // ListParts , and ListMultipartUploads . SessionMode types.SessionMode noSmithyDocumentSerde @@ -320,7 +324,7 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -347,9 +351,6 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go index 676ac76be5..caf071af7d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go @@ -150,7 +150,7 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -177,9 +177,6 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go index 9fef769a8e..bf79ffa0de 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go @@ -125,7 +125,7 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -152,9 +152,6 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go index aa91cea7e9..618ddae1d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go @@ -113,7 +113,7 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -140,9 +140,6 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go index a7fbc308a4..41551b3765 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go @@ -150,7 +150,7 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -177,9 +177,6 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go index 2e59d7e551..6318458492 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go @@ -132,7 +132,7 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -159,9 +159,6 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go index 86511bbb24..2843aa2db8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go @@ -125,7 +125,7 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -152,9 +152,6 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go index e74e538dee..eeb9eb991e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go @@ -152,7 +152,7 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware. if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -179,9 +179,6 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware. if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataConfiguration.go index adbaa342e4..132d9b2fae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataConfiguration.go @@ -125,7 +125,7 @@ func (c *Client) addOperationDeleteBucketMetadataConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -152,9 +152,6 @@ func (c *Client) addOperationDeleteBucketMetadataConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go index 1300dac9dd..fe51b00914 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go @@ -132,7 +132,7 @@ func (c *Client) addOperationDeleteBucketMetadataTableConfigurationMiddlewares(s if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -159,9 +159,6 @@ func (c *Client) addOperationDeleteBucketMetadataTableConfigurationMiddlewares(s if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go index cd65675d90..4113dfce24 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -129,7 +129,7 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack * if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -156,9 +156,6 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack * if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go index eba1b6675d..d69c1b83cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go @@ -110,7 +110,7 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -137,9 +137,6 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go index 4febe901d8..e4d25e2ed1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go @@ -162,7 +162,7 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -189,9 +189,6 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go index 990841f3c7..5c8a829158 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go @@ -120,7 +120,7 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -147,9 +147,6 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go index d46c4a1350..460ae7e667 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go @@ -19,9 +19,6 @@ import ( // (ABAC) is not enabled for the bucket. When you [enable ABAC for a general purpose bucket], you can no longer use this // operation for that bucket and must use [UntagResource]instead. // -// if ABAC is not enabled for the bucket. When you [enable ABAC for a general purpose bucket], you can no longer use this -// operation for that bucket and must use [UntagResource]instead. -// // To use this operation, you must have permission to perform the // s3:PutBucketTagging action. By default, the bucket owner has this permission and // can grant this permission to others. @@ -117,7 +114,7 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -144,9 +141,6 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go index 6436483541..9300b3ce54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go @@ -119,7 +119,7 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -146,9 +146,6 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go index b6cfa523c3..4f8e54f7cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go @@ -325,7 +325,7 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -352,9 +352,6 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go index f8a5a185eb..e2ff27afef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go @@ -147,7 +147,7 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -174,9 +174,6 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go index 609581a312..8211cf7eef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go @@ -324,7 +324,7 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -351,9 +351,6 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go index baa8173c42..36b4d8c0e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go @@ -119,7 +119,7 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -146,9 +146,6 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAbac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAbac.go index 1d57cd2093..cfcbd034fd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAbac.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAbac.go @@ -97,7 +97,7 @@ func (c *Client) addOperationGetBucketAbacMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -124,9 +124,6 @@ func (c *Client) addOperationGetBucketAbacMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go index 8ae052c841..50d259f3bc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go @@ -149,7 +149,7 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack * if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -176,9 +176,6 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack * if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go index 8c7b449dc1..dec4bb2139 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go @@ -142,7 +142,7 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -169,9 +169,6 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go index 83c23dc0e4..abbb68075d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go @@ -131,7 +131,7 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -158,9 +158,6 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go index d46b1a3758..0d0ba16938 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go @@ -141,7 +141,7 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -168,9 +168,6 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go index f99e96ca1f..9b075e58b6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go @@ -159,7 +159,7 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -186,9 +186,6 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go index 9ff70f9ab6..e74e5ed666 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go @@ -137,7 +137,7 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -164,9 +164,6 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go index 8c39d00548..d88552dec8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go @@ -130,7 +130,7 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -157,9 +157,6 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go index b91ca5ffc0..13e69dd1cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -196,7 +196,7 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -223,9 +223,6 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go index 7b61199a97..6cea653acd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go @@ -160,7 +160,7 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -190,9 +190,6 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go index 6387c434ce..11319d78cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go @@ -116,7 +116,7 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -143,9 +143,6 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataConfiguration.go index 4585291887..6b4b91c5f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataConfiguration.go @@ -129,7 +129,7 @@ func (c *Client) addOperationGetBucketMetadataConfigurationMiddlewares(stack *mi if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -156,9 +156,6 @@ func (c *Client) addOperationGetBucketMetadataConfigurationMiddlewares(stack *mi if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go index dcf5355e11..945642c37f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go @@ -137,7 +137,7 @@ func (c *Client) addOperationGetBucketMetadataTableConfigurationMiddlewares(stac if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -164,9 +164,6 @@ func (c *Client) addOperationGetBucketMetadataTableConfigurationMiddlewares(stac if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go index ea5293f95d..17f4dfd2e6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -133,7 +133,7 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -160,9 +160,6 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go index a651f59c4d..ed84a57b03 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -156,7 +156,7 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -183,9 +183,6 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go index 1bc4048f8c..31b8377bd6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go @@ -126,7 +126,7 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -153,9 +153,6 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go index ce97110825..eaefad9303 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go @@ -182,7 +182,7 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -209,9 +209,6 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go index 2edef93bbc..2ccf9670bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go @@ -124,7 +124,7 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware. if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -151,9 +151,6 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware. if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go index 338fb39b39..666cfae3db 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go @@ -131,7 +131,7 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -158,9 +158,6 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go index 64411ad6b4..d4136f2431 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go @@ -110,7 +110,7 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -137,9 +137,6 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go index c5bb22aac3..cf95e4e6c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go @@ -18,9 +18,6 @@ import ( // // Returns the tag set associated with the general purpose bucket. // -// if ABAC is not enabled for the bucket. When you [enable ABAC for a general purpose bucket], you can no longer use this -// operation for that bucket and must use [ListTagsForResource]instead. -// // To use this operation, you must have permission to perform the // s3:GetBucketTagging action. By default, the bucket owner has this permission and // can grant this permission to others. @@ -42,9 +39,7 @@ import ( // URL encode this value to my%20%20file.txt . // // [PutBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html -// [enable ABAC for a general purpose bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging-enable-abac.html // [DeleteBucketTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html -// [ListTagsForResource]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListTagsForResource.html func (c *Client) GetBucketTagging(ctx context.Context, params *GetBucketTaggingInput, optFns ...func(*Options)) (*GetBucketTaggingOutput, error) { if params == nil { params = &GetBucketTaggingInput{} @@ -128,7 +123,7 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -155,9 +150,6 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go index 0ea2905066..f0f53cc04a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go @@ -125,7 +125,7 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -152,9 +152,6 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go index b3ed6e4dc8..7838fd0f3d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go @@ -129,7 +129,7 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -156,9 +156,6 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go index af0ed08e73..c43d23916a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go @@ -708,7 +708,7 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -732,9 +732,6 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go index 75cfdee0cb..bcc3307f1e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go @@ -178,7 +178,7 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -205,9 +205,6 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go index ca742517c6..609f1bd18c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go @@ -404,7 +404,7 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -431,9 +431,6 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go index e855ece46a..323bf44684 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go @@ -143,7 +143,7 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -170,9 +170,6 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go index 8be2b56fb8..eb241a994a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go @@ -123,7 +123,7 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -150,9 +150,6 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go index c65cde1166..7cffef4bde 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go @@ -143,7 +143,7 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -170,9 +170,6 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go index 24e5f525b8..242167dfd0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go @@ -172,7 +172,7 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -199,9 +199,6 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go index f49b13dae3..586ac8441a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go @@ -142,7 +142,7 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -166,9 +166,6 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go index 070e9add50..4dfbafff1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go @@ -137,7 +137,7 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -164,9 +164,6 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go index 29e413e143..7140f3aabf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go @@ -52,9 +52,11 @@ import ( // information about permissions, see [Managing access permissions to your Amazon S3 resources]in the Amazon S3 User Guide. // // - Directory bucket permissions - You must have the s3express:CreateSession -// permission in the Action element of a policy. By default, the session is in -// the ReadWrite mode. If you want to restrict the access, you can explicitly set -// the s3express:SessionMode condition key to ReadOnly on the bucket. +// permission in the Action element of a policy. If no session mode is specified, +// the session will be created with the maximum allowable privilege, attempting +// ReadWrite first, then ReadOnly if ReadWrite is not permitted. If you want to +// explicitly restrict the access to be read-only, you can set the +// s3express:SessionMode condition key to ReadOnly on the bucket. // // For more information about example bucket policies, see [Example bucket policies for S3 Express One Zone]and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]in the Amazon S3 // @@ -229,7 +231,7 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -256,9 +258,6 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go index 0b36228e07..4ef0eb9b3c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go @@ -713,7 +713,7 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -740,9 +740,6 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go index dadb149af3..f5cbeeab1e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go @@ -151,7 +151,7 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -178,9 +178,6 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go index 3456ca9d47..ac695fc04b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go @@ -150,7 +150,7 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -177,9 +177,6 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go index e8f72db9dc..59ebd6abf8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go @@ -153,7 +153,7 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -180,9 +180,6 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go index 998a7b6845..fd79d8c536 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go @@ -155,7 +155,7 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -182,9 +182,6 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go index ce0c5d4e69..ab62cb3f95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go @@ -150,7 +150,7 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -177,9 +177,6 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go index 4fcf9258bd..0f3c39c193 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go @@ -130,7 +130,7 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -157,9 +157,6 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go index fe27253e0f..675423107d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go @@ -391,7 +391,7 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -418,9 +418,6 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go index e9da79c0ce..d57b5aa699 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go @@ -256,7 +256,7 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -283,9 +283,6 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go index b524539688..2fe4b6c232 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go @@ -281,7 +281,7 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -308,9 +308,6 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go index f61df6e9ca..04325f6fc0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go @@ -375,7 +375,7 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -402,9 +402,6 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go index 15836da779..a77445d3e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go @@ -354,7 +354,7 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -381,9 +381,6 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAbac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAbac.go index 6bba5d90b1..fcd69b6007 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAbac.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAbac.go @@ -124,7 +124,7 @@ func (c *Client) addOperationPutBucketAbacMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -151,9 +151,6 @@ func (c *Client) addOperationPutBucketAbacMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go index 6fed987c41..b1a93c086f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go @@ -153,7 +153,7 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack * if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -180,9 +180,6 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack * if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go index 25aaf33d48..77a257f109 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go @@ -310,7 +310,7 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -337,9 +337,6 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go index 469ad37e1b..ad39341f65 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -166,7 +166,7 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -193,9 +193,6 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go index 65ff2da330..0cb3ef3e31 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go @@ -175,7 +175,7 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -202,9 +202,6 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go index 8a84adbf2d..dab33f3ea7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go @@ -253,7 +253,7 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -280,9 +280,6 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go index 715d193d33..5319a3bedd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go @@ -158,7 +158,7 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -185,9 +185,6 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go index 8138acc84c..26ce2cbf12 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -175,7 +175,7 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -202,9 +202,6 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go index d9f556c219..d29a5a1aa0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -262,7 +262,7 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -289,9 +289,6 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go index 15b3fcc1ab..64d7f89971 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go @@ -195,7 +195,7 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -222,9 +222,6 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go index 5e1ad6a1e7..7f02b4a343 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -144,7 +144,7 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -171,9 +171,6 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go index 5eb942ee89..699d080ecf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -158,7 +158,7 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -185,9 +185,6 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go index 3f21272002..158209ac8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go @@ -137,7 +137,7 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -164,9 +164,6 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go index a96c3fb0ca..22ed5fdc27 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go @@ -225,7 +225,7 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -252,9 +252,6 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go index dc36ec94bf..e131580b24 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go @@ -193,7 +193,7 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -220,9 +220,6 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go index 25504da9f1..a1e928dd4c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go @@ -140,7 +140,7 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -167,9 +167,6 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go index 50ff225110..380bfbaab8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go @@ -177,7 +177,7 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -204,9 +204,6 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go index 1d9154e2e8..624d097afa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go @@ -183,7 +183,7 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -210,9 +210,6 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go index a558715e8c..cffa381d68 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go @@ -195,7 +195,7 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -222,9 +222,6 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go index 5af7a7ea28..b781048d54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go @@ -881,7 +881,7 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -908,9 +908,6 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go index ff5cf99ab7..595970ba5d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go @@ -365,7 +365,7 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -392,9 +392,6 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go index 73e5e730fc..0802b9247d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go @@ -168,7 +168,7 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -195,9 +195,6 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go index 96318bc586..1a54c63d1e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go @@ -157,7 +157,7 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -184,9 +184,6 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go index 86c97d2f91..7c8b7a9aca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go @@ -175,7 +175,7 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -202,9 +202,6 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go index a6838041ec..f36d544882 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go @@ -201,7 +201,7 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -228,9 +228,6 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go index 9554112593..5a81ef8a6c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go @@ -159,7 +159,7 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -186,9 +186,6 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RenameObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RenameObject.go index a97b8f2974..ecd6ac49dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RenameObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RenameObject.go @@ -206,7 +206,7 @@ func (c *Client) addOperationRenameObjectMiddlewares(stack *middleware.Stack, op if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -233,9 +233,6 @@ func (c *Client) addOperationRenameObjectMiddlewares(stack *middleware.Stack, op if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go index ce162b9251..a4e5b38181 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go @@ -311,7 +311,7 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -338,9 +338,6 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go index f9ad31539a..45196304d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go @@ -269,7 +269,7 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -290,9 +290,6 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataInventoryTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataInventoryTableConfiguration.go index aff76062c1..612c8c5cc1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataInventoryTableConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataInventoryTableConfiguration.go @@ -151,7 +151,7 @@ func (c *Client) addOperationUpdateBucketMetadataInventoryTableConfigurationMidd if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -178,9 +178,6 @@ func (c *Client) addOperationUpdateBucketMetadataInventoryTableConfigurationMidd if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataJournalTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataJournalTableConfiguration.go index 22f33a8686..fb5b41cc37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataJournalTableConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateBucketMetadataJournalTableConfiguration.go @@ -133,7 +133,7 @@ func (c *Client) addOperationUpdateBucketMetadataJournalTableConfigurationMiddle if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -160,9 +160,6 @@ func (c *Client) addOperationUpdateBucketMetadataJournalTableConfigurationMiddle if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateObjectEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateObjectEncryption.go index 0e3eb89303..5c074f8b92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateObjectEncryption.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UpdateObjectEncryption.go @@ -279,7 +279,7 @@ func (c *Client) addOperationUpdateObjectEncryptionMiddlewares(stack *middleware if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -306,9 +306,6 @@ func (c *Client) addOperationUpdateObjectEncryptionMiddlewares(stack *middleware if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go index d7950f612f..dd7834e87c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go @@ -508,7 +508,7 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -535,9 +535,6 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go index f6a7126e7c..774dec961c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go @@ -84,9 +84,11 @@ import ( // // - If the source object that you want to copy is in a directory bucket, you // must have the s3express:CreateSession permission in the Action element of a -// policy to read the object. By default, the session is in the ReadWrite mode. -// If you want to restrict the access, you can explicitly set the -// s3express:SessionMode condition key to ReadOnly on the copy source bucket. +// policy to read the object. If no session mode is specified, the session will be +// created with the maximum allowable privilege, attempting ReadWrite first, then +// ReadOnly if ReadWrite is not permitted. If you want to explicitly restrict the +// access to be read-only, you can set the s3express:SessionMode condition key to +// ReadOnly on the copy source bucket. // // - If the copy destination is a directory bucket, you must have the // s3express:CreateSession permission in the Action element of a policy to write @@ -545,7 +547,7 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, if err = addComputePayloadSHA256(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -572,9 +574,6 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go index 45c3043d1f..26bcaf5847 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go @@ -393,7 +393,7 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware if err = addContentSHA256Header(stack); err != nil { return err } - if err = addRetry(stack, options); err != nil { + if err = addRetry(stack, options, c); err != nil { return err } if err = addRawResponseToMetadata(stack); err != nil { @@ -420,9 +420,6 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware if err = addPutBucketContextMiddleware(stack); err != nil { return err } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } if err = addUserAgentRetryMode(stack, options); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go index 860af056aa..a20bfebd17 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucket_context.go @@ -26,7 +26,7 @@ func (m *putBucketContextMiddleware) HandleSerialize( return next.HandleSerialize(ctx, in) } -func (m *putBucketContextMiddleware) bucketFromInput(params interface{}) (string, bool) { +func (m *putBucketContextMiddleware) bucketFromInput(params any) (string, bool) { v, ok := params.(bucketer) if !ok { return "", false diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go index 4e7f7e24e1..6d12be5249 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/bucketer.go @@ -5,7 +5,7 @@ type bucketer interface { bucket() (string, bool) } -func bucketFromInput(params interface{}) (string, bool) { +func bucketFromInput(params any) (string, bool) { v, ok := params.(bucketer) if !ok { return "", false diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go index 3b35a3e574..21f69eac6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/express_default.go @@ -112,7 +112,7 @@ func (p *defaultS3ExpressCredentialsProvider) Retrieve(ctx context.Context, buck } func (p *defaultS3ExpressCredentialsProvider) doChanRetrieve(ctx context.Context, key cacheKey) <-chan singleflight.Result { - return p.sf.DoChan(key.Slug(), func() (interface{}, error) { + return p.sf.DoChan(key.Slug(), func() (any, error) { return p.retrieve(ctx, key) }) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json index 7b4d95abf1..a47010eb29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json @@ -132,7 +132,6 @@ "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "options.go", - "protocol_test.go", "serializers.go", "snapshot_test.go", "sra_operation_order_test.go", @@ -142,7 +141,7 @@ "types/types_exported_test.go", "validators.go" ], - "go": "1.23", + "go": "1.24", "module": "github.com/aws/aws-sdk-go-v2/service/s3", "unstable": false } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index f50543d940..4988ac3090 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.96.1" +const goModuleVersion = "1.97.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go index 9c1e834e46..7ad36bb1a0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go @@ -77,8 +77,7 @@ type Options struct { // the client option BaseEndpoint instead. EndpointResolver EndpointResolver - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. + // Resolves the endpoint used for a particular service operation. EndpointResolverV2 EndpointResolverV2 // The credentials provider for S3Express requests. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go index 491ed2e5da..1295e712fb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/presign_post.go @@ -100,7 +100,7 @@ type postSignAdapter struct{} func (s *postSignAdapter) PresignPost( credentials aws.Credentials, bucket string, key string, - region string, service string, signingTime time.Time, conditions []interface{}, expirationTime time.Time, optFns ...func(*v4.SignerOptions), + region string, service string, signingTime time.Time, conditions []any, expirationTime time.Time, optFns ...func(*v4.SignerOptions), ) (fields map[string]string, err error) { credentialScope := buildCredentialScope(signingTime, region, service) credentialStr := credentials.AccessKeyID + "/" + credentialScope @@ -140,7 +140,7 @@ type PresignPost interface { PresignPost( credentials aws.Credentials, bucket string, key string, - region string, service string, signingTime time.Time, conditions []interface{}, expirationTime time.Time, + region string, service string, signingTime time.Time, conditions []any, expirationTime time.Time, optFns ...func(*v4.SignerOptions), ) (fields map[string]string, err error) } @@ -164,7 +164,7 @@ type PresignPostOptions struct { // Available conditions can be found [here] // // [here]https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html#sigv4-PolicyConditions - Conditions []interface{} + Conditions []any } type presignPostConverter PresignPostOptions @@ -175,7 +175,7 @@ type presignPostRequestMiddlewareOptions struct { Presigner PresignPost LogSigning bool ExpiresIn time.Duration - Conditions []interface{} + Conditions []any } type presignPostRequestMiddleware struct { @@ -183,7 +183,7 @@ type presignPostRequestMiddleware struct { presigner PresignPost logSigning bool expiresIn time.Duration - conditions []interface{} + conditions []any } // newPresignPostRequestMiddleware returns a new presignPostRequestMiddleware @@ -305,8 +305,8 @@ func (c presignPostConverter) ConvertToPresignMiddleware(stack *middleware.Stack return nil } -func createPolicyDocument(expirationTime time.Time, signingTime time.Time, bucket string, key string, credentialString string, securityToken *string, extraConditions []interface{}) (string, error) { - initialConditions := []interface{}{ +func createPolicyDocument(expirationTime time.Time, signingTime time.Time, bucket string, key string, credentialString string, securityToken *string, extraConditions []any) (string, error) { + initialConditions := []any{ map[string]string{ algorithmHeader: algorithm, }, @@ -321,7 +321,7 @@ func createPolicyDocument(expirationTime time.Time, signingTime time.Time, bucke }, } - var conditions []interface{} + var conditions []any for _, v := range initialConditions { conditions = append(conditions, v) } @@ -345,7 +345,7 @@ func createPolicyDocument(expirationTime time.Time, signingTime time.Time, bucke conditions = append(conditions, map[string]string{"key": key}) } - policyDoc := map[string]interface{}{ + policyDoc := map[string]any{ "conditions": conditions, "expiration": expirationTime.Format(time.RFC3339), } @@ -358,18 +358,18 @@ func createPolicyDocument(expirationTime time.Time, signingTime time.Time, bucke return base64.StdEncoding.EncodeToString(jsonBytes), nil } -func isAlreadyCheckingForKey(conditions []interface{}) bool { +func isAlreadyCheckingForKey(conditions []any) bool { // Need to check for two conditions: // 1. A condition of the form ["starts-with", "$key", "mykey"] // 2. A condition of the form {"key": "mykey"} for _, c := range conditions { - slice, ok := c.([]interface{}) + slice, ok := c.([]any) if ok && len(slice) > 1 { if slice[0] == "starts-with" && slice[1] == "$key" { return true } } - m, ok := c.(map[string]interface{}) + m, ok := c.(map[string]any) if ok && len(m) > 0 { for k := range m { if k == "key" { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go index 4730b7a16e..4a35005180 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go @@ -644,6 +644,11 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e encoder.SetHeader(locationName).String(string(v.ACL)) } + if len(v.BucketNamespace) > 0 { + locationName := "X-Amz-Bucket-Namespace" + encoder.SetHeader(locationName).String(string(v.BucketNamespace)) + } + if v.GrantFullControl != nil { locationName := "X-Amz-Grant-Full-Control" encoder.SetHeader(locationName).String(*v.GrantFullControl) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go index 1a4d118f72..0aa362e8e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go @@ -201,6 +201,25 @@ func (BucketLogsPermission) Values() []BucketLogsPermission { } } +type BucketNamespace string + +// Enum values for BucketNamespace +const ( + BucketNamespaceAccountRegional BucketNamespace = "account-regional" + BucketNamespaceGlobal BucketNamespace = "global" +) + +// Values returns all known values for BucketNamespace. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BucketNamespace) Values() []BucketNamespace { + return []BucketNamespace{ + "account-regional", + "global", + } +} + type BucketType string // Enum values for BucketType diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 3f1612c5b1..27fc881232 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,8 +1,17 @@ +# Release (2026-02-27) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + # Release (2026-02-20) ## General Highlights * **Dependency Update**: Updated to the latest SDK module versions +## Module Highlights +* `github.com/aws/smithy-go`: v1.24.1 + * **Feature**: Add new middleware functions to get event stream output from middleware + # Release (2025-12-01) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index ddce37b99e..a413ff3d87 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -4,7 +4,7 @@ [Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. -The smithy-go runtime requires a minimum version of Go 1.23. +The smithy-go runtime requires a minimum version of Go 1.24. **WARNING: All interfaces are subject to change.** @@ -80,7 +80,7 @@ example created from `smithy init`: "service": "example.weather#Weather", "module": "github.com/example/weather", "generateGoMod": true, - "goDirective": "1.23" + "goDirective": "1.24" } } } diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index 87b3b9e3f6..dc9dfd0d86 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.24.1" +const goModuleVersion = "1.24.2" diff --git a/vendor/github.com/coreos/go-systemd/v22/unit/deserialize.go b/vendor/github.com/coreos/go-systemd/v22/unit/deserialize.go index 74b9573f93..7796e16956 100644 --- a/vendor/github.com/coreos/go-systemd/v22/unit/deserialize.go +++ b/vendor/github.com/coreos/go-systemd/v22/unit/deserialize.go @@ -54,8 +54,8 @@ func DeserializeSections(f io.Reader) ([]*UnitSection, error) { } // Deserialize parses a systemd unit file into a list of UnitOptions. -// Note: this function is deprecated in favor of DeserializeOptions -// and will be removed at a future date. +// +// Deprecated: use [DeserializeOptions] instead. func Deserialize(f io.Reader) (opts []*UnitOption, err error) { return DeserializeOptions(f) } @@ -94,8 +94,7 @@ func deserializeAll(f io.Reader) ([]*UnitSection, []*UnitOption, error) { // sanity check. "should not happen" as sectionKind is first in code flow. if len(sections) == 0 { - return nil, nil, fmt.Errorf( - "Unit file misparse: option before section") + return nil, nil, errors.New("unit file misparse: option before section") } // add to newest section entries. diff --git a/vendor/github.com/coreos/go-systemd/v22/unit/escape.go b/vendor/github.com/coreos/go-systemd/v22/unit/escape.go index 98e2044a71..df9c8cc13f 100644 --- a/vendor/github.com/coreos/go-systemd/v22/unit/escape.go +++ b/vendor/github.com/coreos/go-systemd/v22/unit/escape.go @@ -57,7 +57,7 @@ func escape(unescaped string, isPath bool) string { if c == '/' { e = append(e, '-') } else if start && c == '.' || strings.IndexByte(allowed, c) == -1 { - e = append(e, []byte(fmt.Sprintf(`\x%x`, c))...) + e = fmt.Appendf(e, `\x%x`, c) } else { e = append(e, c) } diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go index ee39b408e9..d3906bfbd5 100644 --- a/vendor/github.com/fatih/color/color.go +++ b/vendor/github.com/fatih/color/color.go @@ -19,15 +19,15 @@ var ( // set (regardless of its value). This is a global option and affects all // colors. For more control over each color block use the methods // DisableColor() individually. - NoColor = noColorIsSet() || os.Getenv("TERM") == "dumb" || - (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) + NoColor = noColorIsSet() || os.Getenv("TERM") == "dumb" || !stdoutIsTerminal() // Output defines the standard output of the print functions. By default, - // os.Stdout is used. - Output = colorable.NewColorableStdout() + // stdOut() is used. + Output = stdOut() - // Error defines a color supporting writer for os.Stderr. - Error = colorable.NewColorableStderr() + // Error defines the standard error of the print functions. By default, + // stdErr() is used. + Error = stdErr() // colorsCache is used to reduce the count of created Color objects and // allows to reuse already created objects with required Attribute. @@ -40,6 +40,33 @@ func noColorIsSet() bool { return os.Getenv("NO_COLOR") != "" } +// stdoutIsTerminal returns true if os.Stdout is a terminal. +// Returns false if os.Stdout is nil (e.g., when running as a Windows service). +func stdoutIsTerminal() bool { + if os.Stdout == nil { + return false + } + return isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd()) +} + +// stdOut returns a writer for color output. +// Returns io.Discard if os.Stdout is nil (e.g., when running as a Windows service). +func stdOut() io.Writer { + if os.Stdout == nil { + return io.Discard + } + return colorable.NewColorableStdout() +} + +// stdErr returns a writer for color error output. +// Returns io.Discard if os.Stderr is nil (e.g., when running as a Windows service). +func stdErr() io.Writer { + if os.Stderr == nil { + return io.Discard + } + return colorable.NewColorableStderr() +} + // Color defines a custom color object which is defined by SGR parameters. type Color struct { params []Attribute @@ -220,26 +247,30 @@ func (c *Color) unset() { // a low-level function, and users should use the higher-level functions, such // as color.Fprint, color.Print, etc. func (c *Color) SetWriter(w io.Writer) *Color { + _, _ = c.setWriter(w) + return c +} + +func (c *Color) setWriter(w io.Writer) (int, error) { if c.isNoColorSet() { - return c + return 0, nil } - fmt.Fprint(w, c.format()) - return c + return fmt.Fprint(w, c.format()) } // UnsetWriter resets all escape attributes and clears the output with the give // io.Writer. Usually should be called after SetWriter(). func (c *Color) UnsetWriter(w io.Writer) { - if c.isNoColorSet() { - return - } + _, _ = c.unsetWriter(w) +} - if NoColor { - return +func (c *Color) unsetWriter(w io.Writer) (int, error) { + if c.isNoColorSet() { + return 0, nil } - fmt.Fprintf(w, "%s[%dm", escape, Reset) + return fmt.Fprintf(w, "%s[%dm", escape, Reset) } // Add is used to chain SGR parameters. Use as many as parameters to combine @@ -255,10 +286,20 @@ func (c *Color) Add(value ...Attribute) *Color { // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { - c.SetWriter(w) - defer c.UnsetWriter(w) + n, err = c.setWriter(w) + if err != nil { + return n, err + } + + nn, err := fmt.Fprint(w, a...) + n += nn + if err != nil { + return + } - return fmt.Fprint(w, a...) + nn, err = c.unsetWriter(w) + n += nn + return n, err } // Print formats using the default formats for its operands and writes to @@ -278,10 +319,20 @@ func (c *Color) Print(a ...interface{}) (n int, err error) { // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { - c.SetWriter(w) - defer c.UnsetWriter(w) + n, err = c.setWriter(w) + if err != nil { + return n, err + } + + nn, err := fmt.Fprintf(w, format, a...) + n += nn + if err != nil { + return + } - return fmt.Fprintf(w, format, a...) + nn, err = c.unsetWriter(w) + n += nn + return n, err } // Printf formats according to a format specifier and writes to standard output. @@ -475,27 +526,24 @@ func (c *Color) Equals(c2 *Color) bool { if c == nil || c2 == nil { return false } + if len(c.params) != len(c2.params) { return false } + counts := make(map[Attribute]int, len(c.params)) for _, attr := range c.params { - if !c2.attrExists(attr) { - return false - } + counts[attr]++ } - return true -} - -func (c *Color) attrExists(a Attribute) bool { - for _, attr := range c.params { - if attr == a { - return true + for _, attr := range c2.params { + if counts[attr] == 0 { + return false } + counts[attr]-- } - return false + return true } func boolPtr(v bool) *bool { diff --git a/vendor/github.com/fatih/color/color_windows.go b/vendor/github.com/fatih/color/color_windows.go index be01c558e5..97e5a765a5 100644 --- a/vendor/github.com/fatih/color/color_windows.go +++ b/vendor/github.com/fatih/color/color_windows.go @@ -9,6 +9,9 @@ import ( func init() { // Opt-in for ansi color support for current process. // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences + if os.Stdout == nil { + return + } var outMode uint32 out := windows.Handle(os.Stdout.Fd()) if err := windows.GetConsoleMode(out, &outMode); err != nil { diff --git a/vendor/github.com/fsnotify/fsnotify/.cirrus.yml b/vendor/github.com/fsnotify/fsnotify/.cirrus.yml new file mode 100644 index 0000000000..7f257e99ac --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.cirrus.yml @@ -0,0 +1,14 @@ +freebsd_task: + name: 'FreeBSD' + freebsd_instance: + image_family: freebsd-14-2 + install_script: + - pkg update -f + - pkg install -y go + test_script: + # run tests as user "cirrus" instead of root + - pw useradd cirrus -m + - chown -R cirrus:cirrus . + - FSNOTIFY_BUFFER=4096 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... + - sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race ./... + - FSNOTIFY_DEBUG=1 sudo --preserve-env=FSNOTIFY_BUFFER -u cirrus go test -parallel 1 -race -v ./... diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore new file mode 100644 index 0000000000..daea9dd6d6 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.gitignore @@ -0,0 +1,10 @@ +# go test -c output +*.test +*.test.exe + +# Output of go build ./cmd/fsnotify +/fsnotify +/fsnotify.exe + +/test/kqueue +/test/a.out diff --git a/vendor/github.com/fsnotify/fsnotify/.mailmap b/vendor/github.com/fsnotify/fsnotify/.mailmap new file mode 100644 index 0000000000..a04f2907fe --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.mailmap @@ -0,0 +1,2 @@ +Chris Howey +Nathan Youngman <4566+nathany@users.noreply.github.com> diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md new file mode 100644 index 0000000000..6468d2cf40 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md @@ -0,0 +1,602 @@ +# Changelog + +1.9.0 2024-04-04 +---------------- + +### Changes and fixes + +- all: make BufferedWatcher buffered again ([#657]) + +- inotify: fix race when adding/removing watches while a watched path is being + deleted ([#678], [#686]) + +- inotify: don't send empty event if a watched path is unmounted ([#655]) + +- inotify: don't register duplicate watches when watching both a symlink and its + target; previously that would get "half-added" and removing the second would + panic ([#679]) + +- kqueue: fix watching relative symlinks ([#681]) + +- kqueue: correctly mark pre-existing entries when watching a link to a dir on + kqueue ([#682]) + +- illumos: don't send error if changed file is deleted while processing the + event ([#678]) + + +[#657]: https://github.com/fsnotify/fsnotify/pull/657 +[#678]: https://github.com/fsnotify/fsnotify/pull/678 +[#686]: https://github.com/fsnotify/fsnotify/pull/686 +[#655]: https://github.com/fsnotify/fsnotify/pull/655 +[#681]: https://github.com/fsnotify/fsnotify/pull/681 +[#679]: https://github.com/fsnotify/fsnotify/pull/679 +[#682]: https://github.com/fsnotify/fsnotify/pull/682 + +1.8.0 2024-10-31 +---------------- + +### Additions + +- all: add `FSNOTIFY_DEBUG` to print debug logs to stderr ([#619]) + +### Changes and fixes + +- windows: fix behaviour of `WatchList()` to be consistent with other platforms ([#610]) + +- kqueue: ignore events with Ident=0 ([#590]) + +- kqueue: set O_CLOEXEC to prevent passing file descriptors to children ([#617]) + +- kqueue: emit events as "/path/dir/file" instead of "path/link/file" when watching a symlink ([#625]) + +- inotify: don't send event for IN_DELETE_SELF when also watching the parent ([#620]) + +- inotify: fix panic when calling Remove() in a goroutine ([#650]) + +- fen: allow watching subdirectories of watched directories ([#621]) + +[#590]: https://github.com/fsnotify/fsnotify/pull/590 +[#610]: https://github.com/fsnotify/fsnotify/pull/610 +[#617]: https://github.com/fsnotify/fsnotify/pull/617 +[#619]: https://github.com/fsnotify/fsnotify/pull/619 +[#620]: https://github.com/fsnotify/fsnotify/pull/620 +[#621]: https://github.com/fsnotify/fsnotify/pull/621 +[#625]: https://github.com/fsnotify/fsnotify/pull/625 +[#650]: https://github.com/fsnotify/fsnotify/pull/650 + +1.7.0 - 2023-10-22 +------------------ +This version of fsnotify needs Go 1.17. + +### Additions + +- illumos: add FEN backend to support illumos and Solaris. ([#371]) + +- all: add `NewBufferedWatcher()` to use a buffered channel, which can be useful + in cases where you can't control the kernel buffer and receive a large number + of events in bursts. ([#550], [#572]) + +- all: add `AddWith()`, which is identical to `Add()` but allows passing + options. ([#521]) + +- windows: allow setting the ReadDirectoryChangesW() buffer size with + `fsnotify.WithBufferSize()`; the default of 64K is the highest value that + works on all platforms and is enough for most purposes, but in some cases a + highest buffer is needed. ([#521]) + +### Changes and fixes + +- inotify: remove watcher if a watched path is renamed ([#518]) + + After a rename the reported name wasn't updated, or even an empty string. + Inotify doesn't provide any good facilities to update it, so just remove the + watcher. This is already how it worked on kqueue and FEN. + + On Windows this does work, and remains working. + +- windows: don't listen for file attribute changes ([#520]) + + File attribute changes are sent as `FILE_ACTION_MODIFIED` by the Windows API, + with no way to see if they're a file write or attribute change, so would show + up as a fsnotify.Write event. This is never useful, and could result in many + spurious Write events. + +- windows: return `ErrEventOverflow` if the buffer is full ([#525]) + + Before it would merely return "short read", making it hard to detect this + error. + +- kqueue: make sure events for all files are delivered properly when removing a + watched directory ([#526]) + + Previously they would get sent with `""` (empty string) or `"."` as the path + name. + +- kqueue: don't emit spurious Create events for symbolic links ([#524]) + + The link would get resolved but kqueue would "forget" it already saw the link + itself, resulting on a Create for every Write event for the directory. + +- all: return `ErrClosed` on `Add()` when the watcher is closed ([#516]) + +- other: add `Watcher.Errors` and `Watcher.Events` to the no-op `Watcher` in + `backend_other.go`, making it easier to use on unsupported platforms such as + WASM, AIX, etc. ([#528]) + +- other: use the `backend_other.go` no-op if the `appengine` build tag is set; + Google AppEngine forbids usage of the unsafe package so the inotify backend + won't compile there. + +[#371]: https://github.com/fsnotify/fsnotify/pull/371 +[#516]: https://github.com/fsnotify/fsnotify/pull/516 +[#518]: https://github.com/fsnotify/fsnotify/pull/518 +[#520]: https://github.com/fsnotify/fsnotify/pull/520 +[#521]: https://github.com/fsnotify/fsnotify/pull/521 +[#524]: https://github.com/fsnotify/fsnotify/pull/524 +[#525]: https://github.com/fsnotify/fsnotify/pull/525 +[#526]: https://github.com/fsnotify/fsnotify/pull/526 +[#528]: https://github.com/fsnotify/fsnotify/pull/528 +[#537]: https://github.com/fsnotify/fsnotify/pull/537 +[#550]: https://github.com/fsnotify/fsnotify/pull/550 +[#572]: https://github.com/fsnotify/fsnotify/pull/572 + +1.6.0 - 2022-10-13 +------------------ +This version of fsnotify needs Go 1.16 (this was already the case since 1.5.1, +but not documented). It also increases the minimum Linux version to 2.6.32. + +### Additions + +- all: add `Event.Has()` and `Op.Has()` ([#477]) + + This makes checking events a lot easier; for example: + + if event.Op&Write == Write && !(event.Op&Remove == Remove) { + } + + Becomes: + + if event.Has(Write) && !event.Has(Remove) { + } + +- all: add cmd/fsnotify ([#463]) + + A command-line utility for testing and some examples. + +### Changes and fixes + +- inotify: don't ignore events for files that don't exist ([#260], [#470]) + + Previously the inotify watcher would call `os.Lstat()` to check if a file + still exists before emitting events. + + This was inconsistent with other platforms and resulted in inconsistent event + reporting (e.g. when a file is quickly removed and re-created), and generally + a source of confusion. It was added in 2013 to fix a memory leak that no + longer exists. + +- all: return `ErrNonExistentWatch` when `Remove()` is called on a path that's + not watched ([#460]) + +- inotify: replace epoll() with non-blocking inotify ([#434]) + + Non-blocking inotify was not generally available at the time this library was + written in 2014, but now it is. As a result, the minimum Linux version is + bumped from 2.6.27 to 2.6.32. This hugely simplifies the code and is faster. + +- kqueue: don't check for events every 100ms ([#480]) + + The watcher would wake up every 100ms, even when there was nothing to do. Now + it waits until there is something to do. + +- macos: retry opening files on EINTR ([#475]) + +- kqueue: skip unreadable files ([#479]) + + kqueue requires a file descriptor for every file in a directory; this would + fail if a file was unreadable by the current user. Now these files are simply + skipped. + +- windows: fix renaming a watched directory if the parent is also watched ([#370]) + +- windows: increase buffer size from 4K to 64K ([#485]) + +- windows: close file handle on Remove() ([#288]) + +- kqueue: put pathname in the error if watching a file fails ([#471]) + +- inotify, windows: calling Close() more than once could race ([#465]) + +- kqueue: improve Close() performance ([#233]) + +- all: various documentation additions and clarifications. + +[#233]: https://github.com/fsnotify/fsnotify/pull/233 +[#260]: https://github.com/fsnotify/fsnotify/pull/260 +[#288]: https://github.com/fsnotify/fsnotify/pull/288 +[#370]: https://github.com/fsnotify/fsnotify/pull/370 +[#434]: https://github.com/fsnotify/fsnotify/pull/434 +[#460]: https://github.com/fsnotify/fsnotify/pull/460 +[#463]: https://github.com/fsnotify/fsnotify/pull/463 +[#465]: https://github.com/fsnotify/fsnotify/pull/465 +[#470]: https://github.com/fsnotify/fsnotify/pull/470 +[#471]: https://github.com/fsnotify/fsnotify/pull/471 +[#475]: https://github.com/fsnotify/fsnotify/pull/475 +[#477]: https://github.com/fsnotify/fsnotify/pull/477 +[#479]: https://github.com/fsnotify/fsnotify/pull/479 +[#480]: https://github.com/fsnotify/fsnotify/pull/480 +[#485]: https://github.com/fsnotify/fsnotify/pull/485 + +## [1.5.4] - 2022-04-25 + +* Windows: add missing defer to `Watcher.WatchList` [#447](https://github.com/fsnotify/fsnotify/pull/447) +* go.mod: use latest x/sys [#444](https://github.com/fsnotify/fsnotify/pull/444) +* Fix compilation for OpenBSD [#443](https://github.com/fsnotify/fsnotify/pull/443) + +## [1.5.3] - 2022-04-22 + +* This version is retracted. An incorrect branch is published accidentally [#445](https://github.com/fsnotify/fsnotify/issues/445) + +## [1.5.2] - 2022-04-21 + +* Add a feature to return the directories and files that are being monitored [#374](https://github.com/fsnotify/fsnotify/pull/374) +* Fix potential crash on windows if `raw.FileNameLength` exceeds `syscall.MAX_PATH` [#361](https://github.com/fsnotify/fsnotify/pull/361) +* Allow build on unsupported GOOS [#424](https://github.com/fsnotify/fsnotify/pull/424) +* Don't set `poller.fd` twice in `newFdPoller` [#406](https://github.com/fsnotify/fsnotify/pull/406) +* fix go vet warnings: call to `(*T).Fatalf` from a non-test goroutine [#416](https://github.com/fsnotify/fsnotify/pull/416) + +## [1.5.1] - 2021-08-24 + +* Revert Add AddRaw to not follow symlinks [#394](https://github.com/fsnotify/fsnotify/pull/394) + +## [1.5.0] - 2021-08-20 + +* Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381) +* Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298) +* Windows: Follow symlinks by default like on all other systems [#289](https://github.com/fsnotify/fsnotify/pull/289) +* CI: Use GitHub Actions for CI and cover go 1.12-1.17 + [#378](https://github.com/fsnotify/fsnotify/pull/378) + [#381](https://github.com/fsnotify/fsnotify/pull/381) + [#385](https://github.com/fsnotify/fsnotify/pull/385) +* Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325) + +## [1.4.9] - 2020-03-11 + +* Move example usage to the readme #329. This may resolve #328. + +## [1.4.8] - 2020-03-10 + +* CI: test more go versions (@nathany 1d13583d846ea9d66dcabbfefbfb9d8e6fb05216) +* Tests: Queued inotify events could have been read by the test before max_queued_events was hit (@matthias-stone #265) +* Tests: t.Fatalf -> t.Errorf in go routines (@gdey #266) +* CI: Less verbosity (@nathany #267) +* Tests: Darwin: Exchangedata is deprecated on 10.13 (@nathany #267) +* Tests: Check if channels are closed in the example (@alexeykazakov #244) +* CI: Only run golint on latest version of go and fix issues (@cpuguy83 #284) +* CI: Add windows to travis matrix (@cpuguy83 #284) +* Docs: Remover appveyor badge (@nathany 11844c0959f6fff69ba325d097fce35bd85a8e93) +* Linux: create epoll and pipe fds with close-on-exec (@JohannesEbke #219) +* Linux: open files with close-on-exec (@linxiulei #273) +* Docs: Plan to support fanotify (@nathany ab058b44498e8b7566a799372a39d150d9ea0119 ) +* Project: Add go.mod (@nathany #309) +* Project: Revise editor config (@nathany #309) +* Project: Update copyright for 2019 (@nathany #309) +* CI: Drop go1.8 from CI matrix (@nathany #309) +* Docs: Updating the FAQ section for supportability with NFS & FUSE filesystems (@Pratik32 4bf2d1fec78374803a39307bfb8d340688f4f28e ) + +## [1.4.7] - 2018-01-09 + +* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) +* Tests: Fix missing verb on format string (thanks @rchiossi) +* Linux: Fix deadlock in Remove (thanks @aarondl) +* Linux: Watch.Add improvements (avoid race, fix consistency, reduce garbage) (thanks @twpayne) +* Docs: Moved FAQ into the README (thanks @vahe) +* Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) +* Docs: replace references to OS X with macOS + +## [1.4.2] - 2016-10-10 + +* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) + +## [1.4.1] - 2016-10-04 + +* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) + +## [1.4.0] - 2016-10-01 + +* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) + +## [1.3.1] - 2016-06-28 + +* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) + +## [1.3.0] - 2016-04-19 + +* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) + +## [1.2.10] - 2016-03-02 + +* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) + +## [1.2.9] - 2016-01-13 + +kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) + +## [1.2.8] - 2015-12-17 + +* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) +* inotify: fix race in test +* enable race detection for continuous integration (Linux, Mac, Windows) + +## [1.2.5] - 2015-10-17 + +* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) +* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) +* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) +* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) + +## [1.2.1] - 2015-10-14 + +* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) + +## [1.2.0] - 2015-02-08 + +* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) +* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) +* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) + +## [1.1.1] - 2015-02-05 + +* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) + +## [1.1.0] - 2014-12-12 + +* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) + * add low-level functions + * only need to store flags on directories + * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) + * done can be an unbuffered channel + * remove calls to os.NewSyscallError +* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) +* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## [1.0.4] - 2014-09-07 + +* kqueue: add dragonfly to the build tags. +* Rename source code files, rearrange code so exported APIs are at the top. +* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) + +## [1.0.3] - 2014-08-19 + +* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) + +## [1.0.2] - 2014-08-17 + +* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) +* [Fix] Make ./path and path equivalent. (thanks @zhsso) + +## [1.0.0] - 2014-08-15 + +* [API] Remove AddWatch on Windows, use Add. +* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) +* Minor updates based on feedback from golint. + +## dev / 2014-07-09 + +* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). +* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) + +## dev / 2014-07-04 + +* kqueue: fix incorrect mutex used in Close() +* Update example to demonstrate usage of Op. + +## dev / 2014-06-28 + +* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) +* Fix for String() method on Event (thanks Alex Brainman) +* Don't build on Plan 9 or Solaris (thanks @4ad) + +## dev / 2014-06-21 + +* Events channel of type Event rather than *Event. +* [internal] use syscall constants directly for inotify and kqueue. +* [internal] kqueue: rename events to kevents and fileEvent to event. + +## dev / 2014-06-19 + +* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). +* [internal] remove cookie from Event struct (unused). +* [internal] Event struct has the same definition across every OS. +* [internal] remove internal watch and removeWatch methods. + +## dev / 2014-06-12 + +* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). +* [API] Pluralized channel names: Events and Errors. +* [API] Renamed FileEvent struct to Event. +* [API] Op constants replace methods like IsCreate(). + +## dev / 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## dev / 2014-05-23 + +* [API] Remove current implementation of WatchFlags. + * current implementation doesn't take advantage of OS for efficiency + * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes + * no tests for the current implementation + * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) + +## [0.9.3] - 2014-12-31 + +* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) + +## [0.9.2] - 2014-08-17 + +* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) + +## [0.9.1] - 2014-06-12 + +* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) + +## [0.9.0] - 2014-01-17 + +* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) +* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) +* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. + +## [0.8.12] - 2013-11-13 + +* [API] Remove FD_SET and friends from Linux adapter + +## [0.8.11] - 2013-11-02 + +* [Doc] Add Changelog [#72][] (thanks @nathany) +* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) + +## [0.8.10] - 2013-10-19 + +* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) +* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) +* [Doc] specify OS-specific limits in README (thanks @debrando) + +## [0.8.9] - 2013-09-08 + +* [Doc] Contributing (thanks @nathany) +* [Doc] update package path in example code [#63][] (thanks @paulhammond) +* [Doc] GoCI badge in README (Linux only) [#60][] +* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) + +## [0.8.8] - 2013-06-17 + +* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) + +## [0.8.7] - 2013-06-03 + +* [API] Make syscall flags internal +* [Fix] inotify: ignore event changes +* [Fix] race in symlink test [#45][] (reported by @srid) +* [Fix] tests on Windows +* lower case error messages + +## [0.8.6] - 2013-05-23 + +* kqueue: Use EVT_ONLY flag on Darwin +* [Doc] Update README with full example + +## [0.8.5] - 2013-05-09 + +* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) + +## [0.8.4] - 2013-04-07 + +* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) + +## [0.8.3] - 2013-03-13 + +* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) +* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) + +## [0.8.2] - 2013-02-07 + +* [Doc] add Authors +* [Fix] fix data races for map access [#29][] (thanks @fsouza) + +## [0.8.1] - 2013-01-09 + +* [Fix] Windows path separators +* [Doc] BSD License + +## [0.8.0] - 2012-11-09 + +* kqueue: directory watching improvements (thanks @vmirage) +* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) +* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) + +## [0.7.4] - 2012-10-09 + +* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) +* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) +* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) +* [Fix] kqueue: modify after recreation of file + +## [0.7.3] - 2012-09-27 + +* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) +* [Fix] kqueue: no longer get duplicate CREATE events + +## [0.7.2] - 2012-09-01 + +* kqueue: events for created directories + +## [0.7.1] - 2012-07-14 + +* [Fix] for renaming files + +## [0.7.0] - 2012-07-02 + +* [Feature] FSNotify flags +* [Fix] inotify: Added file name back to event path + +## [0.6.0] - 2012-06-06 + +* kqueue: watch files after directory created (thanks @tmc) + +## [0.5.1] - 2012-05-22 + +* [Fix] inotify: remove all watches before Close() + +## [0.5.0] - 2012-05-03 + +* [API] kqueue: return errors during watch instead of sending over channel +* kqueue: match symlink behavior on Linux +* inotify: add `DELETE_SELF` (requested by @taralx) +* [Fix] kqueue: handle EINTR (reported by @robfig) +* [Doc] Godoc example [#1][] (thanks @davecheney) + +## [0.4.0] - 2012-03-30 + +* Go 1 released: build with go tool +* [Feature] Windows support using winfsnotify +* Windows does not have attribute change notifications +* Roll attribute notifications into IsModify + +## [0.3.0] - 2012-02-19 + +* kqueue: add files when watch directory + +## [0.2.0] - 2011-12-30 + +* update to latest Go weekly code + +## [0.1.0] - 2011-10-19 + +* kqueue: add watch on file creation to match inotify +* kqueue: create file event +* inotify: ignore `IN_IGNORED` events +* event String() +* linux: common FileEvent functions +* initial commit + +[#79]: https://github.com/howeyc/fsnotify/pull/79 +[#77]: https://github.com/howeyc/fsnotify/pull/77 +[#72]: https://github.com/howeyc/fsnotify/issues/72 +[#71]: https://github.com/howeyc/fsnotify/issues/71 +[#70]: https://github.com/howeyc/fsnotify/issues/70 +[#63]: https://github.com/howeyc/fsnotify/issues/63 +[#62]: https://github.com/howeyc/fsnotify/issues/62 +[#60]: https://github.com/howeyc/fsnotify/issues/60 +[#59]: https://github.com/howeyc/fsnotify/issues/59 +[#49]: https://github.com/howeyc/fsnotify/issues/49 +[#45]: https://github.com/howeyc/fsnotify/issues/45 +[#40]: https://github.com/howeyc/fsnotify/issues/40 +[#36]: https://github.com/howeyc/fsnotify/issues/36 +[#33]: https://github.com/howeyc/fsnotify/issues/33 +[#29]: https://github.com/howeyc/fsnotify/issues/29 +[#25]: https://github.com/howeyc/fsnotify/issues/25 +[#24]: https://github.com/howeyc/fsnotify/issues/24 +[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md new file mode 100644 index 0000000000..4cc40fa597 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md @@ -0,0 +1,145 @@ +Thank you for your interest in contributing to fsnotify! We try to review and +merge PRs in a reasonable timeframe, but please be aware that: + +- To avoid "wasted" work, please discuss changes on the issue tracker first. You + can just send PRs, but they may end up being rejected for one reason or the + other. + +- fsnotify is a cross-platform library, and changes must work reasonably well on + all supported platforms. + +- Changes will need to be compatible; old code should still compile, and the + runtime behaviour can't change in ways that are likely to lead to problems for + users. + +Testing +------- +Just `go test ./...` runs all the tests; the CI runs this on all supported +platforms. Testing different platforms locally can be done with something like +[goon] or [Vagrant], but this isn't super-easy to set up at the moment. + +Use the `-short` flag to make the "stress test" run faster. + +Writing new tests +----------------- +Scripts in the testdata directory allow creating test cases in a "shell-like" +syntax. The basic format is: + + script + + Output: + desired output + +For example: + + # Create a new empty file with some data. + watch / + echo data >/file + + Output: + create /file + write /file + +Just create a new file to add a new test; select which tests to run with +`-run TestScript/[path]`. + +script +------ +The script is a "shell-like" script: + + cmd arg arg + +Comments are supported with `#`: + + # Comment + cmd arg arg # Comment + +All operations are done in a temp directory; a path like "/foo" is rewritten to +"/tmp/TestFoo/foo". + +Arguments can be quoted with `"` or `'`; there are no escapes and they're +functionally identical right now, but this may change in the future, so best to +assume shell-like rules. + + touch "/file with spaces" + +End-of-line escapes with `\` are not supported. + +### Supported commands + + watch path [ops] # Watch the path, reporting events for it. Nothing is + # watched by default. Optionally a list of ops can be + # given, as with AddWith(path, WithOps(...)). + unwatch path # Stop watching the path. + watchlist n # Assert watchlist length. + + stop # Stop running the script; for debugging. + debug [yes/no] # Enable/disable FSNOTIFY_DEBUG (tests are run in + parallel by default, so -parallel=1 is probably a good + idea). + print [any strings] # Print text to stdout; for debugging. + + touch path + mkdir [-p] dir + ln -s target link # Only ln -s supported. + mkfifo path + mknod dev path + mv src dst + rm [-r] path + chmod mode path # Octal only + sleep time-in-ms + + cat path # Read path (does nothing with the data; just reads it). + echo str >>path # Append "str" to "path". + echo str >path # Truncate "path" and write "str". + + require reason # Skip the test if "reason" is true; "skip" and + skip reason # "require" behave identical; it supports both for + # readability. Possible reasons are: + # + # always Always skip this test. + # symlink Symlinks are supported (requires admin + # permissions on Windows). + # mkfifo Platform doesn't support FIFO named sockets. + # mknod Platform doesn't support device nodes. + + +output +------ +After `Output:` the desired output is given; this is indented by convention, but +that's not required. + +The format of that is: + + # Comment + event path # Comment + + system: + event path + system2: + event path + +Every event is one line, and any whitespace between the event and path are +ignored. The path can optionally be surrounded in ". Anything after a "#" is +ignored. + +Platform-specific tests can be added after GOOS; for example: + + watch / + touch /file + + Output: + # Tested if nothing else matches + create /file + + # Windows-specific test. + windows: + write /file + +You can specify multiple platforms with a comma (e.g. "windows, linux:"). +"kqueue" is a shortcut for all kqueue systems (BSD, macOS). + + +[goon]: https://github.com/arp242/goon +[Vagrant]: https://www.vagrantup.com/ +[integration_test.go]: /integration_test.go diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE new file mode 100644 index 0000000000..fb03ade750 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/LICENSE @@ -0,0 +1,25 @@ +Copyright © 2012 The Go Authors. All rights reserved. +Copyright © fsnotify Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. +* Neither the name of Google Inc. nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md new file mode 100644 index 0000000000..1f4eb583d5 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/README.md @@ -0,0 +1,182 @@ +fsnotify is a Go library to provide cross-platform filesystem notifications on +Windows, Linux, macOS, BSD, and illumos. + +Go 1.17 or newer is required; the full documentation is at +https://pkg.go.dev/github.com/fsnotify/fsnotify + +--- + +Platform support: + +| Backend | OS | Status | +| :-------------------- | :--------- | :------------------------------------------------------------------------ | +| inotify | Linux | Supported | +| kqueue | BSD, macOS | Supported | +| ReadDirectoryChangesW | Windows | Supported | +| FEN | illumos | Supported | +| fanotify | Linux 5.9+ | [Not yet](https://github.com/fsnotify/fsnotify/issues/114) | +| FSEvents | macOS | [Needs support in x/sys/unix][fsevents] | +| USN Journals | Windows | [Needs support in x/sys/windows][usn] | +| Polling | *All* | [Not yet](https://github.com/fsnotify/fsnotify/issues/9) | + +Linux and illumos should include Android and Solaris, but these are currently +untested. + +[fsevents]: https://github.com/fsnotify/fsnotify/issues/11#issuecomment-1279133120 +[usn]: https://github.com/fsnotify/fsnotify/issues/53#issuecomment-1279829847 + +Usage +----- +A basic example: + +```go +package main + +import ( + "log" + + "github.com/fsnotify/fsnotify" +) + +func main() { + // Create new watcher. + watcher, err := fsnotify.NewWatcher() + if err != nil { + log.Fatal(err) + } + defer watcher.Close() + + // Start listening for events. + go func() { + for { + select { + case event, ok := <-watcher.Events: + if !ok { + return + } + log.Println("event:", event) + if event.Has(fsnotify.Write) { + log.Println("modified file:", event.Name) + } + case err, ok := <-watcher.Errors: + if !ok { + return + } + log.Println("error:", err) + } + } + }() + + // Add a path. + err = watcher.Add("/tmp") + if err != nil { + log.Fatal(err) + } + + // Block main goroutine forever. + <-make(chan struct{}) +} +``` + +Some more examples can be found in [cmd/fsnotify](cmd/fsnotify), which can be +run with: + + % go run ./cmd/fsnotify + +Further detailed documentation can be found in godoc: +https://pkg.go.dev/github.com/fsnotify/fsnotify + +FAQ +--- +### Will a file still be watched when it's moved to another directory? +No, not unless you are watching the location it was moved to. + +### Are subdirectories watched? +No, you must add watches for any directory you want to watch (a recursive +watcher is on the roadmap: [#18]). + +[#18]: https://github.com/fsnotify/fsnotify/issues/18 + +### Do I have to watch the Error and Event channels in a goroutine? +Yes. You can read both channels in the same goroutine using `select` (you don't +need a separate goroutine for both channels; see the example). + +### Why don't notifications work with NFS, SMB, FUSE, /proc, or /sys? +fsnotify requires support from underlying OS to work. The current NFS and SMB +protocols does not provide network level support for file notifications, and +neither do the /proc and /sys virtual filesystems. + +This could be fixed with a polling watcher ([#9]), but it's not yet implemented. + +[#9]: https://github.com/fsnotify/fsnotify/issues/9 + +### Why do I get many Chmod events? +Some programs may generate a lot of attribute changes; for example Spotlight on +macOS, anti-virus programs, backup applications, and some others are known to do +this. As a rule, it's typically best to ignore Chmod events. They're often not +useful, and tend to cause problems. + +Spotlight indexing on macOS can result in multiple events (see [#15]). A +temporary workaround is to add your folder(s) to the *Spotlight Privacy +settings* until we have a native FSEvents implementation (see [#11]). + +[#11]: https://github.com/fsnotify/fsnotify/issues/11 +[#15]: https://github.com/fsnotify/fsnotify/issues/15 + +### Watching a file doesn't work well +Watching individual files (rather than directories) is generally not recommended +as many programs (especially editors) update files atomically: it will write to +a temporary file which is then moved to to destination, overwriting the original +(or some variant thereof). The watcher on the original file is now lost, as that +no longer exists. + +The upshot of this is that a power failure or crash won't leave a half-written +file. + +Watch the parent directory and use `Event.Name` to filter out files you're not +interested in. There is an example of this in `cmd/fsnotify/file.go`. + +Platform-specific notes +----------------------- +### Linux +When a file is removed a REMOVE event won't be emitted until all file +descriptors are closed; it will emit a CHMOD instead: + + fp := os.Open("file") + os.Remove("file") // CHMOD + fp.Close() // REMOVE + +This is the event that inotify sends, so not much can be changed about this. + +The `fs.inotify.max_user_watches` sysctl variable specifies the upper limit for +the number of watches per user, and `fs.inotify.max_user_instances` specifies +the maximum number of inotify instances per user. Every Watcher you create is an +"instance", and every path you add is a "watch". + +These are also exposed in `/proc` as `/proc/sys/fs/inotify/max_user_watches` and +`/proc/sys/fs/inotify/max_user_instances` + +To increase them you can use `sysctl` or write the value to proc file: + + # The default values on Linux 5.18 + sysctl fs.inotify.max_user_watches=124983 + sysctl fs.inotify.max_user_instances=128 + +To make the changes persist on reboot edit `/etc/sysctl.conf` or +`/usr/lib/sysctl.d/50-default.conf` (details differ per Linux distro; check your +distro's documentation): + + fs.inotify.max_user_watches=124983 + fs.inotify.max_user_instances=128 + +Reaching the limit will result in a "no space left on device" or "too many open +files" error. + +### kqueue (macOS, all BSD systems) +kqueue requires opening a file descriptor for every file that's being watched; +so if you're watching a directory with five files then that's six file +descriptors. You will run in to your system's "max open files" limit faster on +these platforms. + +The sysctl variables `kern.maxfiles` and `kern.maxfilesperproc` can be used to +control the maximum number of open files. diff --git a/vendor/github.com/fsnotify/fsnotify/backend_fen.go b/vendor/github.com/fsnotify/fsnotify/backend_fen.go new file mode 100644 index 0000000000..57fc692848 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/backend_fen.go @@ -0,0 +1,467 @@ +//go:build solaris + +// FEN backend for illumos (supported) and Solaris (untested, but should work). +// +// See port_create(3c) etc. for docs. https://www.illumos.org/man/3C/port_create + +package fsnotify + +import ( + "errors" + "fmt" + "io/fs" + "os" + "path/filepath" + "sync" + "time" + + "github.com/fsnotify/fsnotify/internal" + "golang.org/x/sys/unix" +) + +type fen struct { + *shared + Events chan Event + Errors chan error + + mu sync.Mutex + port *unix.EventPort + dirs map[string]Op // Explicitly watched directories + watches map[string]Op // Explicitly watched non-directories +} + +var defaultBufferSize = 0 + +func newBackend(ev chan Event, errs chan error) (backend, error) { + w := &fen{ + shared: newShared(ev, errs), + Events: ev, + Errors: errs, + dirs: make(map[string]Op), + watches: make(map[string]Op), + } + + var err error + w.port, err = unix.NewEventPort() + if err != nil { + return nil, fmt.Errorf("fsnotify.NewWatcher: %w", err) + } + + go w.readEvents() + return w, nil +} + +func (w *fen) Close() error { + if w.shared.close() { + return nil + } + return w.port.Close() +} + +func (w *fen) Add(name string) error { return w.AddWith(name) } + +func (w *fen) AddWith(name string, opts ...addOpt) error { + if w.isClosed() { + return ErrClosed + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } + + // Currently we resolve symlinks that were explicitly requested to be + // watched. Otherwise we would use LStat here. + stat, err := os.Stat(name) + if err != nil { + return err + } + + // Associate all files in the directory. + if stat.IsDir() { + err := w.handleDirectory(name, stat, true, w.associateFile) + if err != nil { + return err + } + + w.mu.Lock() + w.dirs[name] = with.op + w.mu.Unlock() + return nil + } + + err = w.associateFile(name, stat, true) + if err != nil { + return err + } + + w.mu.Lock() + w.watches[name] = with.op + w.mu.Unlock() + return nil +} + +func (w *fen) Remove(name string) error { + if w.isClosed() { + return nil + } + if !w.port.PathIsWatched(name) { + return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + + // The user has expressed an intent. Immediately remove this name from + // whichever watch list it might be in. If it's not in there the delete + // doesn't cause harm. + w.mu.Lock() + delete(w.watches, name) + delete(w.dirs, name) + w.mu.Unlock() + + stat, err := os.Stat(name) + if err != nil { + return err + } + + // Remove associations for every file in the directory. + if stat.IsDir() { + err := w.handleDirectory(name, stat, false, w.dissociateFile) + if err != nil { + return err + } + return nil + } + + err = w.port.DissociatePath(name) + if err != nil { + return err + } + + return nil +} + +// readEvents contains the main loop that runs in a goroutine watching for events. +func (w *fen) readEvents() { + // If this function returns, the watcher has been closed and we can close + // these channels + defer func() { + close(w.Errors) + close(w.Events) + }() + + pevents := make([]unix.PortEvent, 8) + for { + count, err := w.port.Get(pevents, 1, nil) + if err != nil && err != unix.ETIME { + // Interrupted system call (count should be 0) ignore and continue + if errors.Is(err, unix.EINTR) && count == 0 { + continue + } + // Get failed because we called w.Close() + if errors.Is(err, unix.EBADF) && w.isClosed() { + return + } + // There was an error not caused by calling w.Close() + if !w.sendError(fmt.Errorf("port.Get: %w", err)) { + return + } + } + + p := pevents[:count] + for _, pevent := range p { + if pevent.Source != unix.PORT_SOURCE_FILE { + // Event from unexpected source received; should never happen. + if !w.sendError(errors.New("Event from unexpected source received")) { + return + } + continue + } + + if debug { + internal.Debug(pevent.Path, pevent.Events) + } + + err = w.handleEvent(&pevent) + if !w.sendError(err) { + return + } + } + } +} + +func (w *fen) handleDirectory(path string, stat os.FileInfo, follow bool, handler func(string, os.FileInfo, bool) error) error { + files, err := os.ReadDir(path) + if err != nil { + return err + } + + // Handle all children of the directory. + for _, entry := range files { + finfo, err := entry.Info() + if err != nil { + return err + } + err = handler(filepath.Join(path, finfo.Name()), finfo, false) + if err != nil { + return err + } + } + + // And finally handle the directory itself. + return handler(path, stat, follow) +} + +// handleEvent might need to emit more than one fsnotify event if the events +// bitmap matches more than one event type (e.g. the file was both modified and +// had the attributes changed between when the association was created and the +// when event was returned) +func (w *fen) handleEvent(event *unix.PortEvent) error { + var ( + events = event.Events + path = event.Path + fmode = event.Cookie.(os.FileMode) + reRegister = true + ) + + w.mu.Lock() + _, watchedDir := w.dirs[path] + _, watchedPath := w.watches[path] + w.mu.Unlock() + isWatched := watchedDir || watchedPath + + if events&unix.FILE_DELETE != 0 { + if !w.sendEvent(Event{Name: path, Op: Remove}) { + return nil + } + reRegister = false + } + if events&unix.FILE_RENAME_FROM != 0 { + if !w.sendEvent(Event{Name: path, Op: Rename}) { + return nil + } + // Don't keep watching the new file name + reRegister = false + } + if events&unix.FILE_RENAME_TO != 0 { + // We don't report a Rename event for this case, because Rename events + // are interpreted as referring to the _old_ name of the file, and in + // this case the event would refer to the new name of the file. This + // type of rename event is not supported by fsnotify. + + // inotify reports a Remove event in this case, so we simulate this + // here. + if !w.sendEvent(Event{Name: path, Op: Remove}) { + return nil + } + // Don't keep watching the file that was removed + reRegister = false + } + + // The file is gone, nothing left to do. + if !reRegister { + if watchedDir { + w.mu.Lock() + delete(w.dirs, path) + w.mu.Unlock() + } + if watchedPath { + w.mu.Lock() + delete(w.watches, path) + w.mu.Unlock() + } + return nil + } + + // If we didn't get a deletion the file still exists and we're going to have + // to watch it again. Let's Stat it now so that we can compare permissions + // and have what we need to continue watching the file + + stat, err := os.Lstat(path) + if err != nil { + // This is unexpected, but we should still emit an event. This happens + // most often on "rm -r" of a subdirectory inside a watched directory We + // get a modify event of something happening inside, but by the time we + // get here, the sudirectory is already gone. Clearly we were watching + // this path but now it is gone. Let's tell the user that it was + // removed. + if !w.sendEvent(Event{Name: path, Op: Remove}) { + return nil + } + // Suppress extra write events on removed directories; they are not + // informative and can be confusing. + return nil + } + + // resolve symlinks that were explicitly watched as we would have at Add() + // time. this helps suppress spurious Chmod events on watched symlinks + if isWatched { + stat, err = os.Stat(path) + if err != nil { + // The symlink still exists, but the target is gone. Report the + // Remove similar to above. + if !w.sendEvent(Event{Name: path, Op: Remove}) { + return nil + } + // Don't return the error + } + } + + if events&unix.FILE_MODIFIED != 0 { + if fmode.IsDir() && watchedDir { + if err := w.updateDirectory(path); err != nil { + return err + } + } else { + if !w.sendEvent(Event{Name: path, Op: Write}) { + return nil + } + } + } + if events&unix.FILE_ATTRIB != 0 && stat != nil { + // Only send Chmod if perms changed + if stat.Mode().Perm() != fmode.Perm() { + if !w.sendEvent(Event{Name: path, Op: Chmod}) { + return nil + } + } + } + + if stat != nil { + // If we get here, it means we've hit an event above that requires us to + // continue watching the file or directory + err := w.associateFile(path, stat, isWatched) + if errors.Is(err, fs.ErrNotExist) { + // Path may have been removed since the stat. + err = nil + } + return err + } + return nil +} + +// The directory was modified, so we must find unwatched entities and watch +// them. If something was removed from the directory, nothing will happen, as +// everything else should still be watched. +func (w *fen) updateDirectory(path string) error { + files, err := os.ReadDir(path) + if err != nil { + // Directory no longer exists: probably just deleted since we got the + // event. + if errors.Is(err, fs.ErrNotExist) { + return nil + } + return err + } + + for _, entry := range files { + path := filepath.Join(path, entry.Name()) + if w.port.PathIsWatched(path) { + continue + } + + finfo, err := entry.Info() + if err != nil { + return err + } + err = w.associateFile(path, finfo, false) + if errors.Is(err, fs.ErrNotExist) { + // File may have disappeared between getting the dir listing and + // adding the port: that's okay to ignore. + continue + } + if !w.sendError(err) { + return nil + } + if !w.sendEvent(Event{Name: path, Op: Create}) { + return nil + } + } + return nil +} + +func (w *fen) associateFile(path string, stat os.FileInfo, follow bool) error { + if w.isClosed() { + return ErrClosed + } + // This is primarily protecting the call to AssociatePath but it is + // important and intentional that the call to PathIsWatched is also + // protected by this mutex. Without this mutex, AssociatePath has been seen + // to error out that the path is already associated. + w.mu.Lock() + defer w.mu.Unlock() + + if w.port.PathIsWatched(path) { + // Remove the old association in favor of this one If we get ENOENT, + // then while the x/sys/unix wrapper still thought that this path was + // associated, the underlying event port did not. This call will have + // cleared up that discrepancy. The most likely cause is that the event + // has fired but we haven't processed it yet. + err := w.port.DissociatePath(path) + if err != nil && !errors.Is(err, unix.ENOENT) { + return fmt.Errorf("port.DissociatePath(%q): %w", path, err) + } + } + + var events int + if !follow { + // Watch symlinks themselves rather than their targets unless this entry + // is explicitly watched. + events |= unix.FILE_NOFOLLOW + } + if true { // TODO: implement withOps() + events |= unix.FILE_MODIFIED + } + if true { + events |= unix.FILE_ATTRIB + } + err := w.port.AssociatePath(path, stat, events, stat.Mode()) + if err != nil { + return fmt.Errorf("port.AssociatePath(%q): %w", path, err) + } + return nil +} + +func (w *fen) dissociateFile(path string, stat os.FileInfo, unused bool) error { + if !w.port.PathIsWatched(path) { + return nil + } + err := w.port.DissociatePath(path) + if err != nil { + return fmt.Errorf("port.DissociatePath(%q): %w", path, err) + } + return nil +} + +func (w *fen) WatchList() []string { + if w.isClosed() { + return nil + } + + w.mu.Lock() + defer w.mu.Unlock() + + entries := make([]string, 0, len(w.watches)+len(w.dirs)) + for pathname := range w.dirs { + entries = append(entries, pathname) + } + for pathname := range w.watches { + entries = append(entries, pathname) + } + + return entries +} + +func (w *fen) xSupports(op Op) bool { + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go new file mode 100644 index 0000000000..a36cb89d73 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go @@ -0,0 +1,583 @@ +//go:build linux && !appengine + +package fsnotify + +import ( + "errors" + "fmt" + "io" + "io/fs" + "os" + "path/filepath" + "strings" + "sync" + "time" + "unsafe" + + "github.com/fsnotify/fsnotify/internal" + "golang.org/x/sys/unix" +) + +type inotify struct { + *shared + Events chan Event + Errors chan error + + // Store fd here as os.File.Read() will no longer return on close after + // calling Fd(). See: https://github.com/golang/go/issues/26439 + fd int + inotifyFile *os.File + watches *watches + doneResp chan struct{} // Channel to respond to Close + + // Store rename cookies in an array, with the index wrapping to 0. Almost + // all of the time what we get is a MOVED_FROM to set the cookie and the + // next event inotify sends will be MOVED_TO to read it. However, this is + // not guaranteed – as described in inotify(7) – and we may get other events + // between the two MOVED_* events (including other MOVED_* ones). + // + // A second issue is that moving a file outside the watched directory will + // trigger a MOVED_FROM to set the cookie, but we never see the MOVED_TO to + // read and delete it. So just storing it in a map would slowly leak memory. + // + // Doing it like this gives us a simple fast LRU-cache that won't allocate. + // Ten items should be more than enough for our purpose, and a loop over + // such a short array is faster than a map access anyway (not that it hugely + // matters since we're talking about hundreds of ns at the most, but still). + cookies [10]koekje + cookieIndex uint8 + cookiesMu sync.Mutex +} + +type ( + watches struct { + wd map[uint32]*watch // wd → watch + path map[string]uint32 // pathname → wd + } + watch struct { + wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) + flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) + path string // Watch path. + recurse bool // Recursion with ./...? + } + koekje struct { + cookie uint32 + path string + } +) + +func newWatches() *watches { + return &watches{ + wd: make(map[uint32]*watch), + path: make(map[string]uint32), + } +} + +func (w *watches) byPath(path string) *watch { return w.wd[w.path[path]] } +func (w *watches) byWd(wd uint32) *watch { return w.wd[wd] } +func (w *watches) len() int { return len(w.wd) } +func (w *watches) add(ww *watch) { w.wd[ww.wd] = ww; w.path[ww.path] = ww.wd } +func (w *watches) remove(watch *watch) { delete(w.path, watch.path); delete(w.wd, watch.wd) } + +func (w *watches) removePath(path string) ([]uint32, error) { + path, recurse := recursivePath(path) + wd, ok := w.path[path] + if !ok { + return nil, fmt.Errorf("%w: %s", ErrNonExistentWatch, path) + } + + watch := w.wd[wd] + if recurse && !watch.recurse { + return nil, fmt.Errorf("can't use /... with non-recursive watch %q", path) + } + + delete(w.path, path) + delete(w.wd, wd) + if !watch.recurse { + return []uint32{wd}, nil + } + + wds := make([]uint32, 0, 8) + wds = append(wds, wd) + for p, rwd := range w.path { + if strings.HasPrefix(p, path) { + delete(w.path, p) + delete(w.wd, rwd) + wds = append(wds, rwd) + } + } + return wds, nil +} + +func (w *watches) updatePath(path string, f func(*watch) (*watch, error)) error { + var existing *watch + wd, ok := w.path[path] + if ok { + existing = w.wd[wd] + } + + upd, err := f(existing) + if err != nil { + return err + } + if upd != nil { + w.wd[upd.wd] = upd + w.path[upd.path] = upd.wd + + if upd.wd != wd { + delete(w.wd, wd) + } + } + + return nil +} + +var defaultBufferSize = 0 + +func newBackend(ev chan Event, errs chan error) (backend, error) { + // Need to set nonblocking mode for SetDeadline to work, otherwise blocking + // I/O operations won't terminate on close. + fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK) + if fd == -1 { + return nil, errno + } + + w := &inotify{ + shared: newShared(ev, errs), + Events: ev, + Errors: errs, + fd: fd, + inotifyFile: os.NewFile(uintptr(fd), ""), + watches: newWatches(), + doneResp: make(chan struct{}), + } + + go w.readEvents() + return w, nil +} + +func (w *inotify) Close() error { + if w.shared.close() { + return nil + } + + // Causes any blocking reads to return with an error, provided the file + // still supports deadline operations. + err := w.inotifyFile.Close() + if err != nil { + return err + } + + <-w.doneResp // Wait for readEvents() to finish. + return nil +} + +func (w *inotify) Add(name string) error { return w.AddWith(name) } + +func (w *inotify) AddWith(path string, opts ...addOpt) error { + if w.isClosed() { + return ErrClosed + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), path) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } + + add := func(path string, with withOpts, recurse bool) error { + var flags uint32 + if with.noFollow { + flags |= unix.IN_DONT_FOLLOW + } + if with.op.Has(Create) { + flags |= unix.IN_CREATE + } + if with.op.Has(Write) { + flags |= unix.IN_MODIFY + } + if with.op.Has(Remove) { + flags |= unix.IN_DELETE | unix.IN_DELETE_SELF + } + if with.op.Has(Rename) { + flags |= unix.IN_MOVED_TO | unix.IN_MOVED_FROM | unix.IN_MOVE_SELF + } + if with.op.Has(Chmod) { + flags |= unix.IN_ATTRIB + } + if with.op.Has(xUnportableOpen) { + flags |= unix.IN_OPEN + } + if with.op.Has(xUnportableRead) { + flags |= unix.IN_ACCESS + } + if with.op.Has(xUnportableCloseWrite) { + flags |= unix.IN_CLOSE_WRITE + } + if with.op.Has(xUnportableCloseRead) { + flags |= unix.IN_CLOSE_NOWRITE + } + return w.register(path, flags, recurse) + } + + w.mu.Lock() + defer w.mu.Unlock() + path, recurse := recursivePath(path) + if recurse { + return filepath.WalkDir(path, func(root string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if !d.IsDir() { + if root == path { + return fmt.Errorf("fsnotify: not a directory: %q", path) + } + return nil + } + + // Send a Create event when adding new directory from a recursive + // watch; this is for "mkdir -p one/two/three". Usually all those + // directories will be created before we can set up watchers on the + // subdirectories, so only "one" would be sent as a Create event and + // not "one/two" and "one/two/three" (inotifywait -r has the same + // problem). + if with.sendCreate && root != path { + w.sendEvent(Event{Name: root, Op: Create}) + } + + return add(root, with, true) + }) + } + + return add(path, with, false) +} + +func (w *inotify) register(path string, flags uint32, recurse bool) error { + return w.watches.updatePath(path, func(existing *watch) (*watch, error) { + if existing != nil { + flags |= existing.flags | unix.IN_MASK_ADD + } + + wd, err := unix.InotifyAddWatch(w.fd, path, flags) + if wd == -1 { + return nil, err + } + + if e, ok := w.watches.wd[uint32(wd)]; ok { + return e, nil + } + + if existing == nil { + return &watch{ + wd: uint32(wd), + path: path, + flags: flags, + recurse: recurse, + }, nil + } + + existing.wd = uint32(wd) + existing.flags = flags + return existing, nil + }) +} + +func (w *inotify) Remove(name string) error { + if w.isClosed() { + return nil + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + + w.mu.Lock() + defer w.mu.Unlock() + return w.remove(filepath.Clean(name)) +} + +func (w *inotify) remove(name string) error { + wds, err := w.watches.removePath(name) + if err != nil { + return err + } + + for _, wd := range wds { + _, err := unix.InotifyRmWatch(w.fd, wd) + if err != nil { + // TODO: Perhaps it's not helpful to return an error here in every + // case; the only two possible errors are: + // + // EBADF, which happens when w.fd is not a valid file descriptor of + // any kind. + // + // EINVAL, which is when fd is not an inotify descriptor or wd is + // not a valid watch descriptor. Watch descriptors are invalidated + // when they are removed explicitly or implicitly; explicitly by + // inotify_rm_watch, implicitly when the file they are watching is + // deleted. + return err + } + } + return nil +} + +func (w *inotify) WatchList() []string { + if w.isClosed() { + return nil + } + + w.mu.Lock() + defer w.mu.Unlock() + entries := make([]string, 0, w.watches.len()) + for pathname := range w.watches.path { + entries = append(entries, pathname) + } + return entries +} + +// readEvents reads from the inotify file descriptor, converts the +// received events into Event objects and sends them via the Events channel +func (w *inotify) readEvents() { + defer func() { + close(w.doneResp) + close(w.Errors) + close(w.Events) + }() + + var buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events + for { + if w.isClosed() { + return + } + + n, err := w.inotifyFile.Read(buf[:]) + if err != nil { + if errors.Is(err, os.ErrClosed) { + return + } + if !w.sendError(err) { + return + } + continue + } + + if n < unix.SizeofInotifyEvent { + err := errors.New("notify: short read in readEvents()") // Read was too short. + if n == 0 { + err = io.EOF // If EOF is received. This should really never happen. + } + if !w.sendError(err) { + return + } + continue + } + + // We don't know how many events we just read into the buffer While the + // offset points to at least one whole event. + var offset uint32 + for offset <= uint32(n-unix.SizeofInotifyEvent) { + // Point to the event in the buffer. + inEvent := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) + + if inEvent.Mask&unix.IN_Q_OVERFLOW != 0 { + if !w.sendError(ErrEventOverflow) { + return + } + } + + ev, ok := w.handleEvent(inEvent, &buf, offset) + if !ok { + return + } + if !w.sendEvent(ev) { + return + } + + // Move to the next event in the buffer + offset += unix.SizeofInotifyEvent + inEvent.Len + } + } +} + +func (w *inotify) handleEvent(inEvent *unix.InotifyEvent, buf *[65536]byte, offset uint32) (Event, bool) { + w.mu.Lock() + defer w.mu.Unlock() + + /// If the event happened to the watched directory or the watched file, the + /// kernel doesn't append the filename to the event, but we would like to + /// always fill the the "Name" field with a valid filename. We retrieve the + /// path of the watch from the "paths" map. + /// + /// Can be nil if Remove() was called in another goroutine for this path + /// inbetween reading the events from the kernel and reading the internal + /// state. Not much we can do about it, so just skip. See #616. + watch := w.watches.byWd(uint32(inEvent.Wd)) + if watch == nil { + return Event{}, true + } + + var ( + name = watch.path + nameLen = uint32(inEvent.Len) + ) + if nameLen > 0 { + /// Point "bytes" at the first byte of the filename + bb := *buf + bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&bb[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] + /// The filename is padded with NULL bytes. TrimRight() gets rid of those. + name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\x00") + } + + if debug { + internal.Debug(name, inEvent.Mask, inEvent.Cookie) + } + + if inEvent.Mask&unix.IN_IGNORED != 0 || inEvent.Mask&unix.IN_UNMOUNT != 0 { + w.watches.remove(watch) + return Event{}, true + } + + // inotify will automatically remove the watch on deletes; just need + // to clean our state here. + if inEvent.Mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF { + w.watches.remove(watch) + } + + // We can't really update the state when a watched path is moved; only + // IN_MOVE_SELF is sent and not IN_MOVED_{FROM,TO}. So remove the watch. + if inEvent.Mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF { + if watch.recurse { // Do nothing + return Event{}, true + } + + err := w.remove(watch.path) + if err != nil && !errors.Is(err, ErrNonExistentWatch) { + if !w.sendError(err) { + return Event{}, false + } + } + } + + /// Skip if we're watching both this path and the parent; the parent will + /// already send a delete so no need to do it twice. + if inEvent.Mask&unix.IN_DELETE_SELF != 0 { + _, ok := w.watches.path[filepath.Dir(watch.path)] + if ok { + return Event{}, true + } + } + + ev := w.newEvent(name, inEvent.Mask, inEvent.Cookie) + // Need to update watch path for recurse. + if watch.recurse { + isDir := inEvent.Mask&unix.IN_ISDIR == unix.IN_ISDIR + /// New directory created: set up watch on it. + if isDir && ev.Has(Create) { + err := w.register(ev.Name, watch.flags, true) + if !w.sendError(err) { + return Event{}, false + } + + // This was a directory rename, so we need to update all the + // children. + // + // TODO: this is of course pretty slow; we should use a better data + // structure for storing all of this, e.g. store children in the + // watch. I have some code for this in my kqueue refactor we can use + // in the future. For now I'm okay with this as it's not publicly + // available. Correctness first, performance second. + if ev.renamedFrom != "" { + for k, ww := range w.watches.wd { + if k == watch.wd || ww.path == ev.Name { + continue + } + if strings.HasPrefix(ww.path, ev.renamedFrom) { + ww.path = strings.Replace(ww.path, ev.renamedFrom, ev.Name, 1) + w.watches.wd[k] = ww + } + } + } + } + } + + return ev, true +} + +func (w *inotify) isRecursive(path string) bool { + ww := w.watches.byPath(path) + if ww == nil { // path could be a file, so also check the Dir. + ww = w.watches.byPath(filepath.Dir(path)) + } + return ww != nil && ww.recurse +} + +func (w *inotify) newEvent(name string, mask, cookie uint32) Event { + e := Event{Name: name} + if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { + e.Op |= Create + } + if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { + e.Op |= Remove + } + if mask&unix.IN_MODIFY == unix.IN_MODIFY { + e.Op |= Write + } + if mask&unix.IN_OPEN == unix.IN_OPEN { + e.Op |= xUnportableOpen + } + if mask&unix.IN_ACCESS == unix.IN_ACCESS { + e.Op |= xUnportableRead + } + if mask&unix.IN_CLOSE_WRITE == unix.IN_CLOSE_WRITE { + e.Op |= xUnportableCloseWrite + } + if mask&unix.IN_CLOSE_NOWRITE == unix.IN_CLOSE_NOWRITE { + e.Op |= xUnportableCloseRead + } + if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { + e.Op |= Rename + } + if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { + e.Op |= Chmod + } + + if cookie != 0 { + if mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { + w.cookiesMu.Lock() + w.cookies[w.cookieIndex] = koekje{cookie: cookie, path: e.Name} + w.cookieIndex++ + if w.cookieIndex > 9 { + w.cookieIndex = 0 + } + w.cookiesMu.Unlock() + } else if mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { + w.cookiesMu.Lock() + var prev string + for _, c := range w.cookies { + if c.cookie == cookie { + prev = c.path + break + } + } + w.cookiesMu.Unlock() + e.renamedFrom = prev + } + } + return e +} + +func (w *inotify) xSupports(op Op) bool { + return true // Supports everything. +} + +func (w *inotify) state() { + w.mu.Lock() + defer w.mu.Unlock() + for wd, ww := range w.watches.wd { + fmt.Fprintf(os.Stderr, "%4d: recurse=%t %q\n", wd, ww.recurse, ww.path) + } +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go new file mode 100644 index 0000000000..340aeec061 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go @@ -0,0 +1,705 @@ +//go:build freebsd || openbsd || netbsd || dragonfly || darwin + +package fsnotify + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "runtime" + "sync" + "time" + + "github.com/fsnotify/fsnotify/internal" + "golang.org/x/sys/unix" +) + +type kqueue struct { + *shared + Events chan Event + Errors chan error + + kq int // File descriptor (as returned by the kqueue() syscall). + closepipe [2]int // Pipe used for closing kq. + watches *watches +} + +type ( + watches struct { + mu sync.RWMutex + wd map[int]watch // wd → watch + path map[string]int // pathname → wd + byDir map[string]map[int]struct{} // dirname(path) → wd + seen map[string]struct{} // Keep track of if we know this file exists. + byUser map[string]struct{} // Watches added with Watcher.Add() + } + watch struct { + wd int + name string + linkName string // In case of links; name is the target, and this is the link. + isDir bool + dirFlags uint32 + } +) + +func newWatches() *watches { + return &watches{ + wd: make(map[int]watch), + path: make(map[string]int), + byDir: make(map[string]map[int]struct{}), + seen: make(map[string]struct{}), + byUser: make(map[string]struct{}), + } +} + +func (w *watches) listPaths(userOnly bool) []string { + w.mu.RLock() + defer w.mu.RUnlock() + + if userOnly { + l := make([]string, 0, len(w.byUser)) + for p := range w.byUser { + l = append(l, p) + } + return l + } + + l := make([]string, 0, len(w.path)) + for p := range w.path { + l = append(l, p) + } + return l +} + +func (w *watches) watchesInDir(path string) []string { + w.mu.RLock() + defer w.mu.RUnlock() + + l := make([]string, 0, 4) + for fd := range w.byDir[path] { + info := w.wd[fd] + if _, ok := w.byUser[info.name]; !ok { + l = append(l, info.name) + } + } + return l +} + +// Mark path as added by the user. +func (w *watches) addUserWatch(path string) { + w.mu.Lock() + defer w.mu.Unlock() + w.byUser[path] = struct{}{} +} + +func (w *watches) addLink(path string, fd int) { + w.mu.Lock() + defer w.mu.Unlock() + + w.path[path] = fd + w.seen[path] = struct{}{} +} + +func (w *watches) add(path, linkPath string, fd int, isDir bool) { + w.mu.Lock() + defer w.mu.Unlock() + + w.path[path] = fd + w.wd[fd] = watch{wd: fd, name: path, linkName: linkPath, isDir: isDir} + + parent := filepath.Dir(path) + byDir, ok := w.byDir[parent] + if !ok { + byDir = make(map[int]struct{}, 1) + w.byDir[parent] = byDir + } + byDir[fd] = struct{}{} +} + +func (w *watches) byWd(fd int) (watch, bool) { + w.mu.RLock() + defer w.mu.RUnlock() + info, ok := w.wd[fd] + return info, ok +} + +func (w *watches) byPath(path string) (watch, bool) { + w.mu.RLock() + defer w.mu.RUnlock() + info, ok := w.wd[w.path[path]] + return info, ok +} + +func (w *watches) updateDirFlags(path string, flags uint32) bool { + w.mu.Lock() + defer w.mu.Unlock() + + fd, ok := w.path[path] + if !ok { // Already deleted: don't re-set it here. + return false + } + info := w.wd[fd] + info.dirFlags = flags + w.wd[fd] = info + return true +} + +func (w *watches) remove(fd int, path string) bool { + w.mu.Lock() + defer w.mu.Unlock() + + isDir := w.wd[fd].isDir + delete(w.path, path) + delete(w.byUser, path) + + parent := filepath.Dir(path) + delete(w.byDir[parent], fd) + + if len(w.byDir[parent]) == 0 { + delete(w.byDir, parent) + } + + delete(w.wd, fd) + delete(w.seen, path) + return isDir +} + +func (w *watches) markSeen(path string, exists bool) { + w.mu.Lock() + defer w.mu.Unlock() + if exists { + w.seen[path] = struct{}{} + } else { + delete(w.seen, path) + } +} + +func (w *watches) seenBefore(path string) bool { + w.mu.RLock() + defer w.mu.RUnlock() + _, ok := w.seen[path] + return ok +} + +var defaultBufferSize = 0 + +func newBackend(ev chan Event, errs chan error) (backend, error) { + kq, closepipe, err := newKqueue() + if err != nil { + return nil, err + } + + w := &kqueue{ + shared: newShared(ev, errs), + Events: ev, + Errors: errs, + kq: kq, + closepipe: closepipe, + watches: newWatches(), + } + + go w.readEvents() + return w, nil +} + +// newKqueue creates a new kernel event queue and returns a descriptor. +// +// This registers a new event on closepipe, which will trigger an event when +// it's closed. This way we can use kevent() without timeout/polling; without +// the closepipe, it would block forever and we wouldn't be able to stop it at +// all. +func newKqueue() (kq int, closepipe [2]int, err error) { + kq, err = unix.Kqueue() + if err != nil { + return kq, closepipe, err + } + + // Register the close pipe. + err = unix.Pipe(closepipe[:]) + if err != nil { + unix.Close(kq) + return kq, closepipe, err + } + unix.CloseOnExec(closepipe[0]) + unix.CloseOnExec(closepipe[1]) + + // Register changes to listen on the closepipe. + changes := make([]unix.Kevent_t, 1) + // SetKevent converts int to the platform-specific types. + unix.SetKevent(&changes[0], closepipe[0], unix.EVFILT_READ, + unix.EV_ADD|unix.EV_ENABLE|unix.EV_ONESHOT) + + ok, err := unix.Kevent(kq, changes, nil, nil) + if ok == -1 { + unix.Close(kq) + unix.Close(closepipe[0]) + unix.Close(closepipe[1]) + return kq, closepipe, err + } + return kq, closepipe, nil +} + +func (w *kqueue) Close() error { + if w.shared.close() { + return nil + } + + pathsToRemove := w.watches.listPaths(false) + for _, name := range pathsToRemove { + w.Remove(name) + } + + unix.Close(w.closepipe[1]) // Send "quit" message to readEvents + return nil +} + +func (w *kqueue) Add(name string) error { return w.AddWith(name) } + +func (w *kqueue) AddWith(name string, opts ...addOpt) error { + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } + + _, err := w.addWatch(name, noteAllEvents, false) + if err != nil { + return err + } + w.watches.addUserWatch(name) + return nil +} + +func (w *kqueue) Remove(name string) error { + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), name) + } + return w.remove(name, true) +} + +func (w *kqueue) remove(name string, unwatchFiles bool) error { + if w.isClosed() { + return nil + } + + name = filepath.Clean(name) + info, ok := w.watches.byPath(name) + if !ok { + return fmt.Errorf("%w: %s", ErrNonExistentWatch, name) + } + + err := w.register([]int{info.wd}, unix.EV_DELETE, 0) + if err != nil { + return err + } + + unix.Close(info.wd) + + isDir := w.watches.remove(info.wd, name) + + // Find all watched paths that are in this directory that are not external. + if unwatchFiles && isDir { + pathsToRemove := w.watches.watchesInDir(name) + for _, name := range pathsToRemove { + // Since these are internal, not much sense in propagating error to + // the user, as that will just confuse them with an error about a + // path they did not explicitly watch themselves. + w.Remove(name) + } + } + return nil +} + +func (w *kqueue) WatchList() []string { + if w.isClosed() { + return nil + } + return w.watches.listPaths(true) +} + +// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) +const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME + +// addWatch adds name to the watched file set; the flags are interpreted as +// described in kevent(2). +// +// Returns the real path to the file which was added, with symlinks resolved. +func (w *kqueue) addWatch(name string, flags uint32, listDir bool) (string, error) { + if w.isClosed() { + return "", ErrClosed + } + + name = filepath.Clean(name) + + info, alreadyWatching := w.watches.byPath(name) + if !alreadyWatching { + fi, err := os.Lstat(name) + if err != nil { + return "", err + } + + // Don't watch sockets or named pipes. + if (fi.Mode()&os.ModeSocket == os.ModeSocket) || (fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe) { + return "", nil + } + + // Follow symlinks, but only for paths added with Add(), and not paths + // we're adding from internalWatch from a listdir. + if !listDir && fi.Mode()&os.ModeSymlink == os.ModeSymlink { + link, err := os.Readlink(name) + if err != nil { + return "", err + } + if !filepath.IsAbs(link) { + link = filepath.Join(filepath.Dir(name), link) + } + + _, alreadyWatching = w.watches.byPath(link) + if alreadyWatching { + // Add to watches so we don't get spurious Create events later + // on when we diff the directories. + w.watches.addLink(name, 0) + return link, nil + } + + info.linkName = name + name = link + fi, err = os.Lstat(name) + if err != nil { + return "", err + } + } + + // Retry on EINTR; open() can return EINTR in practice on macOS. + // See #354, and Go issues 11180 and 39237. + for { + info.wd, err = unix.Open(name, openMode, 0) + if err == nil { + break + } + if errors.Is(err, unix.EINTR) { + continue + } + return "", err + } + + info.isDir = fi.IsDir() + } + + err := w.register([]int{info.wd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags) + if err != nil { + unix.Close(info.wd) + return "", err + } + + if !alreadyWatching { + w.watches.add(name, info.linkName, info.wd, info.isDir) + } + + // Watch the directory if it has not been watched before, or if it was + // watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) + if info.isDir { + watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && + (!alreadyWatching || (info.dirFlags&unix.NOTE_WRITE) != unix.NOTE_WRITE) + if !w.watches.updateDirFlags(name, flags) { + return "", nil + } + + if watchDir { + d := name + if info.linkName != "" { + d = info.linkName + } + if err := w.watchDirectoryFiles(d); err != nil { + return "", err + } + } + } + return name, nil +} + +// readEvents reads from kqueue and converts the received kevents into +// Event values that it sends down the Events channel. +func (w *kqueue) readEvents() { + defer func() { + close(w.Events) + close(w.Errors) + _ = unix.Close(w.kq) + unix.Close(w.closepipe[0]) + }() + + eventBuffer := make([]unix.Kevent_t, 10) + for { + kevents, err := w.read(eventBuffer) + // EINTR is okay, the syscall was interrupted before timeout expired. + if err != nil && err != unix.EINTR { + if !w.sendError(fmt.Errorf("fsnotify.readEvents: %w", err)) { + return + } + } + + for _, kevent := range kevents { + var ( + wd = int(kevent.Ident) + mask = uint32(kevent.Fflags) + ) + + // Shut down the loop when the pipe is closed, but only after all + // other events have been processed. + if wd == w.closepipe[0] { + return + } + + path, ok := w.watches.byWd(wd) + if debug { + internal.Debug(path.name, &kevent) + } + + // On macOS it seems that sometimes an event with Ident=0 is + // delivered, and no other flags/information beyond that, even + // though we never saw such a file descriptor. For example in + // TestWatchSymlink/277 (usually at the end, but sometimes sooner): + // + // fmt.Printf("READ: %2d %#v\n", kevent.Ident, kevent) + // unix.Kevent_t{Ident:0x2a, Filter:-4, Flags:0x25, Fflags:0x2, Data:0, Udata:(*uint8)(nil)} + // unix.Kevent_t{Ident:0x0, Filter:-4, Flags:0x25, Fflags:0x2, Data:0, Udata:(*uint8)(nil)} + // + // The first is a normal event, the second with Ident 0. No error + // flag, no data, no ... nothing. + // + // I read a bit through bsd/kern_event.c from the xnu source, but I + // don't really see an obvious location where this is triggered – + // this doesn't seem intentional, but idk... + // + // Technically fd 0 is a valid descriptor, so only skip it if + // there's no path, and if we're on macOS. + if !ok && kevent.Ident == 0 && runtime.GOOS == "darwin" { + continue + } + + event := w.newEvent(path.name, path.linkName, mask) + + if event.Has(Rename) || event.Has(Remove) { + w.remove(event.Name, false) + w.watches.markSeen(event.Name, false) + } + + if path.isDir && event.Has(Write) && !event.Has(Remove) { + w.dirChange(event.Name) + } else if !w.sendEvent(event) { + return + } + + if event.Has(Remove) { + // Look for a file that may have overwritten this; for example, + // mv f1 f2 will delete f2, then create f2. + if path.isDir { + fileDir := filepath.Clean(event.Name) + _, found := w.watches.byPath(fileDir) + if found { + // TODO: this branch is never triggered in any test. + // Added in d6220df (2012). + // isDir check added in 8611c35 (2016): https://github.com/fsnotify/fsnotify/pull/111 + // + // I don't really get how this can be triggered either. + // And it wasn't triggered in the patch that added it, + // either. + // + // Original also had a comment: + // make sure the directory exists before we watch for + // changes. When we do a recursive watch and perform + // rm -rf, the parent directory might have gone + // missing, ignore the missing directory and let the + // upcoming delete event remove the watch from the + // parent directory. + err := w.dirChange(fileDir) + if !w.sendError(err) { + return + } + } + } else { + path := filepath.Clean(event.Name) + if fi, err := os.Lstat(path); err == nil { + err := w.sendCreateIfNew(path, fi) + if !w.sendError(err) { + return + } + } + } + } + } + } +} + +// newEvent returns an platform-independent Event based on kqueue Fflags. +func (w *kqueue) newEvent(name, linkName string, mask uint32) Event { + e := Event{Name: name} + if linkName != "" { + // If the user watched "/path/link" then emit events as "/path/link" + // rather than "/path/target". + e.Name = linkName + } + + if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { + e.Op |= Remove + } + if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { + e.Op |= Write + } + if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { + e.Op |= Rename + } + if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { + e.Op |= Chmod + } + // No point sending a write and delete event at the same time: if it's gone, + // then it's gone. + if e.Op.Has(Write) && e.Op.Has(Remove) { + e.Op &^= Write + } + return e +} + +// watchDirectoryFiles to mimic inotify when adding a watch on a directory +func (w *kqueue) watchDirectoryFiles(dirPath string) error { + files, err := os.ReadDir(dirPath) + if err != nil { + return err + } + + for _, f := range files { + path := filepath.Join(dirPath, f.Name()) + + fi, err := f.Info() + if err != nil { + return fmt.Errorf("%q: %w", path, err) + } + + cleanPath, err := w.internalWatch(path, fi) + if err != nil { + // No permission to read the file; that's not a problem: just skip. + // But do add it to w.fileExists to prevent it from being picked up + // as a "new" file later (it still shows up in the directory + // listing). + switch { + case errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM): + cleanPath = filepath.Clean(path) + default: + return fmt.Errorf("%q: %w", path, err) + } + } + + w.watches.markSeen(cleanPath, true) + } + + return nil +} + +// Search the directory for new files and send an event for them. +// +// This functionality is to have the BSD watcher match the inotify, which sends +// a create event for files created in a watched directory. +func (w *kqueue) dirChange(dir string) error { + files, err := os.ReadDir(dir) + if err != nil { + // Directory no longer exists: we can ignore this safely. kqueue will + // still give us the correct events. + if errors.Is(err, os.ErrNotExist) { + return nil + } + return fmt.Errorf("fsnotify.dirChange %q: %w", dir, err) + } + + for _, f := range files { + fi, err := f.Info() + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil + } + return fmt.Errorf("fsnotify.dirChange: %w", err) + } + + err = w.sendCreateIfNew(filepath.Join(dir, fi.Name()), fi) + if err != nil { + // Don't need to send an error if this file isn't readable. + if errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM) || errors.Is(err, os.ErrNotExist) { + return nil + } + return fmt.Errorf("fsnotify.dirChange: %w", err) + } + } + return nil +} + +// Send a create event if the file isn't already being tracked, and start +// watching this file. +func (w *kqueue) sendCreateIfNew(path string, fi os.FileInfo) error { + if !w.watches.seenBefore(path) { + if !w.sendEvent(Event{Name: path, Op: Create}) { + return nil + } + } + + // Like watchDirectoryFiles, but without doing another ReadDir. + path, err := w.internalWatch(path, fi) + if err != nil { + return err + } + w.watches.markSeen(path, true) + return nil +} + +func (w *kqueue) internalWatch(name string, fi os.FileInfo) (string, error) { + if fi.IsDir() { + // mimic Linux providing delete events for subdirectories, but preserve + // the flags used if currently watching subdirectory + info, _ := w.watches.byPath(name) + return w.addWatch(name, info.dirFlags|unix.NOTE_DELETE|unix.NOTE_RENAME, true) + } + + // Watch file to mimic Linux inotify. + return w.addWatch(name, noteAllEvents, true) +} + +// Register events with the queue. +func (w *kqueue) register(fds []int, flags int, fflags uint32) error { + changes := make([]unix.Kevent_t, len(fds)) + for i, fd := range fds { + // SetKevent converts int to the platform-specific types. + unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) + changes[i].Fflags = fflags + } + + // Register the events. + success, err := unix.Kevent(w.kq, changes, nil, nil) + if success == -1 { + return err + } + return nil +} + +// read retrieves pending events, or waits until an event occurs. +func (w *kqueue) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) { + n, err := unix.Kevent(w.kq, nil, events, nil) + if err != nil { + return nil, err + } + return events[0:n], nil +} + +func (w *kqueue) xSupports(op Op) bool { + //if runtime.GOOS == "freebsd" { + // return true // Supports everything. + //} + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/backend_other.go b/vendor/github.com/fsnotify/fsnotify/backend_other.go new file mode 100644 index 0000000000..b8c0ad7226 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/backend_other.go @@ -0,0 +1,22 @@ +//go:build appengine || (!darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows) + +package fsnotify + +import "errors" + +type other struct { + Events chan Event + Errors chan error +} + +var defaultBufferSize = 0 + +func newBackend(ev chan Event, errs chan error) (backend, error) { + return nil, errors.New("fsnotify not supported on the current platform") +} +func (w *other) Close() error { return nil } +func (w *other) WatchList() []string { return nil } +func (w *other) Add(name string) error { return nil } +func (w *other) AddWith(name string, opts ...addOpt) error { return nil } +func (w *other) Remove(name string) error { return nil } +func (w *other) xSupports(op Op) bool { return false } diff --git a/vendor/github.com/fsnotify/fsnotify/backend_windows.go b/vendor/github.com/fsnotify/fsnotify/backend_windows.go new file mode 100644 index 0000000000..3433642d64 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/backend_windows.go @@ -0,0 +1,680 @@ +//go:build windows + +// Windows backend based on ReadDirectoryChangesW() +// +// https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw + +package fsnotify + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "reflect" + "runtime" + "strings" + "sync" + "time" + "unsafe" + + "github.com/fsnotify/fsnotify/internal" + "golang.org/x/sys/windows" +) + +type readDirChangesW struct { + Events chan Event + Errors chan error + + port windows.Handle // Handle to completion port + input chan *input // Inputs to the reader are sent on this channel + done chan chan<- error + + mu sync.Mutex // Protects access to watches, closed + watches watchMap // Map of watches (key: i-number) + closed bool // Set to true when Close() is first called +} + +var defaultBufferSize = 50 + +func newBackend(ev chan Event, errs chan error) (backend, error) { + port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0) + if err != nil { + return nil, os.NewSyscallError("CreateIoCompletionPort", err) + } + w := &readDirChangesW{ + Events: ev, + Errors: errs, + port: port, + watches: make(watchMap), + input: make(chan *input, 1), + done: make(chan chan<- error, 1), + } + go w.readEvents() + return w, nil +} + +func (w *readDirChangesW) isClosed() bool { + w.mu.Lock() + defer w.mu.Unlock() + return w.closed +} + +func (w *readDirChangesW) sendEvent(name, renamedFrom string, mask uint64) bool { + if mask == 0 { + return false + } + + event := w.newEvent(name, uint32(mask)) + event.renamedFrom = renamedFrom + select { + case ch := <-w.done: + w.done <- ch + case w.Events <- event: + } + return true +} + +// Returns true if the error was sent, or false if watcher is closed. +func (w *readDirChangesW) sendError(err error) bool { + if err == nil { + return true + } + select { + case <-w.done: + return false + case w.Errors <- err: + return true + } +} + +func (w *readDirChangesW) Close() error { + if w.isClosed() { + return nil + } + + w.mu.Lock() + w.closed = true + w.mu.Unlock() + + // Send "done" message to the reader goroutine + ch := make(chan error) + w.done <- ch + if err := w.wakeupReader(); err != nil { + return err + } + return <-ch +} + +func (w *readDirChangesW) Add(name string) error { return w.AddWith(name) } + +func (w *readDirChangesW) AddWith(name string, opts ...addOpt) error { + if w.isClosed() { + return ErrClosed + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s AddWith(%q)\n", + time.Now().Format("15:04:05.000000000"), filepath.ToSlash(name)) + } + + with := getOptions(opts...) + if !w.xSupports(with.op) { + return fmt.Errorf("%w: %s", xErrUnsupported, with.op) + } + if with.bufsize < 4096 { + return fmt.Errorf("fsnotify.WithBufferSize: buffer size cannot be smaller than 4096 bytes") + } + + in := &input{ + op: opAddWatch, + path: filepath.Clean(name), + flags: sysFSALLEVENTS, + reply: make(chan error), + bufsize: with.bufsize, + } + w.input <- in + if err := w.wakeupReader(); err != nil { + return err + } + return <-in.reply +} + +func (w *readDirChangesW) Remove(name string) error { + if w.isClosed() { + return nil + } + if debug { + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s Remove(%q)\n", + time.Now().Format("15:04:05.000000000"), filepath.ToSlash(name)) + } + + in := &input{ + op: opRemoveWatch, + path: filepath.Clean(name), + reply: make(chan error), + } + w.input <- in + if err := w.wakeupReader(); err != nil { + return err + } + return <-in.reply +} + +func (w *readDirChangesW) WatchList() []string { + if w.isClosed() { + return nil + } + + w.mu.Lock() + defer w.mu.Unlock() + + entries := make([]string, 0, len(w.watches)) + for _, entry := range w.watches { + for _, watchEntry := range entry { + for name := range watchEntry.names { + entries = append(entries, filepath.Join(watchEntry.path, name)) + } + // the directory itself is being watched + if watchEntry.mask != 0 { + entries = append(entries, watchEntry.path) + } + } + } + + return entries +} + +// These options are from the old golang.org/x/exp/winfsnotify, where you could +// add various options to the watch. This has long since been removed. +// +// The "sys" in the name is misleading as they're not part of any "system". +// +// This should all be removed at some point, and just use windows.FILE_NOTIFY_* +const ( + sysFSALLEVENTS = 0xfff + sysFSCREATE = 0x100 + sysFSDELETE = 0x200 + sysFSDELETESELF = 0x400 + sysFSMODIFY = 0x2 + sysFSMOVE = 0xc0 + sysFSMOVEDFROM = 0x40 + sysFSMOVEDTO = 0x80 + sysFSMOVESELF = 0x800 + sysFSIGNORED = 0x8000 +) + +func (w *readDirChangesW) newEvent(name string, mask uint32) Event { + e := Event{Name: name} + if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { + e.Op |= Create + } + if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF { + e.Op |= Remove + } + if mask&sysFSMODIFY == sysFSMODIFY { + e.Op |= Write + } + if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM { + e.Op |= Rename + } + return e +} + +const ( + opAddWatch = iota + opRemoveWatch +) + +const ( + provisional uint64 = 1 << (32 + iota) +) + +type input struct { + op int + path string + flags uint32 + bufsize int + reply chan error +} + +type inode struct { + handle windows.Handle + volume uint32 + index uint64 +} + +type watch struct { + ov windows.Overlapped + ino *inode // i-number + recurse bool // Recursive watch? + path string // Directory path + mask uint64 // Directory itself is being watched with these notify flags + names map[string]uint64 // Map of names being watched and their notify flags + rename string // Remembers the old name while renaming a file + buf []byte // buffer, allocated later +} + +type ( + indexMap map[uint64]*watch + watchMap map[uint32]indexMap +) + +func (w *readDirChangesW) wakeupReader() error { + err := windows.PostQueuedCompletionStatus(w.port, 0, 0, nil) + if err != nil { + return os.NewSyscallError("PostQueuedCompletionStatus", err) + } + return nil +} + +func (w *readDirChangesW) getDir(pathname string) (dir string, err error) { + attr, err := windows.GetFileAttributes(windows.StringToUTF16Ptr(pathname)) + if err != nil { + return "", os.NewSyscallError("GetFileAttributes", err) + } + if attr&windows.FILE_ATTRIBUTE_DIRECTORY != 0 { + dir = pathname + } else { + dir, _ = filepath.Split(pathname) + dir = filepath.Clean(dir) + } + return +} + +func (w *readDirChangesW) getIno(path string) (ino *inode, err error) { + h, err := windows.CreateFile(windows.StringToUTF16Ptr(path), + windows.FILE_LIST_DIRECTORY, + windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE, + nil, windows.OPEN_EXISTING, + windows.FILE_FLAG_BACKUP_SEMANTICS|windows.FILE_FLAG_OVERLAPPED, 0) + if err != nil { + return nil, os.NewSyscallError("CreateFile", err) + } + + var fi windows.ByHandleFileInformation + err = windows.GetFileInformationByHandle(h, &fi) + if err != nil { + windows.CloseHandle(h) + return nil, os.NewSyscallError("GetFileInformationByHandle", err) + } + ino = &inode{ + handle: h, + volume: fi.VolumeSerialNumber, + index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow), + } + return ino, nil +} + +// Must run within the I/O thread. +func (m watchMap) get(ino *inode) *watch { + if i := m[ino.volume]; i != nil { + return i[ino.index] + } + return nil +} + +// Must run within the I/O thread. +func (m watchMap) set(ino *inode, watch *watch) { + i := m[ino.volume] + if i == nil { + i = make(indexMap) + m[ino.volume] = i + } + i[ino.index] = watch +} + +// Must run within the I/O thread. +func (w *readDirChangesW) addWatch(pathname string, flags uint64, bufsize int) error { + pathname, recurse := recursivePath(pathname) + + dir, err := w.getDir(pathname) + if err != nil { + return err + } + + ino, err := w.getIno(dir) + if err != nil { + return err + } + w.mu.Lock() + watchEntry := w.watches.get(ino) + w.mu.Unlock() + if watchEntry == nil { + _, err := windows.CreateIoCompletionPort(ino.handle, w.port, 0, 0) + if err != nil { + windows.CloseHandle(ino.handle) + return os.NewSyscallError("CreateIoCompletionPort", err) + } + watchEntry = &watch{ + ino: ino, + path: dir, + names: make(map[string]uint64), + recurse: recurse, + buf: make([]byte, bufsize), + } + w.mu.Lock() + w.watches.set(ino, watchEntry) + w.mu.Unlock() + flags |= provisional + } else { + windows.CloseHandle(ino.handle) + } + if pathname == dir { + watchEntry.mask |= flags + } else { + watchEntry.names[filepath.Base(pathname)] |= flags + } + + err = w.startRead(watchEntry) + if err != nil { + return err + } + + if pathname == dir { + watchEntry.mask &= ^provisional + } else { + watchEntry.names[filepath.Base(pathname)] &= ^provisional + } + return nil +} + +// Must run within the I/O thread. +func (w *readDirChangesW) remWatch(pathname string) error { + pathname, recurse := recursivePath(pathname) + + dir, err := w.getDir(pathname) + if err != nil { + return err + } + ino, err := w.getIno(dir) + if err != nil { + return err + } + + w.mu.Lock() + watch := w.watches.get(ino) + w.mu.Unlock() + + if recurse && !watch.recurse { + return fmt.Errorf("can't use \\... with non-recursive watch %q", pathname) + } + + err = windows.CloseHandle(ino.handle) + if err != nil { + w.sendError(os.NewSyscallError("CloseHandle", err)) + } + if watch == nil { + return fmt.Errorf("%w: %s", ErrNonExistentWatch, pathname) + } + if pathname == dir { + w.sendEvent(watch.path, "", watch.mask&sysFSIGNORED) + watch.mask = 0 + } else { + name := filepath.Base(pathname) + w.sendEvent(filepath.Join(watch.path, name), "", watch.names[name]&sysFSIGNORED) + delete(watch.names, name) + } + + return w.startRead(watch) +} + +// Must run within the I/O thread. +func (w *readDirChangesW) deleteWatch(watch *watch) { + for name, mask := range watch.names { + if mask&provisional == 0 { + w.sendEvent(filepath.Join(watch.path, name), "", mask&sysFSIGNORED) + } + delete(watch.names, name) + } + if watch.mask != 0 { + if watch.mask&provisional == 0 { + w.sendEvent(watch.path, "", watch.mask&sysFSIGNORED) + } + watch.mask = 0 + } +} + +// Must run within the I/O thread. +func (w *readDirChangesW) startRead(watch *watch) error { + err := windows.CancelIo(watch.ino.handle) + if err != nil { + w.sendError(os.NewSyscallError("CancelIo", err)) + w.deleteWatch(watch) + } + mask := w.toWindowsFlags(watch.mask) + for _, m := range watch.names { + mask |= w.toWindowsFlags(m) + } + if mask == 0 { + err := windows.CloseHandle(watch.ino.handle) + if err != nil { + w.sendError(os.NewSyscallError("CloseHandle", err)) + } + w.mu.Lock() + delete(w.watches[watch.ino.volume], watch.ino.index) + w.mu.Unlock() + return nil + } + + // We need to pass the array, rather than the slice. + hdr := (*reflect.SliceHeader)(unsafe.Pointer(&watch.buf)) + rdErr := windows.ReadDirectoryChanges(watch.ino.handle, + (*byte)(unsafe.Pointer(hdr.Data)), uint32(hdr.Len), + watch.recurse, mask, nil, &watch.ov, 0) + if rdErr != nil { + err := os.NewSyscallError("ReadDirectoryChanges", rdErr) + if rdErr == windows.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { + // Watched directory was probably removed + w.sendEvent(watch.path, "", watch.mask&sysFSDELETESELF) + err = nil + } + w.deleteWatch(watch) + w.startRead(watch) + return err + } + return nil +} + +// readEvents reads from the I/O completion port, converts the +// received events into Event objects and sends them via the Events channel. +// Entry point to the I/O thread. +func (w *readDirChangesW) readEvents() { + var ( + n uint32 + key uintptr + ov *windows.Overlapped + ) + runtime.LockOSThread() + + for { + // This error is handled after the watch == nil check below. + qErr := windows.GetQueuedCompletionStatus(w.port, &n, &key, &ov, windows.INFINITE) + + watch := (*watch)(unsafe.Pointer(ov)) + if watch == nil { + select { + case ch := <-w.done: + w.mu.Lock() + var indexes []indexMap + for _, index := range w.watches { + indexes = append(indexes, index) + } + w.mu.Unlock() + for _, index := range indexes { + for _, watch := range index { + w.deleteWatch(watch) + w.startRead(watch) + } + } + + err := windows.CloseHandle(w.port) + if err != nil { + err = os.NewSyscallError("CloseHandle", err) + } + close(w.Events) + close(w.Errors) + ch <- err + return + case in := <-w.input: + switch in.op { + case opAddWatch: + in.reply <- w.addWatch(in.path, uint64(in.flags), in.bufsize) + case opRemoveWatch: + in.reply <- w.remWatch(in.path) + } + default: + } + continue + } + + switch qErr { + case nil: + // No error + case windows.ERROR_MORE_DATA: + if watch == nil { + w.sendError(errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")) + } else { + // The i/o succeeded but the buffer is full. + // In theory we should be building up a full packet. + // In practice we can get away with just carrying on. + n = uint32(unsafe.Sizeof(watch.buf)) + } + case windows.ERROR_ACCESS_DENIED: + // Watched directory was probably removed + w.sendEvent(watch.path, "", watch.mask&sysFSDELETESELF) + w.deleteWatch(watch) + w.startRead(watch) + continue + case windows.ERROR_OPERATION_ABORTED: + // CancelIo was called on this handle + continue + default: + w.sendError(os.NewSyscallError("GetQueuedCompletionPort", qErr)) + continue + } + + var offset uint32 + for { + if n == 0 { + w.sendError(ErrEventOverflow) + break + } + + // Point "raw" to the event in the buffer + raw := (*windows.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) + + // Create a buf that is the size of the path name + size := int(raw.FileNameLength / 2) + var buf []uint16 + // TODO: Use unsafe.Slice in Go 1.17; https://stackoverflow.com/questions/51187973 + sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf)) + sh.Data = uintptr(unsafe.Pointer(&raw.FileName)) + sh.Len = size + sh.Cap = size + name := windows.UTF16ToString(buf) + fullname := filepath.Join(watch.path, name) + + if debug { + internal.Debug(fullname, raw.Action) + } + + var mask uint64 + switch raw.Action { + case windows.FILE_ACTION_REMOVED: + mask = sysFSDELETESELF + case windows.FILE_ACTION_MODIFIED: + mask = sysFSMODIFY + case windows.FILE_ACTION_RENAMED_OLD_NAME: + watch.rename = name + case windows.FILE_ACTION_RENAMED_NEW_NAME: + // Update saved path of all sub-watches. + old := filepath.Join(watch.path, watch.rename) + w.mu.Lock() + for _, watchMap := range w.watches { + for _, ww := range watchMap { + if strings.HasPrefix(ww.path, old) { + ww.path = filepath.Join(fullname, strings.TrimPrefix(ww.path, old)) + } + } + } + w.mu.Unlock() + + if watch.names[watch.rename] != 0 { + watch.names[name] |= watch.names[watch.rename] + delete(watch.names, watch.rename) + mask = sysFSMOVESELF + } + } + + if raw.Action != windows.FILE_ACTION_RENAMED_NEW_NAME { + w.sendEvent(fullname, "", watch.names[name]&mask) + } + if raw.Action == windows.FILE_ACTION_REMOVED { + w.sendEvent(fullname, "", watch.names[name]&sysFSIGNORED) + delete(watch.names, name) + } + + if watch.rename != "" && raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { + w.sendEvent(fullname, filepath.Join(watch.path, watch.rename), watch.mask&w.toFSnotifyFlags(raw.Action)) + } else { + w.sendEvent(fullname, "", watch.mask&w.toFSnotifyFlags(raw.Action)) + } + + if raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME { + w.sendEvent(filepath.Join(watch.path, watch.rename), "", watch.names[name]&mask) + } + + // Move to the next event in the buffer + if raw.NextEntryOffset == 0 { + break + } + offset += raw.NextEntryOffset + + // Error! + if offset >= n { + //lint:ignore ST1005 Windows should be capitalized + w.sendError(errors.New("Windows system assumed buffer larger than it is, events have likely been missed")) + break + } + } + + if err := w.startRead(watch); err != nil { + w.sendError(err) + } + } +} + +func (w *readDirChangesW) toWindowsFlags(mask uint64) uint32 { + var m uint32 + if mask&sysFSMODIFY != 0 { + m |= windows.FILE_NOTIFY_CHANGE_LAST_WRITE + } + if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 { + m |= windows.FILE_NOTIFY_CHANGE_FILE_NAME | windows.FILE_NOTIFY_CHANGE_DIR_NAME + } + return m +} + +func (w *readDirChangesW) toFSnotifyFlags(action uint32) uint64 { + switch action { + case windows.FILE_ACTION_ADDED: + return sysFSCREATE + case windows.FILE_ACTION_REMOVED: + return sysFSDELETE + case windows.FILE_ACTION_MODIFIED: + return sysFSMODIFY + case windows.FILE_ACTION_RENAMED_OLD_NAME: + return sysFSMOVEDFROM + case windows.FILE_ACTION_RENAMED_NEW_NAME: + return sysFSMOVEDTO + } + return 0 +} + +func (w *readDirChangesW) xSupports(op Op) bool { + if op.Has(xUnportableOpen) || op.Has(xUnportableRead) || + op.Has(xUnportableCloseWrite) || op.Has(xUnportableCloseRead) { + return false + } + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go new file mode 100644 index 0000000000..f64be4bf98 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go @@ -0,0 +1,496 @@ +// Package fsnotify provides a cross-platform interface for file system +// notifications. +// +// Currently supported systems: +// +// - Linux via inotify +// - BSD, macOS via kqueue +// - Windows via ReadDirectoryChangesW +// - illumos via FEN +// +// # FSNOTIFY_DEBUG +// +// Set the FSNOTIFY_DEBUG environment variable to "1" to print debug messages to +// stderr. This can be useful to track down some problems, especially in cases +// where fsnotify is used as an indirect dependency. +// +// Every event will be printed as soon as there's something useful to print, +// with as little processing from fsnotify. +// +// Example output: +// +// FSNOTIFY_DEBUG: 11:34:23.633087586 256:IN_CREATE → "/tmp/file-1" +// FSNOTIFY_DEBUG: 11:34:23.633202319 4:IN_ATTRIB → "/tmp/file-1" +// FSNOTIFY_DEBUG: 11:34:28.989728764 512:IN_DELETE → "/tmp/file-1" +package fsnotify + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "strings" +) + +// Watcher watches a set of paths, delivering events on a channel. +// +// A watcher should not be copied (e.g. pass it by pointer, rather than by +// value). +// +// # Linux notes +// +// When a file is removed a Remove event won't be emitted until all file +// descriptors are closed, and deletes will always emit a Chmod. For example: +// +// fp := os.Open("file") +// os.Remove("file") // Triggers Chmod +// fp.Close() // Triggers Remove +// +// This is the event that inotify sends, so not much can be changed about this. +// +// The fs.inotify.max_user_watches sysctl variable specifies the upper limit +// for the number of watches per user, and fs.inotify.max_user_instances +// specifies the maximum number of inotify instances per user. Every Watcher you +// create is an "instance", and every path you add is a "watch". +// +// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and +// /proc/sys/fs/inotify/max_user_instances +// +// To increase them you can use sysctl or write the value to the /proc file: +// +// # Default values on Linux 5.18 +// sysctl fs.inotify.max_user_watches=124983 +// sysctl fs.inotify.max_user_instances=128 +// +// To make the changes persist on reboot edit /etc/sysctl.conf or +// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check +// your distro's documentation): +// +// fs.inotify.max_user_watches=124983 +// fs.inotify.max_user_instances=128 +// +// Reaching the limit will result in a "no space left on device" or "too many open +// files" error. +// +// # kqueue notes (macOS, BSD) +// +// kqueue requires opening a file descriptor for every file that's being watched; +// so if you're watching a directory with five files then that's six file +// descriptors. You will run in to your system's "max open files" limit faster on +// these platforms. +// +// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to +// control the maximum number of open files, as well as /etc/login.conf on BSD +// systems. +// +// # Windows notes +// +// Paths can be added as "C:\\path\\to\\dir", but forward slashes +// ("C:/path/to/dir") will also work. +// +// When a watched directory is removed it will always send an event for the +// directory itself, but may not send events for all files in that directory. +// Sometimes it will send events for all files, sometimes it will send no +// events, and often only for some files. +// +// The default ReadDirectoryChangesW() buffer size is 64K, which is the largest +// value that is guaranteed to work with SMB filesystems. If you have many +// events in quick succession this may not be enough, and you will have to use +// [WithBufferSize] to increase the value. +type Watcher struct { + b backend + + // Events sends the filesystem change events. + // + // fsnotify can send the following events; a "path" here can refer to a + // file, directory, symbolic link, or special file like a FIFO. + // + // fsnotify.Create A new path was created; this may be followed by one + // or more Write events if data also gets written to a + // file. + // + // fsnotify.Remove A path was removed. + // + // fsnotify.Rename A path was renamed. A rename is always sent with the + // old path as Event.Name, and a Create event will be + // sent with the new name. Renames are only sent for + // paths that are currently watched; e.g. moving an + // unmonitored file into a monitored directory will + // show up as just a Create. Similarly, renaming a file + // to outside a monitored directory will show up as + // only a Rename. + // + // fsnotify.Write A file or named pipe was written to. A Truncate will + // also trigger a Write. A single "write action" + // initiated by the user may show up as one or multiple + // writes, depending on when the system syncs things to + // disk. For example when compiling a large Go program + // you may get hundreds of Write events, and you may + // want to wait until you've stopped receiving them + // (see the dedup example in cmd/fsnotify). + // + // Some systems may send Write event for directories + // when the directory content changes. + // + // fsnotify.Chmod Attributes were changed. On Linux this is also sent + // when a file is removed (or more accurately, when a + // link to an inode is removed). On kqueue it's sent + // when a file is truncated. On Windows it's never + // sent. + Events chan Event + + // Errors sends any errors. + Errors chan error +} + +// Event represents a file system notification. +type Event struct { + // Path to the file or directory. + // + // Paths are relative to the input; for example with Add("dir") the Name + // will be set to "dir/file" if you create that file, but if you use + // Add("/path/to/dir") it will be "/path/to/dir/file". + Name string + + // File operation that triggered the event. + // + // This is a bitmask and some systems may send multiple operations at once. + // Use the Event.Has() method instead of comparing with ==. + Op Op + + // Create events will have this set to the old path if it's a rename. This + // only works when both the source and destination are watched. It's not + // reliable when watching individual files, only directories. + // + // For example "mv /tmp/file /tmp/rename" will emit: + // + // Event{Op: Rename, Name: "/tmp/file"} + // Event{Op: Create, Name: "/tmp/rename", RenamedFrom: "/tmp/file"} + renamedFrom string +} + +// Op describes a set of file operations. +type Op uint32 + +// The operations fsnotify can trigger; see the documentation on [Watcher] for a +// full description, and check them with [Event.Has]. +const ( + // A new pathname was created. + Create Op = 1 << iota + + // The pathname was written to; this does *not* mean the write has finished, + // and a write can be followed by more writes. + Write + + // The path was removed; any watches on it will be removed. Some "remove" + // operations may trigger a Rename if the file is actually moved (for + // example "remove to trash" is often a rename). + Remove + + // The path was renamed to something else; any watches on it will be + // removed. + Rename + + // File attributes were changed. + // + // It's generally not recommended to take action on this event, as it may + // get triggered very frequently by some software. For example, Spotlight + // indexing on macOS, anti-virus software, backup software, etc. + Chmod + + // File descriptor was opened. + // + // Only works on Linux and FreeBSD. + xUnportableOpen + + // File was read from. + // + // Only works on Linux and FreeBSD. + xUnportableRead + + // File opened for writing was closed. + // + // Only works on Linux and FreeBSD. + // + // The advantage of using this over Write is that it's more reliable than + // waiting for Write events to stop. It's also faster (if you're not + // listening to Write events): copying a file of a few GB can easily + // generate tens of thousands of Write events in a short span of time. + xUnportableCloseWrite + + // File opened for reading was closed. + // + // Only works on Linux and FreeBSD. + xUnportableCloseRead +) + +var ( + // ErrNonExistentWatch is used when Remove() is called on a path that's not + // added. + ErrNonExistentWatch = errors.New("fsnotify: can't remove non-existent watch") + + // ErrClosed is used when trying to operate on a closed Watcher. + ErrClosed = errors.New("fsnotify: watcher already closed") + + // ErrEventOverflow is reported from the Errors channel when there are too + // many events: + // + // - inotify: inotify returns IN_Q_OVERFLOW – because there are too + // many queued events (the fs.inotify.max_queued_events + // sysctl can be used to increase this). + // - windows: The buffer size is too small; WithBufferSize() can be used to increase it. + // - kqueue, fen: Not used. + ErrEventOverflow = errors.New("fsnotify: queue or buffer overflow") + + // ErrUnsupported is returned by AddWith() when WithOps() specified an + // Unportable event that's not supported on this platform. + //lint:ignore ST1012 not relevant + xErrUnsupported = errors.New("fsnotify: not supported with this backend") +) + +// NewWatcher creates a new Watcher. +func NewWatcher() (*Watcher, error) { + ev, errs := make(chan Event, defaultBufferSize), make(chan error) + b, err := newBackend(ev, errs) + if err != nil { + return nil, err + } + return &Watcher{b: b, Events: ev, Errors: errs}, nil +} + +// NewBufferedWatcher creates a new Watcher with a buffered Watcher.Events +// channel. +// +// The main use case for this is situations with a very large number of events +// where the kernel buffer size can't be increased (e.g. due to lack of +// permissions). An unbuffered Watcher will perform better for almost all use +// cases, and whenever possible you will be better off increasing the kernel +// buffers instead of adding a large userspace buffer. +func NewBufferedWatcher(sz uint) (*Watcher, error) { + ev, errs := make(chan Event, sz), make(chan error) + b, err := newBackend(ev, errs) + if err != nil { + return nil, err + } + return &Watcher{b: b, Events: ev, Errors: errs}, nil +} + +// Add starts monitoring the path for changes. +// +// A path can only be watched once; watching it more than once is a no-op and will +// not return an error. Paths that do not yet exist on the filesystem cannot be +// watched. +// +// A watch will be automatically removed if the watched path is deleted or +// renamed. The exception is the Windows backend, which doesn't remove the +// watcher on renames. +// +// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special +// filesystems (/proc, /sys, etc.) generally don't work. +// +// Returns [ErrClosed] if [Watcher.Close] was called. +// +// See [Watcher.AddWith] for a version that allows adding options. +// +// # Watching directories +// +// All files in a directory are monitored, including new files that are created +// after the watcher is started. Subdirectories are not watched (i.e. it's +// non-recursive). +// +// # Watching files +// +// Watching individual files (rather than directories) is generally not +// recommended as many programs (especially editors) update files atomically: it +// will write to a temporary file which is then moved to destination, +// overwriting the original (or some variant thereof). The watcher on the +// original file is now lost, as that no longer exists. +// +// The upshot of this is that a power failure or crash won't leave a +// half-written file. +// +// Watch the parent directory and use Event.Name to filter out files you're not +// interested in. There is an example of this in cmd/fsnotify/file.go. +func (w *Watcher) Add(path string) error { return w.b.Add(path) } + +// AddWith is like [Watcher.Add], but allows adding options. When using Add() +// the defaults described below are used. +// +// Possible options are: +// +// - [WithBufferSize] sets the buffer size for the Windows backend; no-op on +// other platforms. The default is 64K (65536 bytes). +func (w *Watcher) AddWith(path string, opts ...addOpt) error { return w.b.AddWith(path, opts...) } + +// Remove stops monitoring the path for changes. +// +// Directories are always removed non-recursively. For example, if you added +// /tmp/dir and /tmp/dir/subdir then you will need to remove both. +// +// Removing a path that has not yet been added returns [ErrNonExistentWatch]. +// +// Returns nil if [Watcher.Close] was called. +func (w *Watcher) Remove(path string) error { return w.b.Remove(path) } + +// Close removes all watches and closes the Events channel. +func (w *Watcher) Close() error { return w.b.Close() } + +// WatchList returns all paths explicitly added with [Watcher.Add] (and are not +// yet removed). +// +// The order is undefined, and may differ per call. Returns nil if +// [Watcher.Close] was called. +func (w *Watcher) WatchList() []string { return w.b.WatchList() } + +// Supports reports if all the listed operations are supported by this platform. +// +// Create, Write, Remove, Rename, and Chmod are always supported. It can only +// return false for an Op starting with Unportable. +func (w *Watcher) xSupports(op Op) bool { return w.b.xSupports(op) } + +func (o Op) String() string { + var b strings.Builder + if o.Has(Create) { + b.WriteString("|CREATE") + } + if o.Has(Remove) { + b.WriteString("|REMOVE") + } + if o.Has(Write) { + b.WriteString("|WRITE") + } + if o.Has(xUnportableOpen) { + b.WriteString("|OPEN") + } + if o.Has(xUnportableRead) { + b.WriteString("|READ") + } + if o.Has(xUnportableCloseWrite) { + b.WriteString("|CLOSE_WRITE") + } + if o.Has(xUnportableCloseRead) { + b.WriteString("|CLOSE_READ") + } + if o.Has(Rename) { + b.WriteString("|RENAME") + } + if o.Has(Chmod) { + b.WriteString("|CHMOD") + } + if b.Len() == 0 { + return "[no events]" + } + return b.String()[1:] +} + +// Has reports if this operation has the given operation. +func (o Op) Has(h Op) bool { return o&h != 0 } + +// Has reports if this event has the given operation. +func (e Event) Has(op Op) bool { return e.Op.Has(op) } + +// String returns a string representation of the event with their path. +func (e Event) String() string { + if e.renamedFrom != "" { + return fmt.Sprintf("%-13s %q ← %q", e.Op.String(), e.Name, e.renamedFrom) + } + return fmt.Sprintf("%-13s %q", e.Op.String(), e.Name) +} + +type ( + backend interface { + Add(string) error + AddWith(string, ...addOpt) error + Remove(string) error + WatchList() []string + Close() error + xSupports(Op) bool + } + addOpt func(opt *withOpts) + withOpts struct { + bufsize int + op Op + noFollow bool + sendCreate bool + } +) + +var debug = func() bool { + // Check for exactly "1" (rather than mere existence) so we can add + // options/flags in the future. I don't know if we ever want that, but it's + // nice to leave the option open. + return os.Getenv("FSNOTIFY_DEBUG") == "1" +}() + +var defaultOpts = withOpts{ + bufsize: 65536, // 64K + op: Create | Write | Remove | Rename | Chmod, +} + +func getOptions(opts ...addOpt) withOpts { + with := defaultOpts + for _, o := range opts { + if o != nil { + o(&with) + } + } + return with +} + +// WithBufferSize sets the [ReadDirectoryChangesW] buffer size. +// +// This only has effect on Windows systems, and is a no-op for other backends. +// +// The default value is 64K (65536 bytes) which is the highest value that works +// on all filesystems and should be enough for most applications, but if you +// have a large burst of events it may not be enough. You can increase it if +// you're hitting "queue or buffer overflow" errors ([ErrEventOverflow]). +// +// [ReadDirectoryChangesW]: https://learn.microsoft.com/en-gb/windows/win32/api/winbase/nf-winbase-readdirectorychangesw +func WithBufferSize(bytes int) addOpt { + return func(opt *withOpts) { opt.bufsize = bytes } +} + +// WithOps sets which operations to listen for. The default is [Create], +// [Write], [Remove], [Rename], and [Chmod]. +// +// Excluding operations you're not interested in can save quite a bit of CPU +// time; in some use cases there may be hundreds of thousands of useless Write +// or Chmod operations per second. +// +// This can also be used to add unportable operations not supported by all +// platforms; unportable operations all start with "Unportable": +// [UnportableOpen], [UnportableRead], [UnportableCloseWrite], and +// [UnportableCloseRead]. +// +// AddWith returns an error when using an unportable operation that's not +// supported. Use [Watcher.Support] to check for support. +func withOps(op Op) addOpt { + return func(opt *withOpts) { opt.op = op } +} + +// WithNoFollow disables following symlinks, so the symlinks themselves are +// watched. +func withNoFollow() addOpt { + return func(opt *withOpts) { opt.noFollow = true } +} + +// "Internal" option for recursive watches on inotify. +func withCreate() addOpt { + return func(opt *withOpts) { opt.sendCreate = true } +} + +var enableRecurse = false + +// Check if this path is recursive (ends with "/..." or "\..."), and return the +// path with the /... stripped. +func recursivePath(path string) (string, bool) { + path = filepath.Clean(path) + if !enableRecurse { // Only enabled in tests for now. + return path, false + } + if filepath.Base(path) == "..." { + return filepath.Dir(path), true + } + return path, false +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/darwin.go b/vendor/github.com/fsnotify/fsnotify/internal/darwin.go new file mode 100644 index 0000000000..0b01bc182a --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/darwin.go @@ -0,0 +1,39 @@ +//go:build darwin + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + ErrSyscallEACCES = syscall.EACCES + ErrUnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = l.Cur + + if n, err := syscall.SysctlUint32("kern.maxfiles"); err == nil && uint64(n) < maxfiles { + maxfiles = uint64(n) + } + + if n, err := syscall.SysctlUint32("kern.maxfilesperproc"); err == nil && uint64(n) < maxfiles { + maxfiles = uint64(n) + } +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, dev) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go new file mode 100644 index 0000000000..928319fb09 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go @@ -0,0 +1,57 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ABSOLUTE", unix.NOTE_ABSOLUTE}, + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_BACKGROUND", unix.NOTE_BACKGROUND}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_CRITICAL", unix.NOTE_CRITICAL}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXITSTATUS", unix.NOTE_EXITSTATUS}, + {"NOTE_EXIT_CSERROR", unix.NOTE_EXIT_CSERROR}, + {"NOTE_EXIT_DECRYPTFAIL", unix.NOTE_EXIT_DECRYPTFAIL}, + {"NOTE_EXIT_DETAIL", unix.NOTE_EXIT_DETAIL}, + {"NOTE_EXIT_DETAIL_MASK", unix.NOTE_EXIT_DETAIL_MASK}, + {"NOTE_EXIT_MEMORY", unix.NOTE_EXIT_MEMORY}, + {"NOTE_EXIT_REPARENTED", unix.NOTE_EXIT_REPARENTED}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_FUNLOCK", unix.NOTE_FUNLOCK}, + {"NOTE_LEEWAY", unix.NOTE_LEEWAY}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_MACHTIME", unix.NOTE_MACHTIME}, + {"NOTE_MACH_CONTINUOUS_TIME", unix.NOTE_MACH_CONTINUOUS_TIME}, + {"NOTE_NONE", unix.NOTE_NONE}, + {"NOTE_NSECONDS", unix.NOTE_NSECONDS}, + {"NOTE_OOB", unix.NOTE_OOB}, + //{"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, -0x100000 (?!) + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_REAP", unix.NOTE_REAP}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_SECONDS", unix.NOTE_SECONDS}, + {"NOTE_SIGNAL", unix.NOTE_SIGNAL}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_USECONDS", unix.NOTE_USECONDS}, + {"NOTE_VM_ERROR", unix.NOTE_VM_ERROR}, + {"NOTE_VM_PRESSURE", unix.NOTE_VM_PRESSURE}, + {"NOTE_VM_PRESSURE_SUDDEN_TERMINATE", unix.NOTE_VM_PRESSURE_SUDDEN_TERMINATE}, + {"NOTE_VM_PRESSURE_TERMINATE", unix.NOTE_VM_PRESSURE_TERMINATE}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go new file mode 100644 index 0000000000..3186b0c349 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go @@ -0,0 +1,33 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_OOB", unix.NOTE_OOB}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go new file mode 100644 index 0000000000..f69fdb930f --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go @@ -0,0 +1,42 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ABSTIME", unix.NOTE_ABSTIME}, + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_CLOSE", unix.NOTE_CLOSE}, + {"NOTE_CLOSE_WRITE", unix.NOTE_CLOSE_WRITE}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FFAND", unix.NOTE_FFAND}, + {"NOTE_FFCOPY", unix.NOTE_FFCOPY}, + {"NOTE_FFCTRLMASK", unix.NOTE_FFCTRLMASK}, + {"NOTE_FFLAGSMASK", unix.NOTE_FFLAGSMASK}, + {"NOTE_FFNOP", unix.NOTE_FFNOP}, + {"NOTE_FFOR", unix.NOTE_FFOR}, + {"NOTE_FILE_POLL", unix.NOTE_FILE_POLL}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_MSECONDS", unix.NOTE_MSECONDS}, + {"NOTE_NSECONDS", unix.NOTE_NSECONDS}, + {"NOTE_OPEN", unix.NOTE_OPEN}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_READ", unix.NOTE_READ}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_SECONDS", unix.NOTE_SECONDS}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRIGGER", unix.NOTE_TRIGGER}, + {"NOTE_USECONDS", unix.NOTE_USECONDS}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go new file mode 100644 index 0000000000..607e683bd7 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go @@ -0,0 +1,32 @@ +//go:build freebsd || openbsd || netbsd || dragonfly || darwin + +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, kevent *unix.Kevent_t) { + mask := uint32(kevent.Fflags) + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %10d:%-60s → %q\n", + time.Now().Format("15:04:05.000000000"), mask, strings.Join(l, " | "), name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go new file mode 100644 index 0000000000..35c734be43 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_linux.go @@ -0,0 +1,56 @@ +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, mask, cookie uint32) { + names := []struct { + n string + m uint32 + }{ + {"IN_ACCESS", unix.IN_ACCESS}, + {"IN_ATTRIB", unix.IN_ATTRIB}, + {"IN_CLOSE", unix.IN_CLOSE}, + {"IN_CLOSE_NOWRITE", unix.IN_CLOSE_NOWRITE}, + {"IN_CLOSE_WRITE", unix.IN_CLOSE_WRITE}, + {"IN_CREATE", unix.IN_CREATE}, + {"IN_DELETE", unix.IN_DELETE}, + {"IN_DELETE_SELF", unix.IN_DELETE_SELF}, + {"IN_IGNORED", unix.IN_IGNORED}, + {"IN_ISDIR", unix.IN_ISDIR}, + {"IN_MODIFY", unix.IN_MODIFY}, + {"IN_MOVE", unix.IN_MOVE}, + {"IN_MOVED_FROM", unix.IN_MOVED_FROM}, + {"IN_MOVED_TO", unix.IN_MOVED_TO}, + {"IN_MOVE_SELF", unix.IN_MOVE_SELF}, + {"IN_OPEN", unix.IN_OPEN}, + {"IN_Q_OVERFLOW", unix.IN_Q_OVERFLOW}, + {"IN_UNMOUNT", unix.IN_UNMOUNT}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + var c string + if cookie > 0 { + c = fmt.Sprintf("(cookie: %d) ", cookie) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %-30s → %s%q\n", + time.Now().Format("15:04:05.000000000"), strings.Join(l, "|"), c, name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go new file mode 100644 index 0000000000..e5b3b6f694 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go @@ -0,0 +1,25 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go new file mode 100644 index 0000000000..1dd455bc5a --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go @@ -0,0 +1,28 @@ +package internal + +import "golang.org/x/sys/unix" + +var names = []struct { + n string + m uint32 +}{ + {"NOTE_ATTRIB", unix.NOTE_ATTRIB}, + // {"NOTE_CHANGE", unix.NOTE_CHANGE}, // Not on 386? + {"NOTE_CHILD", unix.NOTE_CHILD}, + {"NOTE_DELETE", unix.NOTE_DELETE}, + {"NOTE_EOF", unix.NOTE_EOF}, + {"NOTE_EXEC", unix.NOTE_EXEC}, + {"NOTE_EXIT", unix.NOTE_EXIT}, + {"NOTE_EXTEND", unix.NOTE_EXTEND}, + {"NOTE_FORK", unix.NOTE_FORK}, + {"NOTE_LINK", unix.NOTE_LINK}, + {"NOTE_LOWAT", unix.NOTE_LOWAT}, + {"NOTE_PCTRLMASK", unix.NOTE_PCTRLMASK}, + {"NOTE_PDATAMASK", unix.NOTE_PDATAMASK}, + {"NOTE_RENAME", unix.NOTE_RENAME}, + {"NOTE_REVOKE", unix.NOTE_REVOKE}, + {"NOTE_TRACK", unix.NOTE_TRACK}, + {"NOTE_TRACKERR", unix.NOTE_TRACKERR}, + {"NOTE_TRUNCATE", unix.NOTE_TRUNCATE}, + {"NOTE_WRITE", unix.NOTE_WRITE}, +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go new file mode 100644 index 0000000000..f1b2e73bd5 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_solaris.go @@ -0,0 +1,45 @@ +package internal + +import ( + "fmt" + "os" + "strings" + "time" + + "golang.org/x/sys/unix" +) + +func Debug(name string, mask int32) { + names := []struct { + n string + m int32 + }{ + {"FILE_ACCESS", unix.FILE_ACCESS}, + {"FILE_MODIFIED", unix.FILE_MODIFIED}, + {"FILE_ATTRIB", unix.FILE_ATTRIB}, + {"FILE_TRUNC", unix.FILE_TRUNC}, + {"FILE_NOFOLLOW", unix.FILE_NOFOLLOW}, + {"FILE_DELETE", unix.FILE_DELETE}, + {"FILE_RENAME_TO", unix.FILE_RENAME_TO}, + {"FILE_RENAME_FROM", unix.FILE_RENAME_FROM}, + {"UNMOUNTED", unix.UNMOUNTED}, + {"MOUNTEDOVER", unix.MOUNTEDOVER}, + {"FILE_EXCEPTION", unix.FILE_EXCEPTION}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %10d:%-30s → %q\n", + time.Now().Format("15:04:05.000000000"), mask, strings.Join(l, " | "), name) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go b/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go new file mode 100644 index 0000000000..52bf4ce53b --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/debug_windows.go @@ -0,0 +1,40 @@ +package internal + +import ( + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "golang.org/x/sys/windows" +) + +func Debug(name string, mask uint32) { + names := []struct { + n string + m uint32 + }{ + {"FILE_ACTION_ADDED", windows.FILE_ACTION_ADDED}, + {"FILE_ACTION_REMOVED", windows.FILE_ACTION_REMOVED}, + {"FILE_ACTION_MODIFIED", windows.FILE_ACTION_MODIFIED}, + {"FILE_ACTION_RENAMED_OLD_NAME", windows.FILE_ACTION_RENAMED_OLD_NAME}, + {"FILE_ACTION_RENAMED_NEW_NAME", windows.FILE_ACTION_RENAMED_NEW_NAME}, + } + + var ( + l []string + unknown = mask + ) + for _, n := range names { + if mask&n.m == n.m { + l = append(l, n.n) + unknown ^= n.m + } + } + if unknown > 0 { + l = append(l, fmt.Sprintf("0x%x", unknown)) + } + fmt.Fprintf(os.Stderr, "FSNOTIFY_DEBUG: %s %-65s → %q\n", + time.Now().Format("15:04:05.000000000"), strings.Join(l, " | "), filepath.ToSlash(name)) +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go b/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go new file mode 100644 index 0000000000..5ac8b50797 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go @@ -0,0 +1,31 @@ +//go:build freebsd + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + ErrSyscallEACCES = syscall.EACCES + ErrUnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = uint64(l.Cur) +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, uint64(dev)) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/internal.go b/vendor/github.com/fsnotify/fsnotify/internal/internal.go new file mode 100644 index 0000000000..7daa45e19e --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/internal.go @@ -0,0 +1,2 @@ +// Package internal contains some helpers. +package internal diff --git a/vendor/github.com/fsnotify/fsnotify/internal/unix.go b/vendor/github.com/fsnotify/fsnotify/internal/unix.go new file mode 100644 index 0000000000..b251fb8038 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/unix.go @@ -0,0 +1,31 @@ +//go:build !windows && !darwin && !freebsd && !plan9 + +package internal + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +var ( + ErrSyscallEACCES = syscall.EACCES + ErrUnixEACCES = unix.EACCES +) + +var maxfiles uint64 + +func SetRlimit() { + // Go 1.19 will do this automatically: https://go-review.googlesource.com/c/go/+/393354/ + var l syscall.Rlimit + err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l) + if err == nil && l.Cur != l.Max { + l.Cur = l.Max + syscall.Setrlimit(syscall.RLIMIT_NOFILE, &l) + } + maxfiles = uint64(l.Cur) +} + +func Maxfiles() uint64 { return maxfiles } +func Mkfifo(path string, mode uint32) error { return unix.Mkfifo(path, mode) } +func Mknod(path string, mode uint32, dev int) error { return unix.Mknod(path, mode, dev) } diff --git a/vendor/github.com/fsnotify/fsnotify/internal/unix2.go b/vendor/github.com/fsnotify/fsnotify/internal/unix2.go new file mode 100644 index 0000000000..37dfeddc28 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/unix2.go @@ -0,0 +1,7 @@ +//go:build !windows + +package internal + +func HasPrivilegesForSymlink() bool { + return true +} diff --git a/vendor/github.com/fsnotify/fsnotify/internal/windows.go b/vendor/github.com/fsnotify/fsnotify/internal/windows.go new file mode 100644 index 0000000000..896bc2e5a2 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/internal/windows.go @@ -0,0 +1,41 @@ +//go:build windows + +package internal + +import ( + "errors" + + "golang.org/x/sys/windows" +) + +// Just a dummy. +var ( + ErrSyscallEACCES = errors.New("dummy") + ErrUnixEACCES = errors.New("dummy") +) + +func SetRlimit() {} +func Maxfiles() uint64 { return 1<<64 - 1 } +func Mkfifo(path string, mode uint32) error { return errors.New("no FIFOs on Windows") } +func Mknod(path string, mode uint32, dev int) error { return errors.New("no device nodes on Windows") } + +func HasPrivilegesForSymlink() bool { + var sid *windows.SID + err := windows.AllocateAndInitializeSid( + &windows.SECURITY_NT_AUTHORITY, + 2, + windows.SECURITY_BUILTIN_DOMAIN_RID, + windows.DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &sid) + if err != nil { + return false + } + defer windows.FreeSid(sid) + token := windows.Token(0) + member, err := token.IsMember(sid) + if err != nil { + return false + } + return member || token.IsElevated() +} diff --git a/vendor/github.com/fsnotify/fsnotify/shared.go b/vendor/github.com/fsnotify/fsnotify/shared.go new file mode 100644 index 0000000000..3ee9b58f1d --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/shared.go @@ -0,0 +1,64 @@ +package fsnotify + +import "sync" + +type shared struct { + Events chan Event + Errors chan error + done chan struct{} + mu sync.Mutex +} + +func newShared(ev chan Event, errs chan error) *shared { + return &shared{ + Events: ev, + Errors: errs, + done: make(chan struct{}), + } +} + +// Returns true if the event was sent, or false if watcher is closed. +func (w *shared) sendEvent(e Event) bool { + if e.Op == 0 { + return true + } + select { + case <-w.done: + return false + case w.Events <- e: + return true + } +} + +// Returns true if the error was sent, or false if watcher is closed. +func (w *shared) sendError(err error) bool { + if err == nil { + return true + } + select { + case <-w.done: + return false + case w.Errors <- err: + return true + } +} + +func (w *shared) isClosed() bool { + select { + case <-w.done: + return true + default: + return false + } +} + +// Mark as closed; returns true if it was already closed. +func (w *shared) close() bool { + w.mu.Lock() + defer w.mu.Unlock() + if w.isClosed() { + return true + } + close(w.done) + return false +} diff --git a/vendor/github.com/fsnotify/fsnotify/staticcheck.conf b/vendor/github.com/fsnotify/fsnotify/staticcheck.conf new file mode 100644 index 0000000000..8fa7351f0c --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/staticcheck.conf @@ -0,0 +1,3 @@ +checks = ['all', + '-U1000', # Don't complain about unused functions. +] diff --git a/vendor/github.com/fsnotify/fsnotify/system_bsd.go b/vendor/github.com/fsnotify/fsnotify/system_bsd.go new file mode 100644 index 0000000000..f65e8fe3ed --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/system_bsd.go @@ -0,0 +1,7 @@ +//go:build freebsd || openbsd || netbsd || dragonfly + +package fsnotify + +import "golang.org/x/sys/unix" + +const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/fsnotify/fsnotify/system_darwin.go b/vendor/github.com/fsnotify/fsnotify/system_darwin.go new file mode 100644 index 0000000000..a29fc7aab6 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/system_darwin.go @@ -0,0 +1,8 @@ +//go:build darwin + +package fsnotify + +import "golang.org/x/sys/unix" + +// note: this constant is not defined on BSD +const openMode = unix.O_EVTONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/gabriel-vasile/mimetype/.git-blame-ignore-revs b/vendor/github.com/gabriel-vasile/mimetype/.git-blame-ignore-revs new file mode 100644 index 0000000000..3892826a74 --- /dev/null +++ b/vendor/github.com/gabriel-vasile/mimetype/.git-blame-ignore-revs @@ -0,0 +1,9 @@ +# Github is obeying this ignore file by default. +# Run this command on local to ignore formatting commits in `git blame` +# git config blame.ignoreRevsFile .git-blame-ignore-revs + +# Added a new column to supported_mimes.md +# The supported_mimes.md file was a nice way to find when a file format was +# introduced. However, when I changed to add a new column in the table, the +# whole git blame got poisoned for the file. +eb497f9bc5d31c6eab2929a112051218670137ba diff --git a/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md b/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md deleted file mode 100644 index 8479cd87d6..0000000000 --- a/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at vasile.gabriel@email.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md b/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md deleted file mode 100644 index 56ae4e57c6..0000000000 --- a/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md +++ /dev/null @@ -1,12 +0,0 @@ -## Contribute -Contributions to **mimetype** are welcome. If you find an issue and you consider -contributing, you can use the [Github issues tracker](https://github.com/gabriel-vasile/mimetype/issues) -in order to report it, or better yet, open a pull request. - -Code contributions must respect these rules: - - code must be test covered - - code must be formatted using gofmt tool - - exported names must be documented - -**Important**: By submitting a pull request, you agree to allow the project -owner to license your work under the same license as that used by the project. diff --git a/vendor/github.com/gabriel-vasile/mimetype/README.md b/vendor/github.com/gabriel-vasile/mimetype/README.md index aa88b4bda6..ea5c89a945 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/README.md +++ b/vendor/github.com/gabriel-vasile/mimetype/README.md @@ -27,6 +27,7 @@ - possibility to [extend](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-Extend) with other file formats - common file formats are prioritized - [text vs. binary files differentiation](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-TextVsBinary) +- no external dependencies - safe for concurrent usage ## Install @@ -45,8 +46,7 @@ fmt.Println(mtype.String(), mtype.Extension()) ``` See the [runnable Go Playground examples](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#pkg-overview). -## Usage' -Only use libraries like **mimetype** as a last resort. Content type detection +Caution: only use libraries like **mimetype** as a last resort. Content type detection using magic numbers is slow, inaccurate, and non-standard. Most of the times protocols have methods for specifying such metadata; e.g., `Content-Type` header in HTTP and SMTP. @@ -67,6 +67,18 @@ mimetype.DetectFile("file.doc") If increasing the limit does not help, please [open an issue](https://github.com/gabriel-vasile/mimetype/issues/new?assignees=&labels=&template=mismatched-mime-type-detected.md&title=). +## Tests +In addition to unit tests, +[mimetype_tests](https://github.com/gabriel-vasile/mimetype_tests) compares the +library with the [Unix file utility](https://en.wikipedia.org/wiki/File_(command)) +for around 50 000 sample files. Check the latest comparison results +[here](https://github.com/gabriel-vasile/mimetype_tests/actions). + +## Benchmarks +Benchmarks for each file format are performed when a PR is open. The results can +be seen on the [workflows page](https://github.com/gabriel-vasile/mimetype/actions/workflows/benchmark.yml). +Performance improvements are welcome but correctness is prioritized. + ## Structure **mimetype** uses a hierarchical structure to keep the MIME type detection logic. This reduces the number of calls needed for detecting the file type. The reason @@ -84,19 +96,10 @@ or from a [file](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#DetectFil how project is structured -## Performance -Thanks to the hierarchical structure, searching for common formats first, -and limiting itself to file headers, **mimetype** matches the performance of -stdlib `http.DetectContentType` while outperforming the alternative package. - -```bash - mimetype http.DetectContentType filetype -BenchmarkMatchTar-24 250 ns/op 400 ns/op 3778 ns/op -BenchmarkMatchZip-24 524 ns/op 351 ns/op 4884 ns/op -BenchmarkMatchJpeg-24 103 ns/op 228 ns/op 839 ns/op -BenchmarkMatchGif-24 139 ns/op 202 ns/op 751 ns/op -BenchmarkMatchPng-24 165 ns/op 221 ns/op 1176 ns/op -``` - ## Contributing -See [CONTRIBUTING.md](CONTRIBUTING.md). +Contributions are never expected but very much welcome. +[mimetype_tests](https://github.com/gabriel-vasile/mimetype_tests/actions/workflows/test.yml) +shows which file formats are most often misidentified and can help prioritise. +When submitting a PR for detection of a new file format, please make sure to +add a record to the list of testcases in [mimetype_test.go](mimetype_test.go). +For complex files a record can be added in the [testdata](testdata) directory. diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go b/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go index 0647f730e5..3373274ad9 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go @@ -2,11 +2,11 @@ package charset import ( "bytes" - "encoding/xml" "strings" "unicode/utf8" - "golang.org/x/net/html" + "github.com/gabriel-vasile/mimetype/internal/markup" + "github.com/gabriel-vasile/mimetype/internal/scan" ) const ( @@ -141,20 +141,29 @@ func FromXML(content []byte) string { } return FromPlain(content) } -func fromXML(content []byte) string { - content = trimLWS(content) - dec := xml.NewDecoder(bytes.NewReader(content)) - rawT, err := dec.RawToken() - if err != nil { - return "" - } +func fromXML(s scan.Bytes) string { + xml := []byte(" 0 && line[n-1] == '\r' { + return line[:n-1], false // drop \r at end of line + } + + // This line is problematic. The logic from CountFields comes from + // encoding/csv.Reader which relies on mutating the input bytes. + // https://github.com/golang/go/blob/b3251514531123d7fd007682389bce7428d159a0/src/encoding/csv/reader.go#L275-L279 + // To avoid mutating the input, we return cutShort. #680 + if n >= 2 && line[n-2] == '\r' && line[n-1] == '\n' { + return line[:n-2], true + } + return line, false +} + +// CountFields reads one CSV line and counts how many records that line contained. +// hasMore reports whether there are more lines in the input. +// collectIndexes makes CountFields return a list of indexes where CSV fields +// start in the line. These indexes are used to test the correctness against the +// encoding/csv parser. +func (r *Parser) CountFields(collectIndexes bool) (fields int, fieldPos []int, hasMore bool) { + finished := false + var line scan.Bytes + cutShort := false + for { + line, cutShort = r.readLine() + if finished { + return 0, nil, false + } + finished = len(r.s) == 0 && len(line) == 0 + if len(line) == lengthNL(line) { + line = nil + continue // Skip empty lines. + } + if len(line) > 0 && line[0] == r.comment { + line = nil + continue + } + break + } + + indexes := []int{} + originalLine := line +parseField: + for { + if len(line) == 0 || line[0] != '"' { // non-quoted string field + fields++ + if collectIndexes { + indexes = append(indexes, len(originalLine)-len(line)) + } + i := bytes.IndexByte(line, r.comma) + if i >= 0 { + line.Advance(i + 1) // 1 to get over ending comma + continue parseField + } + break parseField + } else { // Quoted string field. + if collectIndexes { + indexes = append(indexes, len(originalLine)-len(line)) + } + line.Advance(1) // get over starting quote + for { + i := bytes.IndexByte(line, '"') + if i >= 0 { + line.Advance(i + 1) // 1 for ending quote + switch rn := line.Peek(); { + case rn == '"': + line.Advance(1) + case rn == r.comma: + line.Advance(1) + fields++ + continue parseField + case lengthNL(line) == len(line): + fields++ + break parseField + } + } else if len(line) > 0 || cutShort { + line, cutShort = r.readLine() + originalLine = line + } else { + fields++ + break parseField + } + } + } + } + + return fields, indexes, fields != 0 +} + +// lengthNL reports the number of bytes for the trailing \n. +func lengthNL(b []byte) int { + if len(b) > 0 && b[len(b)-1] == '\n' { + return 1 + } + return 0 +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/json/parser.go b/vendor/github.com/gabriel-vasile/mimetype/internal/json/parser.go index fd8dd52028..d11c0a883a 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/json/parser.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/json/parser.go @@ -257,8 +257,11 @@ out: return 0 } +// openArray is used instead of an inline []byte{'['} to avoid mem alllocs. +var openArray = []byte{'['} + func (p *parserState) consumeArray(b []byte, qs []query, lvl int) (n int) { - p.currPath = append(p.currPath, []byte{'['}) + p.appendPath(openArray, qs) if len(b) == 0 { return 0 } @@ -270,7 +273,7 @@ func (p *parserState) consumeArray(b []byte, qs []query, lvl int) (n int) { } if b[n] == ']' { p.ib++ - p.currPath = p.currPath[:len(p.currPath)-1] + p.popLastPath(qs) return n + 1 } innerParsed := p.consumeAny(b[n:], qs, lvl) @@ -305,6 +308,20 @@ func queryPathMatch(qs []query, path [][]byte) int { return -1 } +// appendPath will append a path fragment if queries is not empty. +// If we don't need query functionality (just checking if a JSON is valid), +// then we can skip keeping track of the path we're currently in. +func (p *parserState) appendPath(path []byte, qs []query) { + if len(qs) != 0 { + p.currPath = append(p.currPath, path) + } +} +func (p *parserState) popLastPath(qs []query) { + if len(qs) != 0 { + p.currPath = p.currPath[:len(p.currPath)-1] + } +} + func (p *parserState) consumeObject(b []byte, qs []query, lvl int) (n int) { for n < len(b) { n += p.consumeSpace(b[n:]) @@ -326,7 +343,7 @@ func (p *parserState) consumeObject(b []byte, qs []query, lvl int) (n int) { if keyLen := p.consumeString(b[n:]); keyLen == 0 { return 0 } else { - p.currPath = append(p.currPath, b[n:n+keyLen-1]) + p.appendPath(b[n:n+keyLen-1], qs) if !p.querySatisfied { queryMatched = queryPathMatch(qs, p.currPath) } @@ -368,12 +385,12 @@ func (p *parserState) consumeObject(b []byte, qs []query, lvl int) (n int) { } switch b[n] { case ',': - p.currPath = p.currPath[:len(p.currPath)-1] + p.popLastPath(qs) n++ p.ib++ continue case '}': - p.currPath = p.currPath[:len(p.currPath)-1] + p.popLastPath(qs) p.ib++ return n + 1 default: @@ -388,6 +405,9 @@ func (p *parserState) consumeAny(b []byte, qs []query, lvl int) (n int) { if p.maxRecursion != 0 && lvl > p.maxRecursion { return 0 } + if len(qs) == 0 { + p.querySatisfied = true + } n += p.consumeSpace(b) if len(b[n:]) == 0 { return 0 @@ -426,9 +446,6 @@ func (p *parserState) consumeAny(b []byte, qs []query, lvl int) (n int) { if lvl == 0 { p.firstToken = t } - if len(qs) == 0 { - p.querySatisfied = true - } if rv <= 0 { return n } diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go index dd7f2417c6..8a0c849977 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go @@ -5,43 +5,80 @@ import ( "encoding/binary" ) -var ( - // SevenZ matches a 7z archive. - SevenZ = prefix([]byte{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C}) - // Gzip matches gzip files based on http://www.zlib.org/rfc-gzip.html#header-trailer. - Gzip = prefix([]byte{0x1f, 0x8b}) - // Fits matches an Flexible Image Transport System file. - Fits = prefix([]byte{ +// SevenZ matches a 7z archive. +func SevenZ(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C}) +} + +// Gzip matches gzip files based on http://www.zlib.org/rfc-gzip.html#header-trailer. +func Gzip(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x1f, 0x8b}) +} + +// Fits matches an Flexible Image Transport System file. +func Fits(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{ 0x53, 0x49, 0x4D, 0x50, 0x4C, 0x45, 0x20, 0x20, 0x3D, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, }) - // Xar matches an eXtensible ARchive format file. - Xar = prefix([]byte{0x78, 0x61, 0x72, 0x21}) - // Bz2 matches a bzip2 file. - Bz2 = prefix([]byte{0x42, 0x5A, 0x68}) - // Ar matches an ar (Unix) archive file. - Ar = prefix([]byte{0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E}) - // Deb matches a Debian package file. - Deb = offset([]byte{ +} + +// Xar matches an eXtensible ARchive format file. +func Xar(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x78, 0x61, 0x72, 0x21}) +} + +// Bz2 matches a bzip2 file. +func Bz2(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x42, 0x5A, 0x68}) +} + +// Ar matches an ar (Unix) archive file. +func Ar(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E}) +} + +// Deb matches a Debian package file. +func Deb(raw []byte, _ uint32) bool { + return offset(raw, []byte{ 0x64, 0x65, 0x62, 0x69, 0x61, 0x6E, 0x2D, 0x62, 0x69, 0x6E, 0x61, 0x72, 0x79, }, 8) - // Warc matches a Web ARChive file. - Warc = prefix([]byte("WARC/1.0"), []byte("WARC/1.1")) - // Cab matches a Microsoft Cabinet archive file. - Cab = prefix([]byte("MSCF\x00\x00\x00\x00")) - // Xz matches an xz compressed stream based on https://tukaani.org/xz/xz-file-format.txt. - Xz = prefix([]byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00}) - // Lzip matches an Lzip compressed file. - Lzip = prefix([]byte{0x4c, 0x5a, 0x49, 0x50}) - // RPM matches an RPM or Delta RPM package file. - RPM = prefix([]byte{0xed, 0xab, 0xee, 0xdb}, []byte("drpm")) - // Cpio matches a cpio archive file. - Cpio = prefix([]byte("070707"), []byte("070701"), []byte("070702")) - // RAR matches a RAR archive file. - RAR = prefix([]byte("Rar!\x1A\x07\x00"), []byte("Rar!\x1A\x07\x01\x00")) -) +} + +// Warc matches a Web ARChive file. +func Warc(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("WARC/1.0")) || + bytes.HasPrefix(raw, []byte("WARC/1.1")) +} + +// Cab matches a Microsoft Cabinet archive file. +func Cab(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("MSCF\x00\x00\x00\x00")) +} + +// Xz matches an xz compressed stream based on https://tukaani.org/xz/xz-file-format.txt. +func Xz(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00}) +} + +// Lzip matches an Lzip compressed file. +func Lzip(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x4c, 0x5a, 0x49, 0x50}) +} + +// RPM matches an RPM or Delta RPM package file. +func RPM(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0xed, 0xab, 0xee, 0xdb}) || + bytes.HasPrefix(raw, []byte("drpm")) +} + +// RAR matches a RAR archive file. +func RAR(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("Rar!\x1A\x07\x00")) || + bytes.HasPrefix(raw, []byte("Rar!\x1A\x07\x01\x00")) +} // InstallShieldCab matches an InstallShield Cabinet archive file. func InstallShieldCab(raw []byte, _ uint32) bool { @@ -78,6 +115,17 @@ func CRX(raw []byte, limit uint32) bool { return Zip(raw[zipOffset:], limit) } +// Cpio matches a cpio archive file. +func Cpio(raw []byte, _ uint32) bool { + if len(raw) < 6 { + return false + } + return binary.LittleEndian.Uint16(raw) == 070707 || // binary cpio + bytes.HasPrefix(raw, []byte("070707")) || // portable ASCII cpios + bytes.HasPrefix(raw, []byte("070701")) || + bytes.HasPrefix(raw, []byte("070702")) +} + // Tar matches a (t)ape (ar)chive file. // Tar files are divided into 512 bytes records. First record contains a 257 // bytes header padded with NUL. diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go index d17e32482c..2b160711ff 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go @@ -5,26 +5,50 @@ import ( "encoding/binary" ) -var ( - // Flac matches a Free Lossless Audio Codec file. - Flac = prefix([]byte("\x66\x4C\x61\x43\x00\x00\x00\x22")) - // Midi matches a Musical Instrument Digital Interface file. - Midi = prefix([]byte("\x4D\x54\x68\x64")) - // Ape matches a Monkey's Audio file. - Ape = prefix([]byte("\x4D\x41\x43\x20\x96\x0F\x00\x00\x34\x00\x00\x00\x18\x00\x00\x00\x90\xE3")) - // MusePack matches a Musepack file. - MusePack = prefix([]byte("MPCK")) - // Au matches a Sun Microsystems au file. - Au = prefix([]byte("\x2E\x73\x6E\x64")) - // Amr matches an Adaptive Multi-Rate file. - Amr = prefix([]byte("\x23\x21\x41\x4D\x52")) - // Voc matches a Creative Voice file. - Voc = prefix([]byte("Creative Voice File")) - // M3u matches a Playlist file. - M3u = prefix([]byte("#EXTM3U")) - // AAC matches an Advanced Audio Coding file. - AAC = prefix([]byte{0xFF, 0xF1}, []byte{0xFF, 0xF9}) -) +// Flac matches a Free Lossless Audio Codec file. +func Flac(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x66\x4C\x61\x43\x00\x00\x00\x22")) +} + +// Midi matches a Musical Instrument Digital Interface file. +func Midi(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x4D\x54\x68\x64")) +} + +// Ape matches a Monkey's Audio file. +func Ape(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x4D\x41\x43\x20\x96\x0F\x00\x00\x34\x00\x00\x00\x18\x00\x00\x00\x90\xE3")) +} + +// MusePack matches a Musepack file. +func MusePack(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("MPCK")) +} + +// Au matches a Sun Microsystems au file. +func Au(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x2E\x73\x6E\x64")) +} + +// Amr matches an Adaptive Multi-Rate file. +func Amr(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x23\x21\x41\x4D\x52")) +} + +// Voc matches a Creative Voice file. +func Voc(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("Creative Voice File")) +} + +// M3u matches a Playlist file. +func M3u(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("#EXTM3U")) +} + +// AAC matches an Advanced Audio Coding file. +func AAC(raw []byte, _ uint32) bool { + return len(raw) > 1 && ((raw[0] == 0xFF && raw[1] == 0xF1) || (raw[0] == 0xFF && raw[1] == 0xF9)) +} // Mp3 matches an mp3 file. func Mp3(raw []byte, limit uint32) bool { diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go index 70599b3420..37ad6a9fb1 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go @@ -6,26 +6,52 @@ import ( "encoding/binary" ) -var ( - // Lnk matches Microsoft lnk binary format. - Lnk = prefix([]byte{0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00}) - // Wasm matches a web assembly File Format file. - Wasm = prefix([]byte{0x00, 0x61, 0x73, 0x6D}) - // Exe matches a Windows/DOS executable file. - Exe = prefix([]byte{0x4D, 0x5A}) - // Elf matches an Executable and Linkable Format file. - Elf = prefix([]byte{0x7F, 0x45, 0x4C, 0x46}) - // Nes matches a Nintendo Entertainment system ROM file. - Nes = prefix([]byte{0x4E, 0x45, 0x53, 0x1A}) - // SWF matches an Adobe Flash swf file. - SWF = prefix([]byte("CWS"), []byte("FWS"), []byte("ZWS")) - // Torrent has bencoded text in the beginning. - Torrent = prefix([]byte("d8:announce")) - // PAR1 matches a parquet file. - Par1 = prefix([]byte{0x50, 0x41, 0x52, 0x31}) - // CBOR matches a Concise Binary Object Representation https://cbor.io/ - CBOR = prefix([]byte{0xD9, 0xD9, 0xF7}) -) +// Lnk matches Microsoft lnk binary format. +func Lnk(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00}) +} + +// Wasm matches a web assembly File Format file. +func Wasm(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x00, 0x61, 0x73, 0x6D}) +} + +// Exe matches a Windows/DOS executable file. +func Exe(raw []byte, _ uint32) bool { + return len(raw) > 1 && raw[0] == 0x4D && raw[1] == 0x5A +} + +// Elf matches an Executable and Linkable Format file. +func Elf(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x7F, 0x45, 0x4C, 0x46}) +} + +// Nes matches a Nintendo Entertainment system ROM file. +func Nes(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x4E, 0x45, 0x53, 0x1A}) +} + +// SWF matches an Adobe Flash swf file. +func SWF(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("CWS")) || + bytes.HasPrefix(raw, []byte("FWS")) || + bytes.HasPrefix(raw, []byte("ZWS")) +} + +// Torrent has bencoded text in the beginning. +func Torrent(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("d8:announce")) +} + +// PAR1 matches a parquet file. +func Par1(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x50, 0x41, 0x52, 0x31}) +} + +// CBOR matches a Concise Binary Object Representation https://cbor.io/ +func CBOR(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0xD9, 0xD9, 0xF7}) +} // Java bytecode and Mach-O binaries share the same magic number. // More info here https://github.com/threatstack/libmagic/blob/master/magic/Magdir/cafebabe @@ -168,8 +194,10 @@ func Marc(raw []byte, limit uint32) bool { // // [glTF specification]: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html // [IANA glTF entry]: https://www.iana.org/assignments/media-types/model/gltf-binary -var GLB = prefix([]byte("\x67\x6C\x54\x46\x02\x00\x00\x00"), - []byte("\x67\x6C\x54\x46\x01\x00\x00\x00")) +func GLB(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x67\x6C\x54\x46\x02\x00\x00\x00")) || + bytes.HasPrefix(raw, []byte("\x67\x6C\x54\x46\x01\x00\x00\x00")) +} // TzIf matches a Time Zone Information Format (TZif) file. // See more: https://tools.ietf.org/id/draft-murchison-tzdist-tzif-00.html#rfc.section.3 diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go index cb1fed12f7..35c3f911ea 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go @@ -1,13 +1,21 @@ package magic -var ( - // Sqlite matches an SQLite database file. - Sqlite = prefix([]byte{ +import "bytes" + +// Sqlite matches an SQLite database file. +func Sqlite(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{ 0x53, 0x51, 0x4c, 0x69, 0x74, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x33, 0x00, }) - // MsAccessAce matches Microsoft Access dababase file. - MsAccessAce = offset([]byte("Standard ACE DB"), 4) - // MsAccessMdb matches legacy Microsoft Access database file (JET, 2003 and earlier). - MsAccessMdb = offset([]byte("Standard Jet DB"), 4) -) +} + +// MsAccessAce matches Microsoft Access dababase file. +func MsAccessAce(raw []byte, _ uint32) bool { + return offset(raw, []byte("Standard ACE DB"), 4) +} + +// MsAccessMdb matches legacy Microsoft Access database file (JET, 2003 and earlier). +func MsAccessMdb(raw []byte, _ uint32) bool { + return offset(raw, []byte("Standard Jet DB"), 4) +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go index b3b26d5a12..7208039580 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go @@ -1,28 +1,48 @@ package magic -import "bytes" - -var ( - // Pdf matches a Portable Document Format file. - // https://github.com/file/file/blob/11010cc805546a3e35597e67e1129a481aed40e8/magic/Magdir/pdf - Pdf = prefix( - // usual pdf signature - []byte("%PDF-"), +import ( + "bytes" + "encoding/binary" +) + +// Pdf matches a Portable Document Format file. +// https://github.com/file/file/blob/11010cc805546a3e35597e67e1129a481aed40e8/magic/Magdir/pdf +func Pdf(raw []byte, _ uint32) bool { + // usual pdf signature + return bytes.HasPrefix(raw, []byte("%PDF-")) || // new-line prefixed signature - []byte("\012%PDF-"), + bytes.HasPrefix(raw, []byte("\012%PDF-")) || // UTF-8 BOM prefixed signature - []byte("\xef\xbb\xbf%PDF-"), - ) - // Fdf matches a Forms Data Format file. - Fdf = prefix([]byte("%FDF")) - // Mobi matches a Mobi file. - Mobi = offset([]byte("BOOKMOBI"), 60) - // Lit matches a Microsoft Lit file. - Lit = prefix([]byte("ITOLITLS")) -) + bytes.HasPrefix(raw, []byte("\xef\xbb\xbf%PDF-")) +} + +// Fdf matches a Forms Data Format file. +func Fdf(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("%FDF")) +} + +// Mobi matches a Mobi file. +func Mobi(raw []byte, _ uint32) bool { + return offset(raw, []byte("BOOKMOBI"), 60) +} + +// Lit matches a Microsoft Lit file. +func Lit(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("ITOLITLS")) +} + +// PDF matches a Portable Document Format file. +// The %PDF- header should be the first thing inside the file but many +// implementations don't follow the rule. The PDF spec at Appendix H says the +// signature can be prepended by anything. +// https://bugs.astron.com/view.php?id=446 +func PDF(raw []byte, _ uint32) bool { + raw = raw[:min(len(raw), 1024)] + return bytes.Contains(raw, []byte("%PDF-")) +} // DjVu matches a DjVu file. -func DjVu(raw []byte, limit uint32) bool { +func DjVu(raw []byte, _ uint32) bool { if len(raw) < 12 { return false } @@ -36,7 +56,7 @@ func DjVu(raw []byte, limit uint32) bool { } // P7s matches an .p7s signature File (PEM, Base64). -func P7s(raw []byte, limit uint32) bool { +func P7s(raw []byte, _ uint32) bool { // Check for PEM Encoding. if bytes.HasPrefix(raw, []byte("-----BEGIN PKCS7")) { return true @@ -60,3 +80,21 @@ func P7s(raw []byte, limit uint32) bool { return false } + +// Lotus123 matches a Lotus 1-2-3 spreadsheet document. +func Lotus123(raw []byte, _ uint32) bool { + if len(raw) <= 20 { + return false + } + version := binary.BigEndian.Uint32(raw) + if version == 0x00000200 { + return raw[6] != 0 && raw[7] == 0 + } + + return version == 0x00001a00 && raw[20] > 0 && raw[20] < 32 +} + +// CHM matches a Microsoft Compiled HTML Help file. +func CHM(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("ITSF\003\000\000\000\x60\000\000\000")) +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go index 43af28212e..857cfcc552 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go @@ -4,14 +4,20 @@ import ( "bytes" ) -var ( - // Woff matches a Web Open Font Format file. - Woff = prefix([]byte("wOFF")) - // Woff2 matches a Web Open Font Format version 2 file. - Woff2 = prefix([]byte("wOF2")) - // Otf matches an OpenType font file. - Otf = prefix([]byte{0x4F, 0x54, 0x54, 0x4F, 0x00}) -) +// Woff matches a Web Open Font Format file. +func Woff(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("wOFF")) +} + +// Woff2 matches a Web Open Font Format version 2 file. +func Woff2(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("wOF2")) +} + +// Otf matches an OpenType font file. +func Otf(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x4F, 0x54, 0x54, 0x4F, 0x00}) +} // Ttf matches a TrueType font file. func Ttf(raw []byte, limit uint32) bool { diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go index ac727139ef..fc642ef433 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go @@ -4,24 +4,33 @@ import ( "bytes" ) -var ( - // AVIF matches an AV1 Image File Format still or animated. - // Wikipedia page seems outdated listing image/avif-sequence for animations. - // https://github.com/AOMediaCodec/av1-avif/issues/59 - AVIF = ftyp([]byte("avif"), []byte("avis")) - // ThreeGP matches a 3GPP file. - ThreeGP = ftyp( +// AVIF matches an AV1 Image File Format still or animated. +// Wikipedia page seems outdated listing image/avif-sequence for animations. +// https://github.com/AOMediaCodec/av1-avif/issues/59 +func AVIF(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("avif"), []byte("avis")) +} + +// ThreeGP matches a 3GPP file. +func ThreeGP(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("3gp1"), []byte("3gp2"), []byte("3gp3"), []byte("3gp4"), []byte("3gp5"), []byte("3gp6"), []byte("3gp7"), []byte("3gs7"), []byte("3ge6"), []byte("3ge7"), []byte("3gg6"), ) - // ThreeG2 matches a 3GPP2 file. - ThreeG2 = ftyp( +} + +// ThreeG2 matches a 3GPP2 file. +func ThreeG2(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("3g24"), []byte("3g25"), []byte("3g26"), []byte("3g2a"), []byte("3g2b"), []byte("3g2c"), []byte("KDDI"), ) - // AMp4 matches an audio MP4 file. - AMp4 = ftyp( +} + +// AMp4 matches an audio MP4 file. +func AMp4(raw []byte, _ uint32) bool { + return ftyp(raw, // audio for Adobe Flash Player 9+ []byte("F4A "), []byte("F4B "), // Apple iTunes AAC-LC (.M4A) Audio @@ -31,33 +40,61 @@ var ( // Nero Digital AAC Audio []byte("NDAS"), ) - // Mqv matches a Sony / Mobile QuickTime file. - Mqv = ftyp([]byte("mqt ")) - // M4a matches an audio M4A file. - M4a = ftyp([]byte("M4A ")) - // M4v matches an Appl4 M4V video file. - M4v = ftyp([]byte("M4V "), []byte("M4VH"), []byte("M4VP")) - // Heic matches a High Efficiency Image Coding (HEIC) file. - Heic = ftyp([]byte("heic"), []byte("heix")) - // HeicSequence matches a High Efficiency Image Coding (HEIC) file sequence. - HeicSequence = ftyp([]byte("hevc"), []byte("hevx")) - // Heif matches a High Efficiency Image File Format (HEIF) file. - Heif = ftyp([]byte("mif1"), []byte("heim"), []byte("heis"), []byte("avic")) - // HeifSequence matches a High Efficiency Image File Format (HEIF) file sequence. - HeifSequence = ftyp([]byte("msf1"), []byte("hevm"), []byte("hevs"), []byte("avcs")) - // Mj2 matches a Motion JPEG 2000 file: https://en.wikipedia.org/wiki/Motion_JPEG_2000. - Mj2 = ftyp([]byte("mj2s"), []byte("mjp2"), []byte("MFSM"), []byte("MGSV")) - // Dvb matches a Digital Video Broadcasting file: https://dvb.org. - // https://cconcolato.github.io/mp4ra/filetype.html - // https://github.com/file/file/blob/512840337ead1076519332d24fefcaa8fac36e06/magic/Magdir/animation#L135-L154 - Dvb = ftyp( +} + +// Mqv matches a Sony / Mobile QuickTime file. +func Mqv(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("mqt ")) +} + +// M4a matches an audio M4A file. +func M4a(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("M4A ")) +} + +// M4v matches an Appl4 M4V video file. +func M4v(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("M4V "), []byte("M4VH"), []byte("M4VP")) +} + +// Heic matches a High Efficiency Image Coding (HEIC) file. +func Heic(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("heic"), []byte("heix")) +} + +// HeicSequence matches a High Efficiency Image Coding (HEIC) file sequence. +func HeicSequence(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("hevc"), []byte("hevx")) +} + +// Heif matches a High Efficiency Image File Format (HEIF) file. +func Heif(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("mif1"), []byte("heim"), []byte("heis"), []byte("avic")) +} + +// HeifSequence matches a High Efficiency Image File Format (HEIF) file sequence. +func HeifSequence(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("msf1"), []byte("hevm"), []byte("hevs"), []byte("avcs")) +} + +// Mj2 matches a Motion JPEG 2000 file: https://en.wikipedia.org/wiki/Motion_JPEG_2000. +func Mj2(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("mj2s"), []byte("mjp2"), []byte("MFSM"), []byte("MGSV")) +} + +// Dvb matches a Digital Video Broadcasting file: https://dvb.org. +// https://cconcolato.github.io/mp4ra/filetype.html +// https://github.com/file/file/blob/512840337ead1076519332d24fefcaa8fac36e06/magic/Magdir/animation#L135-L154 +func Dvb(raw []byte, _ uint32) bool { + return ftyp(raw, []byte("dby1"), []byte("dsms"), []byte("dts1"), []byte("dts2"), []byte("dts3"), []byte("dxo "), []byte("dmb1"), []byte("dmpf"), []byte("drc1"), []byte("dv1a"), []byte("dv1b"), []byte("dv2a"), []byte("dv2b"), []byte("dv3a"), []byte("dv3b"), []byte("dvr1"), []byte("dvt1"), []byte("emsg")) - // TODO: add support for remaining video formats at ftyps.com. -) +} + +// TODO: add support for remaining video formats at ftyps.com. // QuickTime matches a QuickTime File Format file. // https://www.loc.gov/preservation/digital/formats/fdd/fdd000052.shtml diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go index 0eb7e95f37..788f5478b4 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go @@ -2,66 +2,127 @@ package magic import "bytes" -var ( - // Png matches a Portable Network Graphics file. - // https://www.w3.org/TR/PNG/ - Png = prefix([]byte{0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}) - // Apng matches an Animated Portable Network Graphics file. - // https://wiki.mozilla.org/APNG_Specification - Apng = offset([]byte("acTL"), 37) - // Jpg matches a Joint Photographic Experts Group file. - Jpg = prefix([]byte{0xFF, 0xD8, 0xFF}) - // Jp2 matches a JPEG 2000 Image file (ISO 15444-1). - Jp2 = jpeg2k([]byte{0x6a, 0x70, 0x32, 0x20}) - // Jpx matches a JPEG 2000 Image file (ISO 15444-2). - Jpx = jpeg2k([]byte{0x6a, 0x70, 0x78, 0x20}) - // Jpm matches a JPEG 2000 Image file (ISO 15444-6). - Jpm = jpeg2k([]byte{0x6a, 0x70, 0x6D, 0x20}) - // Gif matches a Graphics Interchange Format file. - Gif = prefix([]byte("GIF87a"), []byte("GIF89a")) - // Bmp matches a bitmap image file. - Bmp = prefix([]byte{0x42, 0x4D}) - // Ps matches a PostScript file. - Ps = prefix([]byte("%!PS-Adobe-")) - // Psd matches a Photoshop Document file. - Psd = prefix([]byte("8BPS")) - // Ico matches an ICO file. - Ico = prefix([]byte{0x00, 0x00, 0x01, 0x00}, []byte{0x00, 0x00, 0x02, 0x00}) - // Icns matches an ICNS (Apple Icon Image format) file. - Icns = prefix([]byte("icns")) - // Tiff matches a Tagged Image File Format file. - Tiff = prefix([]byte{0x49, 0x49, 0x2A, 0x00}, []byte{0x4D, 0x4D, 0x00, 0x2A}) - // Bpg matches a Better Portable Graphics file. - Bpg = prefix([]byte{0x42, 0x50, 0x47, 0xFB}) - // Xcf matches GIMP image data. - Xcf = prefix([]byte("gimp xcf")) - // Pat matches GIMP pattern data. - Pat = offset([]byte("GPAT"), 20) - // Gbr matches GIMP brush data. - Gbr = offset([]byte("GIMP"), 20) - // Hdr matches Radiance HDR image. - // https://web.archive.org/web/20060913152809/http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ - Hdr = prefix([]byte("#?RADIANCE\n")) - // Xpm matches X PixMap image data. - Xpm = prefix([]byte{0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A, 0x2F}) - // Jxs matches a JPEG XS coded image file (ISO/IEC 21122-3). - Jxs = prefix([]byte{0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x53, 0x20, 0x0D, 0x0A, 0x87, 0x0A}) - // Jxr matches Microsoft HD JXR photo file. - Jxr = prefix([]byte{0x49, 0x49, 0xBC, 0x01}) -) - -func jpeg2k(sig []byte) Detector { - return func(raw []byte, _ uint32) bool { - if len(raw) < 24 { - return false - } +// Png matches a Portable Network Graphics file. +// https://www.w3.org/TR/PNG/ +func Png(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}) +} - if !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x20, 0x20}) && - !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x32, 0x20}) { - return false - } - return bytes.Equal(raw[20:24], sig) +// Apng matches an Animated Portable Network Graphics file. +// https://wiki.mozilla.org/APNG_Specification +func Apng(raw []byte, _ uint32) bool { + return offset(raw, []byte("acTL"), 37) +} + +// Jpg matches a Joint Photographic Experts Group file. +func Jpg(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0xFF, 0xD8, 0xFF}) +} + +// Jp2 matches a JPEG 2000 Image file (ISO 15444-1). +func Jp2(raw []byte, _ uint32) bool { + return jpeg2k(raw, []byte{0x6a, 0x70, 0x32, 0x20}) +} + +// Jpx matches a JPEG 2000 Image file (ISO 15444-2). +func Jpx(raw []byte, _ uint32) bool { + return jpeg2k(raw, []byte{0x6a, 0x70, 0x78, 0x20}) +} + +// Jpm matches a JPEG 2000 Image file (ISO 15444-6). +func Jpm(raw []byte, _ uint32) bool { + return jpeg2k(raw, []byte{0x6a, 0x70, 0x6D, 0x20}) +} + +// Gif matches a Graphics Interchange Format file. +func Gif(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("GIF87a")) || + bytes.HasPrefix(raw, []byte("GIF89a")) +} + +// Bmp matches a bitmap image file. +func Bmp(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x42, 0x4D}) +} + +// Ps matches a PostScript file. +func Ps(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("%!PS-Adobe-")) +} + +// Psd matches a Photoshop Document file. +func Psd(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("8BPS")) +} + +// Ico matches an ICO file. +func Ico(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x00, 0x00, 0x01, 0x00}) || + bytes.HasPrefix(raw, []byte{0x00, 0x00, 0x02, 0x00}) +} + +// Icns matches an ICNS (Apple Icon Image format) file. +func Icns(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("icns")) +} + +// Tiff matches a Tagged Image File Format file. +func Tiff(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x49, 0x49, 0x2A, 0x00}) || + bytes.HasPrefix(raw, []byte{0x4D, 0x4D, 0x00, 0x2A}) +} + +// Bpg matches a Better Portable Graphics file. +func Bpg(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x42, 0x50, 0x47, 0xFB}) +} + +// Xcf matches GIMP image data. +func Xcf(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("gimp xcf")) +} + +// Pat matches GIMP pattern data. +func Pat(raw []byte, _ uint32) bool { + return offset(raw, []byte("GPAT"), 20) +} + +// Gbr matches GIMP brush data. +func Gbr(raw []byte, _ uint32) bool { + return offset(raw, []byte("GIMP"), 20) +} + +// Hdr matches Radiance HDR image. +// https://web.archive.org/web/20060913152809/http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ +func Hdr(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("#?RADIANCE\n")) +} + +// Xpm matches X PixMap image data. +func Xpm(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A, 0x2F}) +} + +// Jxs matches a JPEG XS coded image file (ISO/IEC 21122-3). +func Jxs(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x53, 0x20, 0x0D, 0x0A, 0x87, 0x0A}) +} + +// Jxr matches Microsoft HD JXR photo file. +func Jxr(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x49, 0x49, 0xBC, 0x01}) +} + +func jpeg2k(raw []byte, sig []byte) bool { + if len(raw) < 24 { + return false + } + + if !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x20, 0x20}) && + !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x32, 0x20}) { + return false } + return bytes.Equal(raw[20:24], sig) } // Webp matches a WebP file. @@ -108,3 +169,20 @@ func Jxl(raw []byte, _ uint32) bool { return bytes.HasPrefix(raw, []byte{0xFF, 0x0A}) || bytes.HasPrefix(raw, []byte("\x00\x00\x00\x0cJXL\x20\x0d\x0a\x87\x0a")) } + +// DXF matches Drawing Exchange Format AutoCAD file. +// There does not seem to be a clear specification and the files in the wild +// differ wildly. +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf +// +// I collected these signatures by downloading a few dozen files from +// http://cd.textfiles.com/amigaenv/DXF/OBJEKTE/ and +// https://sembiance.com/fileFormatSamples/poly/dxf/ and then +// xxd -l 16 {} | sort | uniq. +// These signatures are only for the ASCII version of DXF. There is a binary version too. +func DXF(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte(" 0\x0ASECTION\x0A")) || + bytes.HasPrefix(raw, []byte(" 0\x0D\x0ASECTION\x0D\x0A")) || + bytes.HasPrefix(raw, []byte("0\x0ASECTION\x0A")) || + bytes.HasPrefix(raw, []byte("0\x0D\x0ASECTION\x0D\x0A")) +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go index a34c609842..6103c12d36 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go @@ -3,7 +3,8 @@ package magic import ( "bytes" - "fmt" + + "github.com/gabriel-vasile/mimetype/internal/scan" ) type ( @@ -20,37 +21,20 @@ type ( } ) -// prefix creates a Detector which returns true if any of the provided signatures -// is the prefix of the raw input. -func prefix(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if bytes.HasPrefix(raw, s) { - return true - } - } - return false - } -} - -// offset creates a Detector which returns true if the provided signature can be +// offset returns true if the provided signature can be // found at offset in the raw input. -func offset(sig []byte, offset int) Detector { - return func(raw []byte, limit uint32) bool { - return len(raw) > offset && bytes.HasPrefix(raw[offset:], sig) - } +func offset(raw []byte, sig []byte, offset int) bool { + return len(raw) > offset && bytes.HasPrefix(raw[offset:], sig) } // ciPrefix is like prefix but the check is case insensitive. -func ciPrefix(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if ciCheck(s, raw) { - return true - } +func ciPrefix(raw []byte, sigs ...[]byte) bool { + for _, s := range sigs { + if ciCheck(s, raw) { + return true } - return false } + return false } func ciCheck(sig, raw []byte) bool { if len(raw) < len(sig)+1 { @@ -70,21 +54,18 @@ func ciCheck(sig, raw []byte) bool { return true } -// xml creates a Detector which returns true if any of the provided XML signatures -// matches the raw input. -func xml(sigs ...xmlSig) Detector { - return func(raw []byte, limit uint32) bool { - raw = trimLWS(raw) - if len(raw) == 0 { - return false - } - for _, s := range sigs { - if xmlCheck(s, raw) { - return true - } - } +// xml returns true if any of the provided XML signatures matches the raw input. +func xml(b scan.Bytes, sigs ...xmlSig) bool { + b.TrimLWS() + if len(b) == 0 { return false } + for _, s := range sigs { + if xmlCheck(s, b) { + return true + } + } + return false } func xmlCheck(sig xmlSig, raw []byte) bool { raw = raw[:min(len(raw), 512)] @@ -100,28 +81,24 @@ func xmlCheck(sig xmlSig, raw []byte) bool { return localNameIndex != -1 && localNameIndex < bytes.Index(raw, sig.xmlns) } -// markup creates a Detector which returns true is any of the HTML signatures -// matches the raw input. -func markup(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - if bytes.HasPrefix(raw, []byte{0xEF, 0xBB, 0xBF}) { - // We skip the UTF-8 BOM if present to ensure we correctly - // process any leading whitespace. The presence of the BOM - // is taken into account during charset detection in charset.go. - raw = trimLWS(raw[3:]) - } else { - raw = trimLWS(raw) - } - if len(raw) == 0 { - return false - } - for _, s := range sigs { - if markupCheck(s, raw) { - return true - } - } +// markup returns true is any of the HTML signatures matches the raw input. +func markup(b scan.Bytes, sigs ...[]byte) bool { + if bytes.HasPrefix(b, []byte{0xEF, 0xBB, 0xBF}) { + // We skip the UTF-8 BOM if present to ensure we correctly + // process any leading whitespace. The presence of the BOM + // is taken into account during charset detection in charset.go. + b.Advance(3) + } + b.TrimLWS() + if len(b) == 0 { return false } + for _, s := range sigs { + if markupCheck(s, b) { + return true + } + } + return false } func markupCheck(sig, raw []byte) bool { if len(raw) < len(sig)+1 { @@ -139,36 +116,24 @@ func markupCheck(sig, raw []byte) bool { } } // Next byte must be space or right angle bracket. - if db := raw[len(sig)]; db != ' ' && db != '>' { + if db := raw[len(sig)]; !scan.ByteIsWS(db) && db != '>' { return false } return true } -// ftyp creates a Detector which returns true if any of the FTYP signatures -// matches the raw input. -func ftyp(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - if len(raw) < 12 { - return false - } - for _, s := range sigs { - if bytes.Equal(raw[8:12], s) { - return true - } - } +// ftyp returns true if any of the FTYP signatures matches the raw input. +func ftyp(raw []byte, sigs ...[]byte) bool { + if len(raw) < 12 { return false } -} - -func newXMLSig(localName, xmlns string) xmlSig { - ret := xmlSig{xmlns: []byte(xmlns)} - if localName != "" { - ret.localName = []byte(fmt.Sprintf("<%s", localName)) + for _, s := range sigs { + if bytes.Equal(raw[8:12], s) { + return true + } } - - return ret + return false } // A valid shebang starts with the "#!" characters, @@ -181,71 +146,17 @@ func newXMLSig(localName, xmlns string) xmlSig { // #! /usr/bin/env php // // /usr/bin/env is the interpreter, php is the first and only argument. -func shebang(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if shebangCheck(s, firstLine(raw)) { - return true - } - } - return false - } -} - -func shebangCheck(sig, raw []byte) bool { - if len(raw) < len(sig)+2 { - return false - } - if raw[0] != '#' || raw[1] != '!' { +func shebang(b scan.Bytes, matchFlags scan.Flags, sigs ...[]byte) bool { + line := b.Line() + if len(line) < 2 || line[0] != '#' || line[1] != '!' { return false } - - return bytes.Equal(trimLWS(trimRWS(raw[2:])), sig) -} - -// trimLWS trims whitespace from beginning of the input. -func trimLWS(in []byte) []byte { - firstNonWS := 0 - for ; firstNonWS < len(in) && isWS(in[firstNonWS]); firstNonWS++ { - } - - return in[firstNonWS:] -} - -// trimRWS trims whitespace from the end of the input. -func trimRWS(in []byte) []byte { - lastNonWS := len(in) - 1 - for ; lastNonWS > 0 && isWS(in[lastNonWS]); lastNonWS-- { - } - - return in[:lastNonWS+1] -} - -func firstLine(in []byte) []byte { - lineEnd := 0 - for ; lineEnd < len(in) && in[lineEnd] != '\n'; lineEnd++ { - } - - return in[:lineEnd] -} - -func isWS(b byte) bool { - return b == '\t' || b == '\n' || b == '\x0c' || b == '\r' || b == ' ' -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -type readBuf []byte - -func (b *readBuf) advance(n int) bool { - if n < 0 || len(*b) < n { - return false + line = line[2:] + line.TrimLWS() + for _, s := range sigs { + if line.Match(s, matchFlags) != -1 { + return true + } } - *b = (*b)[n:] - return true + return false } diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go index 7d60e22e26..bd4a0c3659 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go @@ -7,17 +7,34 @@ import ( // Xlsx matches a Microsoft Excel 2007 file. func Xlsx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("xl/"), true) + return msoxml(raw, zipEntries{{ + name: []byte("xl/"), + dir: true, + }}, 100) } // Docx matches a Microsoft Word 2007 file. func Docx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("word/"), true) + return msoxml(raw, zipEntries{{ + name: []byte("word/"), + dir: true, + }}, 100) } // Pptx matches a Microsoft PowerPoint 2007 file. func Pptx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("ppt/"), true) + return msoxml(raw, zipEntries{{ + name: []byte("ppt/"), + dir: true, + }}, 100) +} + +// Visio matches a Microsoft Visio 2013+ file. +func Visio(raw []byte, limit uint32) bool { + return msoxml(raw, zipEntries{{ + name: []byte("visio/"), + dir: true, + }}, 100) } // Ole matches an Open Linking and Embedding file. @@ -27,17 +44,6 @@ func Ole(raw []byte, limit uint32) bool { return bytes.HasPrefix(raw, []byte{0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1}) } -// Aaf matches an Advanced Authoring Format file. -// See: https://pyaaf.readthedocs.io/en/latest/about.html -// See: https://en.wikipedia.org/wiki/Advanced_Authoring_Format -func Aaf(raw []byte, limit uint32) bool { - if len(raw) < 31 { - return false - } - return bytes.HasPrefix(raw[8:], []byte{0x41, 0x41, 0x46, 0x42, 0x0D, 0x00, 0x4F, 0x4D}) && - (raw[30] == 0x09 || raw[30] == 0x0C) -} - // Doc matches a Microsoft Word 97-2003 file. // See: https://github.com/decalage2/oletools/blob/412ee36ae45e70f42123e835871bac956d958461/oletools/common/clsid.py func Doc(raw []byte, _ uint32) bool { @@ -157,6 +163,14 @@ func Msi(raw []byte, limit uint32) bool { }) } +// One matches a Microsoft OneNote file. +func One(raw []byte, limit uint32) bool { + return bytes.HasPrefix(raw, []byte{ + 0xe4, 0x52, 0x5c, 0x7b, 0x8c, 0xd8, 0xa7, 0x4d, + 0xae, 0xb1, 0x53, 0x78, 0xd0, 0x29, 0x96, 0xd3, + }) +} + // Helper to match by a specific CLSID of a compound file. // // http://fileformats.archiveteam.org/wiki/Microsoft_Compound_File @@ -184,3 +198,14 @@ func matchOleClsid(in []byte, clsid []byte) bool { return bytes.HasPrefix(in[clsidOffset:], clsid) } + +// WPD matches a WordPerfect document. +func WPD(raw []byte, _ uint32) bool { + if len(raw) < 10 { + return false + } + if !bytes.HasPrefix(raw, []byte("\xffWPC")) { + return false + } + return raw[8] == 1 && raw[9] == 10 +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/netpbm.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/netpbm.go new file mode 100644 index 0000000000..4baa25767f --- /dev/null +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/netpbm.go @@ -0,0 +1,111 @@ +package magic + +import ( + "bytes" + "strconv" + + "github.com/gabriel-vasile/mimetype/internal/scan" +) + +// NetPBM matches a Netpbm Portable BitMap ASCII/Binary file. +// +// See: https://en.wikipedia.org/wiki/Netpbm +func NetPBM(raw []byte, _ uint32) bool { + return netp(raw, "P1\n", "P4\n") +} + +// NetPGM matches a Netpbm Portable GrayMap ASCII/Binary file. +// +// See: https://en.wikipedia.org/wiki/Netpbm +func NetPGM(raw []byte, _ uint32) bool { + return netp(raw, "P2\n", "P5\n") +} + +// NetPPM matches a Netpbm Portable PixMap ASCII/Binary file. +// +// See: https://en.wikipedia.org/wiki/Netpbm +func NetPPM(raw []byte, _ uint32) bool { + return netp(raw, "P3\n", "P6\n") +} + +// NetPAM matches a Netpbm Portable Arbitrary Map file. +// +// See: https://en.wikipedia.org/wiki/Netpbm +func NetPAM(raw []byte, _ uint32) bool { + if !bytes.HasPrefix(raw, []byte("P7\n")) { + return false + } + w, h, d, m, e := false, false, false, false, false + s := scan.Bytes(raw) + var l scan.Bytes + // Read line by line. + for i := 0; i < 128; i++ { + l = s.Line() + // If the line is empty or a comment, skip. + if len(l) == 0 || l.Peek() == '#' { + if len(s) == 0 { + return false + } + continue + } else if bytes.HasPrefix(l, []byte("TUPLTYPE")) { + continue + } else if bytes.HasPrefix(l, []byte("WIDTH ")) { + w = true + } else if bytes.HasPrefix(l, []byte("HEIGHT ")) { + h = true + } else if bytes.HasPrefix(l, []byte("DEPTH ")) { + d = true + } else if bytes.HasPrefix(l, []byte("MAXVAL ")) { + m = true + } else if bytes.HasPrefix(l, []byte("ENDHDR")) { + e = true + } + // When we reached header, return true if we collected all four required headers. + // WIDTH, HEIGHT, DEPTH and MAXVAL. + if e { + return w && h && d && m + } + } + return false +} + +func netp(s scan.Bytes, prefixes ...string) bool { + foundPrefix := "" + for _, p := range prefixes { + if bytes.HasPrefix(s, []byte(p)) { + foundPrefix = p + } + } + if foundPrefix == "" { + return false + } + s.Advance(len(foundPrefix)) // jump over P1, P2, P3, etc. + + var l scan.Bytes + // Read line by line. + for i := 0; i < 128; i++ { + l = s.Line() + // If the line is a comment, skip. + if l.Peek() == '#' { + continue + } + // If line has leading whitespace, then skip over whitespace. + for scan.ByteIsWS(l.Peek()) { + l.Advance(1) + } + if len(s) == 0 || len(l) > 0 { + break + } + } + + // At this point l should be the two integers denoting the size of the matrix. + width := l.PopUntil(scan.ASCIISpaces...) + for scan.ByteIsWS(l.Peek()) { + l.Advance(1) + } + height := l.PopUntil(scan.ASCIISpaces...) + + w, errw := strconv.ParseInt(string(width), 10, 64) + h, errh := strconv.ParseInt(string(height), 10, 64) + return errw == nil && errh == nil && w > 0 && h > 0 +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go index 8178e4707c..fb84e8543d 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go @@ -6,11 +6,13 @@ import ( "github.com/gabriel-vasile/mimetype/internal/charset" "github.com/gabriel-vasile/mimetype/internal/json" + mkup "github.com/gabriel-vasile/mimetype/internal/markup" + "github.com/gabriel-vasile/mimetype/internal/scan" ) -var ( - // HTML matches a Hypertext Markup Language file. - HTML = markup( +// HTML matches a Hypertext Markup Language file. +func HTML(raw []byte, _ uint32) bool { + return markup(raw, []byte(" +// +// +// +func svgWithoutXMLDeclaration(s scan.Bytes) bool { + for scan.ByteIsWS(s.Peek()) { + s.Advance(1) + } + for mkup.SkipAComment(&s) { + } + if !bytes.HasPrefix(s, []byte(" +// +// +// +func svgWithXMLDeclaration(s scan.Bytes) bool { + for scan.ByteIsWS(s.Peek()) { + s.Advance(1) + } + if !bytes.HasPrefix(s, []byte(" 4096 { + s = s[:4096] + } + return hasVersion && bytes.Contains(s, []byte(" 00:02:19,376) limits second line // length to exactly 29 characters. if len(line) != 29 { @@ -266,7 +507,7 @@ func Srt(raw []byte, _ uint32) bool { return false } - line, _ = scanLine(raw) + line = s.Line() // A third line must exist and not be empty. This is the actual subtitle text. return len(line) != 0 } @@ -295,15 +536,3 @@ func Vtt(raw []byte, limit uint32) bool { return bytes.Equal(raw, []byte{0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54}) || // UTF-8 BOM and "WEBVTT" bytes.Equal(raw, []byte{0x57, 0x45, 0x42, 0x56, 0x54, 0x54}) // "WEBVTT" } - -// dropCR drops a terminal \r from the data. -func dropCR(data []byte) []byte { - if len(data) > 0 && data[len(data)-1] == '\r' { - return data[0 : len(data)-1] - } - return data -} -func scanLine(b []byte) (line, remainder []byte) { - line, remainder, _ = bytes.Cut(b, []byte("\n")) - return dropCR(line), remainder -} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go index 6083ba8c00..020b5ee75b 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go @@ -1,77 +1,43 @@ package magic import ( - "bufio" - "bytes" - "encoding/csv" - "errors" - "io" - "sync" + "github.com/gabriel-vasile/mimetype/internal/csv" + "github.com/gabriel-vasile/mimetype/internal/scan" ) -// A bufio.Reader pool to alleviate problems with memory allocations. -var readerPool = sync.Pool{ - New: func() any { - // Initiate with empty source reader. - return bufio.NewReader(nil) - }, -} - -func newReader(r io.Reader) *bufio.Reader { - br := readerPool.Get().(*bufio.Reader) - br.Reset(r) - return br -} - -// Csv matches a comma-separated values file. -func Csv(raw []byte, limit uint32) bool { +// CSV matches a comma-separated values file. +func CSV(raw []byte, limit uint32) bool { return sv(raw, ',', limit) } -// Tsv matches a tab-separated values file. -func Tsv(raw []byte, limit uint32) bool { +// TSV matches a tab-separated values file. +func TSV(raw []byte, limit uint32) bool { return sv(raw, '\t', limit) } -func sv(in []byte, comma rune, limit uint32) bool { - in = dropLastLine(in, limit) - - br := newReader(bytes.NewReader(in)) - defer readerPool.Put(br) - r := csv.NewReader(br) - r.Comma = comma - r.ReuseRecord = true - r.LazyQuotes = true - r.Comment = '#' +func sv(in []byte, comma byte, limit uint32) bool { + s := scan.Bytes(in) + s.DropLastLine(limit) + r := csv.NewParser(comma, '#', s) - lines := 0 + headerFields, _, hasMore := r.CountFields(false) + if headerFields < 2 || !hasMore { + return false + } + csvLines := 1 // 1 for header for { - _, err := r.Read() - if errors.Is(err, io.EOF) { + fields, _, hasMore := r.CountFields(false) + if !hasMore && fields == 0 { break } - if err != nil { + csvLines++ + if fields != headerFields { return false } - lines++ - } - - return r.FieldsPerRecord > 1 && lines > 1 -} - -// dropLastLine drops the last incomplete line from b. -// -// mimetype limits itself to ReadLimit bytes when performing a detection. -// This means, for file formats like CSV for NDJSON, the last line of the input -// can be an incomplete line. -func dropLastLine(b []byte, readLimit uint32) []byte { - if readLimit == 0 || uint32(len(b)) < readLimit { - return b - } - for i := len(b) - 1; i > 0; i-- { - if b[i] == '\n' { - return b[:i] + if csvLines >= 10 { + return true } } - return b + + return csvLines >= 2 } diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go index 9caf55538a..830c5ed204 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go @@ -4,17 +4,23 @@ import ( "bytes" ) -var ( - // Flv matches a Flash video file. - Flv = prefix([]byte("\x46\x4C\x56\x01")) - // Asf matches an Advanced Systems Format file. - Asf = prefix([]byte{ +// Flv matches a Flash video file. +func Flv(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte("\x46\x4C\x56\x01")) +} + +// Asf matches an Advanced Systems Format file. +func Asf(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{ 0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C, }) - // Rmvb matches a RealMedia Variable Bitrate file. - Rmvb = prefix([]byte{0x2E, 0x52, 0x4D, 0x46}) -) +} + +// Rmvb matches a RealMedia Variable Bitrate file. +func Rmvb(raw []byte, _ uint32) bool { + return bytes.HasPrefix(raw, []byte{0x2E, 0x52, 0x4D, 0x46}) +} // WebM matches a WebM file. func WebM(raw []byte, limit uint32) bool { diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go index f6c64829d9..31f42482d9 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go @@ -2,36 +2,70 @@ package magic import ( "bytes" - "encoding/binary" -) -var ( - // Odt matches an OpenDocument Text file. - Odt = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.text"), 30) - // Ott matches an OpenDocument Text Template file. - Ott = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.text-template"), 30) - // Ods matches an OpenDocument Spreadsheet file. - Ods = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet"), 30) - // Ots matches an OpenDocument Spreadsheet Template file. - Ots = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"), 30) - // Odp matches an OpenDocument Presentation file. - Odp = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.presentation"), 30) - // Otp matches an OpenDocument Presentation Template file. - Otp = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.presentation-template"), 30) - // Odg matches an OpenDocument Drawing file. - Odg = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.graphics"), 30) - // Otg matches an OpenDocument Drawing Template file. - Otg = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.graphics-template"), 30) - // Odf matches an OpenDocument Formula file. - Odf = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.formula"), 30) - // Odc matches an OpenDocument Chart file. - Odc = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.chart"), 30) - // Epub matches an EPUB file. - Epub = offset([]byte("mimetypeapplication/epub+zip"), 30) - // Sxc matches an OpenOffice Spreadsheet file. - Sxc = offset([]byte("mimetypeapplication/vnd.sun.xml.calc"), 30) + "github.com/gabriel-vasile/mimetype/internal/scan" ) +// Odt matches an OpenDocument Text file. +func Odt(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.text"), 30) +} + +// Ott matches an OpenDocument Text Template file. +func Ott(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.text-template"), 30) +} + +// Ods matches an OpenDocument Spreadsheet file. +func Ods(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet"), 30) +} + +// Ots matches an OpenDocument Spreadsheet Template file. +func Ots(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"), 30) +} + +// Odp matches an OpenDocument Presentation file. +func Odp(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.presentation"), 30) +} + +// Otp matches an OpenDocument Presentation Template file. +func Otp(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.presentation-template"), 30) +} + +// Odg matches an OpenDocument Drawing file. +func Odg(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.graphics"), 30) +} + +// Otg matches an OpenDocument Drawing Template file. +func Otg(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.graphics-template"), 30) +} + +// Odf matches an OpenDocument Formula file. +func Odf(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.formula"), 30) +} + +// Odc matches an OpenDocument Chart file. +func Odc(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.oasis.opendocument.chart"), 30) +} + +// Epub matches an EPUB file. +func Epub(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/epub+zip"), 30) +} + +// Sxc matches an OpenOffice Spreadsheet file. +func Sxc(raw []byte, _ uint32) bool { + return offset(raw, []byte("mimetypeapplication/vnd.sun.xml.calc"), 30) +} + // Zip matches a zip archive. func Zip(raw []byte, limit uint32) bool { return len(raw) > 3 && @@ -40,92 +74,149 @@ func Zip(raw []byte, limit uint32) bool { (raw[3] == 0x4 || raw[3] == 0x6 || raw[3] == 0x8) } -// Jar matches a Java archive file. +// Jar matches a Java archive file. There are two types of Jar files: +// 1. the ones that can be opened with jexec and have 0xCAFE optional flag +// https://stackoverflow.com/tags/executable-jar/info +// 2. regular jars, same as above, just without the executable flag +// https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262278#c0 +// There is an argument to only check for manifest, since it's the common nominator +// for both executable and non-executable versions. But the traversing zip entries +// is unreliable because it does linear search for signatures +// (instead of relying on offsets told by the file.) func Jar(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("META-INF/MANIFEST.MF"), false) + return executableJar(raw) || + zipHas(raw, zipEntries{{ + name: []byte("META-INF/MANIFEST.MF"), + }, { + name: []byte("META-INF/"), + }}, 1) } -func zipContains(raw, sig []byte, msoCheck bool) bool { - b := readBuf(raw) - pk := []byte("PK\003\004") - if len(b) < 0x1E { - return false - } +// KMZ matches a zipped KML file, which is "doc.kml" by convention. +func KMZ(raw []byte, _ uint32) bool { + return zipHas(raw, zipEntries{{ + name: []byte("doc.kml"), + }}, 100) +} - if !b.advance(0x1E) { +// An executable Jar has a 0xCAFE flag enabled in the first zip entry. +// The rule from file/file is: +// >(26.s+30) leshort 0xcafe Java archive data (JAR) +func executableJar(b scan.Bytes) bool { + b.Advance(0x1A) + offset, ok := b.Uint16() + if !ok { return false } - if bytes.HasPrefix(b, sig) { - return true - } + b.Advance(int(offset) + 2) - if msoCheck { - skipFiles := [][]byte{ - []byte("[Content_Types].xml"), - []byte("_rels/.rels"), - []byte("docProps"), - []byte("customXml"), - []byte("[trash]"), - } + cafe, ok := b.Uint16() + return ok && cafe == 0xCAFE +} - hasSkipFile := false - for _, sf := range skipFiles { - if bytes.HasPrefix(b, sf) { - hasSkipFile = true - break - } +// zipIterator iterates over a zip file returning the name of the zip entries +// in that file. +type zipIterator struct { + b scan.Bytes +} + +type zipEntries []struct { + name []byte + dir bool // dir means checking just the prefix of the entry, not the whole path +} + +func (z zipEntries) match(file []byte) bool { + for i := range z { + if z[i].dir && bytes.HasPrefix(file, z[i].name) { + return true } - if !hasSkipFile { - return false + if bytes.Equal(file, z[i].name) { + return true } } + return false +} - searchOffset := binary.LittleEndian.Uint32(raw[18:]) + 49 - if !b.advance(int(searchOffset)) { - return false +func zipHas(raw scan.Bytes, searchFor zipEntries, stopAfter int) bool { + iter := zipIterator{raw} + for i := 0; i < stopAfter; i++ { + f := iter.next() + if len(f) == 0 { + break + } + if searchFor.match(f) { + return true + } } - nextHeader := bytes.Index(raw[searchOffset:], pk) - if !b.advance(nextHeader) { - return false - } - if bytes.HasPrefix(b, sig) { - return true - } + return false +} - for i := 0; i < 4; i++ { - if !b.advance(0x1A) { - return false - } - nextHeader = bytes.Index(b, pk) - if nextHeader == -1 { - return false +// msoxml behaves like zipHas, but it puts restrictions on what the first zip +// entry can be. +func msoxml(raw scan.Bytes, searchFor zipEntries, stopAfter int) bool { + iter := zipIterator{raw} + for i := 0; i < stopAfter; i++ { + f := iter.next() + if len(f) == 0 { + break } - if !b.advance(nextHeader + 0x1E) { - return false - } - if bytes.HasPrefix(b, sig) { + if searchFor.match(f) { return true } + // If the first is not one of the next usually expected entries, + // then abort this check. + if i == 0 { + if !bytes.Equal(f, []byte("[Content_Types].xml")) && // this is a file + !bytes.HasPrefix(f, []byte("_rels/")) && // these are directories + !bytes.HasPrefix(f, []byte("docProps/")) && + !bytes.HasPrefix(f, []byte("customXml/")) && + !bytes.HasPrefix(f, []byte("[trash]/")) { + return false + } + } } + return false } -// APK matches an Android Package Archive. -// The source of signatures is https://github.com/file/file/blob/1778642b8ba3d947a779a36fcd81f8e807220a19/magic/Magdir/archive#L1820-L1887 -func APK(raw []byte, _ uint32) bool { - apkSignatures := [][]byte{ - []byte("AndroidManifest.xml"), - []byte("META-INF/com/android/build/gradle/app-metadata.properties"), - []byte("classes.dex"), - []byte("resources.arsc"), - []byte("res/drawable"), +// next extracts the name of the next zip entry. +func (i *zipIterator) next() []byte { + pk := []byte("PK\003\004") + + n := bytes.Index(i.b, pk) + if n == -1 { + return nil } - for _, sig := range apkSignatures { - if zipContains(raw, sig, false) { - return true - } + i.b.Advance(n) + if !i.b.Advance(0x1A) { + return nil } + l, ok := i.b.Uint16() + if !ok { + return nil + } + if !i.b.Advance(0x02) { + return nil + } + if len(i.b) < int(l) { + return nil + } + return i.b[:l] +} - return false +// APK matches an Android Package Archive. +// The source of signatures is https://github.com/file/file/blob/1778642b8ba3d947a779a36fcd81f8e807220a19/magic/Magdir/archive#L1820-L1887 +func APK(raw []byte, _ uint32) bool { + return zipHas(raw, zipEntries{{ + name: []byte("AndroidManifest.xml"), + }, { + name: []byte("META-INF/com/android/build/gradle/app-metadata.properties"), + }, { + name: []byte("classes.dex"), + }, { + name: []byte("resources.arsc"), + }, { + name: []byte("res/drawable"), + }}, 100) } diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/markup/markup.go b/vendor/github.com/gabriel-vasile/mimetype/internal/markup/markup.go new file mode 100644 index 0000000000..b9abc6dab1 --- /dev/null +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/markup/markup.go @@ -0,0 +1,105 @@ +// Package markup implements functions for extracting info from +// HTML and XML documents. +package markup + +import ( + "bytes" + + "github.com/gabriel-vasile/mimetype/internal/scan" +) + +// GetAnAttribute assumes we passed over an SGML tag and extracts first +// attribute and its value. +// +// Initially, this code existed inside charset/charset.go, because it was part of +// implementing the https://html.spec.whatwg.org/multipage/parsing.html#prescan-a-byte-stream-to-determine-its-encoding +// algorithm. But because extracting an attribute from a tag is the same for +// both HTML and XML, then the code was moved here. +func GetAnAttribute(s *scan.Bytes) (name, val []byte, hasMore bool) { + for scan.ByteIsWS(s.Peek()) || s.Peek() == '/' { + s.Advance(1) + } + if s.Peek() == '>' { + return nil, nil, false + } + origS, end := *s, 0 + // step 4 and 5 + for { + // bap means byte at position in the specification. + bap := s.Pop() + if bap == 0 { + return nil, nil, false + } + if bap == '=' && end > 0 { + val, hasMore := getAValue(s) + return origS[:end], val, hasMore + } else if scan.ByteIsWS(bap) { + for scan.ByteIsWS(s.Peek()) { + s.Advance(1) + } + if s.Peek() != '=' { + return origS[:end], nil, true + } + s.Advance(1) + for scan.ByteIsWS(s.Peek()) { + s.Advance(1) + } + val, hasMore := getAValue(s) + return origS[:end], val, hasMore + } else if bap == '/' || bap == '>' { + return origS[:end], nil, false + } else { // for any ASCII, non-ASCII, just advance + end++ + } + } +} + +func getAValue(s *scan.Bytes) (_ []byte, hasMore bool) { + for scan.ByteIsWS(s.Peek()) { + s.Advance(1) + } + origS, end := *s, 0 + bap := s.Pop() + if bap == 0 { + return nil, false + } + end++ + // Step 10 + switch bap { + case '"', '\'': + val := s.PopUntil(bap) + if s.Pop() != bap { + return nil, false + } + return val, s.Peek() != 0 && s.Peek() != '>' + case '>': + return nil, false + } + + // Step 11 + for { + bap = s.Pop() + if bap == 0 { + return nil, false + } + switch { + case scan.ByteIsWS(bap): + return origS[:end], true + case bap == '>': + return origS[:end], false + default: + end++ + } + } +} + +func SkipAComment(s *scan.Bytes) (skipped bool) { + if bytes.HasPrefix(*s, []byte("")); i != -1 { + s.Advance(i + 2 + 3) // 2 comes from len(). + return true + } + } + return false +} diff --git a/vendor/github.com/gabriel-vasile/mimetype/internal/scan/bytes.go b/vendor/github.com/gabriel-vasile/mimetype/internal/scan/bytes.go new file mode 100644 index 0000000000..b19a949262 --- /dev/null +++ b/vendor/github.com/gabriel-vasile/mimetype/internal/scan/bytes.go @@ -0,0 +1,262 @@ +// Package scan has functions for scanning byte slices. +package scan + +import ( + "bytes" + "encoding/binary" +) + +// Bytes is a byte slice with helper methods for easier scanning. +type Bytes []byte + +func (b *Bytes) Advance(n int) bool { + if n < 0 || len(*b) < n { + return false + } + *b = (*b)[n:] + return true +} + +// TrimLWS trims whitespace from beginning of the bytes. +func (b *Bytes) TrimLWS() { + firstNonWS := 0 + for ; firstNonWS < len(*b) && ByteIsWS((*b)[firstNonWS]); firstNonWS++ { + } + + *b = (*b)[firstNonWS:] +} + +// TrimRWS trims whitespace from the end of the bytes. +func (b *Bytes) TrimRWS() { + lb := len(*b) + for lb > 0 && ByteIsWS((*b)[lb-1]) { + *b = (*b)[:lb-1] + lb-- + } +} + +// Peek one byte from b or 0x00 if b is empty. +func (b *Bytes) Peek() byte { + if len(*b) > 0 { + return (*b)[0] + } + return 0 +} + +// Pop one byte from b or 0x00 if b is empty. +func (b *Bytes) Pop() byte { + if len(*b) > 0 { + ret := (*b)[0] + *b = (*b)[1:] + return ret + } + return 0 +} + +// PopN pops n bytes from b or nil if b is empty. +func (b *Bytes) PopN(n int) []byte { + if len(*b) >= n { + ret := (*b)[:n] + *b = (*b)[n:] + return ret + } + return nil +} + +// PopUntil will advance b until, but not including, the first occurence of stopAt +// character. If no occurence is found, then it will advance until the end of b. +// The returned Bytes is a slice of all the bytes that we're advanced over. +func (b *Bytes) PopUntil(stopAt ...byte) Bytes { + if len(*b) == 0 { + return Bytes{} + } + i := bytes.IndexAny(*b, string(stopAt)) + if i == -1 { + i = len(*b) + } + + prefix := (*b)[:i] + *b = (*b)[i:] + return Bytes(prefix) +} + +// ReadSlice is the same as PopUntil, but the returned value includes stopAt as well. +func (b *Bytes) ReadSlice(stopAt byte) Bytes { + if len(*b) == 0 { + return Bytes{} + } + i := bytes.IndexByte(*b, stopAt) + if i == -1 { + i = len(*b) + } else { + i++ + } + + prefix := (*b)[:i] + *b = (*b)[i:] + return Bytes(prefix) +} + +// Line returns the first line from b and advances b with the length of the +// line. One new line character is trimmed after the line if it exists. +func (b *Bytes) Line() Bytes { + line := b.PopUntil('\n') + lline := len(line) + if lline > 0 && line[lline-1] == '\r' { + line = line[:lline-1] + } + b.Advance(1) + return line +} + +// DropLastLine drops the last incomplete line from b. +// +// mimetype limits itself to ReadLimit bytes when performing a detection. +// This means, for file formats like CSV for NDJSON, the last line of the input +// can be an incomplete line. +// If b length is less than readLimit, it means we received an incomplete file +// and proceed with dropping the last line. +func (b *Bytes) DropLastLine(readLimit uint32) { + if readLimit == 0 || uint32(len(*b)) < readLimit { + return + } + + for i := len(*b) - 1; i > 0; i-- { + if (*b)[i] == '\n' { + *b = (*b)[:i] + return + } + } +} + +func (b *Bytes) Uint16() (uint16, bool) { + if len(*b) < 2 { + return 0, false + } + v := binary.LittleEndian.Uint16(*b) + *b = (*b)[2:] + return v, true +} + +type Flags int + +const ( + // CompactWS will make one whitespace from pattern to match one or more spaces from input. + CompactWS Flags = 1 << iota + // IgnoreCase will match lower case from pattern with lower case from input. + // IgnoreCase will match upper case from pattern with both lower and upper case from input. + // This flag is not really well named, + IgnoreCase + // FullWord ensures the input ends with a full word (it's followed by spaces.) + FullWord +) + +// Search for occurences of pattern p inside b at any index. +// It returns the index where p was found in b and how many bytes were needed +// for matching the pattern. +func (b Bytes) Search(p []byte, flags Flags) (i int, l int) { + lb, lp := len(b), len(p) + if lp == 0 { + return 0, 0 + } + if lb == 0 { + return -1, 0 + } + if flags == 0 { + if i = bytes.Index(b, p); i == -1 { + return -1, 0 + } else { + return i, lp + } + } + + for i := range b { + if lb-i < lp { + return -1, 0 + } + if l = b[i:].Match(p, flags); l != -1 { + return i, l + } + } + + return -1, 0 +} + +// Match returns how many bytes were needed to match pattern p. +// It returns -1 if p does not match b. +func (b Bytes) Match(p []byte, flags Flags) int { + l := len(b) + if len(p) == 0 { + return 0 + } + if l == 0 { + return -1 + } + // If no flags, or scanning for full word at the end of pattern then + // do a fast HasPrefix check. + // For other flags it's not possible to use HasPrefix. + if flags == 0 || flags&FullWord > 0 { + if bytes.HasPrefix(b, p) { + b = b[len(p):] + p = p[len(p):] + goto out + } + return -1 + } + for len(b) > 0 { + // If we finished all we were looking for from p. + if len(p) == 0 { + goto out + } + if flags&IgnoreCase > 0 && isUpper(p[0]) { + if upper(b[0]) != p[0] { + return -1 + } + b, p = b[1:], p[1:] + } else if flags&CompactWS > 0 && ByteIsWS(p[0]) { + p = p[1:] + if !ByteIsWS(b[0]) { + return -1 + } + b = b[1:] + if !ByteIsWS(p[0]) { + b.TrimLWS() + } + } else { + if b[0] != p[0] { + return -1 + } + b, p = b[1:], p[1:] + } + } +out: + // If p still has leftover characters, it means it didn't fully match b. + if len(p) > 0 { + return -1 + } + if flags&FullWord > 0 { + if len(b) > 0 && !ByteIsWS(b[0]) { + return -1 + } + } + return l - len(b) +} + +func isUpper(c byte) bool { + return c >= 'A' && c <= 'Z' +} +func upper(c byte) byte { + if c >= 'a' && c <= 'z' { + return c - ('a' - 'A') + } + return c +} + +func ByteIsWS(b byte) bool { + return b == '\t' || b == '\n' || b == '\x0c' || b == '\r' || b == ' ' +} + +var ( + ASCIISpaces = []byte{' ', '\r', '\n', '\x0c', '\t'} + ASCIIDigits = []byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} +) diff --git a/vendor/github.com/gabriel-vasile/mimetype/mime.go b/vendor/github.com/gabriel-vasile/mimetype/mime.go index 62cb15f593..ec2bc5bf07 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/mime.go +++ b/vendor/github.com/gabriel-vasile/mimetype/mime.go @@ -2,6 +2,7 @@ package mimetype import ( "mime" + "strings" "github.com/gabriel-vasile/mimetype/internal/charset" "github.com/gabriel-vasile/mimetype/internal/magic" @@ -103,15 +104,17 @@ func (m *MIME) match(in []byte, readLimit uint32) *MIME { "text/html": charset.FromHTML, "text/xml": charset.FromXML, } - // ps holds optional MIME parameters. - ps := map[string]string{} + charset := "" if f, ok := needsCharset[m.mime]; ok { - if cset := f(in); cset != "" { - ps["charset"] = cset - } + // The charset comes from BOM, from HTML headers, from XML headers. + // Limit the number of bytes searched for to 1024. + charset = f(in[:min(len(in), 1024)]) + } + if m == root || charset == "" { + return m } - return m.cloneHierarchy(ps) + return m.cloneHierarchy(charset) } // flatten transforms an hierarchy of MIMEs into a slice of MIMEs. @@ -124,11 +127,32 @@ func (m *MIME) flatten() []*MIME { return out } +// hierarchy returns an easy to read list of ancestors for m. +// For example, application/json would return json>txt>root. +func (m *MIME) hierarchy() string { + h := "" + for m := m; m != nil; m = m.Parent() { + e := strings.TrimPrefix(m.Extension(), ".") + if e == "" { + // There are some MIME without extensions. When generating the hierarchy, + // it would be confusing to use empty string as extension. + // Use the subtype instead; ex: application/x-executable -> x-executable. + e = strings.Split(m.String(), "/")[1] + if m.Is("application/octet-stream") { + // for octet-stream use root, because it's short and used in many places + e = "root" + } + } + h += ">" + e + } + return strings.TrimPrefix(h, ">") +} + // clone creates a new MIME with the provided optional MIME parameters. -func (m *MIME) clone(ps map[string]string) *MIME { +func (m *MIME) clone(charset string) *MIME { clonedMIME := m.mime - if len(ps) > 0 { - clonedMIME = mime.FormatMediaType(m.mime, ps) + if charset != "" { + clonedMIME = m.mime + "; charset=" + charset } return &MIME{ @@ -140,11 +164,11 @@ func (m *MIME) clone(ps map[string]string) *MIME { // cloneHierarchy creates a clone of m and all its ancestors. The optional MIME // parameters are set on the last child of the hierarchy. -func (m *MIME) cloneHierarchy(ps map[string]string) *MIME { - ret := m.clone(ps) +func (m *MIME) cloneHierarchy(charset string) *MIME { + ret := m.clone(charset) lastChild := ret for p := m.Parent(); p != nil; p = p.Parent() { - pClone := p.clone(nil) + pClone := p.clone("") lastChild.parent = pClone lastChild = pClone } @@ -153,7 +177,10 @@ func (m *MIME) cloneHierarchy(ps map[string]string) *MIME { } func (m *MIME) lookup(mime string) *MIME { - for _, n := range append(m.aliases, m.mime) { + if mime == m.mime { + return m + } + for _, n := range m.aliases { if n == mime { return m } diff --git a/vendor/github.com/gabriel-vasile/mimetype/mimetype.go b/vendor/github.com/gabriel-vasile/mimetype/mimetype.go index d8d512b806..792741732b 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/mimetype.go +++ b/vendor/github.com/gabriel-vasile/mimetype/mimetype.go @@ -12,7 +12,7 @@ import ( "sync/atomic" ) -var defaultLimit uint32 = 3072 +const defaultLimit uint32 = 3072 // readLimit is the maximum number of bytes from the input used when detecting. var readLimit uint32 = defaultLimit @@ -112,15 +112,18 @@ func SetLimit(limit uint32) { } // Extend adds detection for other file formats. -// It is equivalent to calling Extend() on the root mime type "application/octet-stream". +// It is equivalent to calling Extend() on the root MIME type "application/octet-stream". func Extend(detector func(raw []byte, limit uint32) bool, mime, extension string, aliases ...string) { root.Extend(detector, mime, extension, aliases...) } // Lookup finds a MIME object by its string representation. -// The representation can be the main mime type, or any of its aliases. -func Lookup(mime string) *MIME { +// The representation can be the main MIME type, or any of its aliases. +func Lookup(m string) *MIME { + // We store the MIME types without optional params, so + // perform parsing to extract the target MIME type without optional params. + m, _, _ = mime.ParseMediaType(m) mu.RLock() defer mu.RUnlock() - return root.lookup(mime) + return root.lookup(m) } diff --git a/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md b/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md index 6f45bfbb64..241a81f4af 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md +++ b/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md @@ -1,184 +1,197 @@ -## 179 Supported MIME types +## 192 Supported MIME types This file is automatically generated when running tests. Do not edit manually. -Extension | MIME type | Aliases ---------- | --------- | ------- -**n/a** | application/octet-stream | - -**.xpm** | image/x-xpixmap | - -**.7z** | application/x-7z-compressed | - -**.zip** | application/zip | application/x-zip, application/x-zip-compressed -**.xlsx** | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | - -**.docx** | application/vnd.openxmlformats-officedocument.wordprocessingml.document | - -**.pptx** | application/vnd.openxmlformats-officedocument.presentationml.presentation | - -**.epub** | application/epub+zip | - -**.apk** | application/vnd.android.package-archive | - -**.jar** | application/jar | - -**.odt** | application/vnd.oasis.opendocument.text | application/x-vnd.oasis.opendocument.text -**.ott** | application/vnd.oasis.opendocument.text-template | application/x-vnd.oasis.opendocument.text-template -**.ods** | application/vnd.oasis.opendocument.spreadsheet | application/x-vnd.oasis.opendocument.spreadsheet -**.ots** | application/vnd.oasis.opendocument.spreadsheet-template | application/x-vnd.oasis.opendocument.spreadsheet-template -**.odp** | application/vnd.oasis.opendocument.presentation | application/x-vnd.oasis.opendocument.presentation -**.otp** | application/vnd.oasis.opendocument.presentation-template | application/x-vnd.oasis.opendocument.presentation-template -**.odg** | application/vnd.oasis.opendocument.graphics | application/x-vnd.oasis.opendocument.graphics -**.otg** | application/vnd.oasis.opendocument.graphics-template | application/x-vnd.oasis.opendocument.graphics-template -**.odf** | application/vnd.oasis.opendocument.formula | application/x-vnd.oasis.opendocument.formula -**.odc** | application/vnd.oasis.opendocument.chart | application/x-vnd.oasis.opendocument.chart -**.sxc** | application/vnd.sun.xml.calc | - -**.pdf** | application/pdf | application/x-pdf -**.fdf** | application/vnd.fdf | - -**n/a** | application/x-ole-storage | - -**.msi** | application/x-ms-installer | application/x-windows-installer, application/x-msi -**.aaf** | application/octet-stream | - -**.msg** | application/vnd.ms-outlook | - -**.xls** | application/vnd.ms-excel | application/msexcel -**.pub** | application/vnd.ms-publisher | - -**.ppt** | application/vnd.ms-powerpoint | application/mspowerpoint -**.doc** | application/msword | application/vnd.ms-word -**.ps** | application/postscript | - -**.psd** | image/vnd.adobe.photoshop | image/x-psd, application/photoshop -**.p7s** | application/pkcs7-signature | - -**.ogg** | application/ogg | application/x-ogg -**.oga** | audio/ogg | - -**.ogv** | video/ogg | - -**.png** | image/png | - -**.png** | image/vnd.mozilla.apng | - -**.jpg** | image/jpeg | - -**.jxl** | image/jxl | - -**.jp2** | image/jp2 | - -**.jpf** | image/jpx | - -**.jpm** | image/jpm | video/jpm -**.jxs** | image/jxs | - -**.gif** | image/gif | - -**.webp** | image/webp | - -**.exe** | application/vnd.microsoft.portable-executable | - -**n/a** | application/x-elf | - -**n/a** | application/x-object | - -**n/a** | application/x-executable | - -**.so** | application/x-sharedlib | - -**n/a** | application/x-coredump | - -**.a** | application/x-archive | application/x-unix-archive -**.deb** | application/vnd.debian.binary-package | - -**.tar** | application/x-tar | - -**.xar** | application/x-xar | - -**.bz2** | application/x-bzip2 | - -**.fits** | application/fits | - -**.tiff** | image/tiff | - -**.bmp** | image/bmp | image/x-bmp, image/x-ms-bmp -**.ico** | image/x-icon | - -**.mp3** | audio/mpeg | audio/x-mpeg, audio/mp3 -**.flac** | audio/flac | - -**.midi** | audio/midi | audio/mid, audio/sp-midi, audio/x-mid, audio/x-midi -**.ape** | audio/ape | - -**.mpc** | audio/musepack | - -**.amr** | audio/amr | audio/amr-nb -**.wav** | audio/wav | audio/x-wav, audio/vnd.wave, audio/wave -**.aiff** | audio/aiff | audio/x-aiff -**.au** | audio/basic | - -**.mpeg** | video/mpeg | - -**.mov** | video/quicktime | - -**.mp4** | video/mp4 | - -**.avif** | image/avif | - -**.3gp** | video/3gpp | video/3gp, audio/3gpp -**.3g2** | video/3gpp2 | video/3g2, audio/3gpp2 -**.mp4** | audio/mp4 | audio/x-mp4a -**.mqv** | video/quicktime | - -**.m4a** | audio/x-m4a | - -**.m4v** | video/x-m4v | - -**.heic** | image/heic | - -**.heic** | image/heic-sequence | - -**.heif** | image/heif | - -**.heif** | image/heif-sequence | - -**.mj2** | video/mj2 | - -**.dvb** | video/vnd.dvb.file | - -**.webm** | video/webm | audio/webm -**.avi** | video/x-msvideo | video/avi, video/msvideo -**.flv** | video/x-flv | - -**.mkv** | video/x-matroska | - -**.asf** | video/x-ms-asf | video/asf, video/x-ms-wmv -**.aac** | audio/aac | - -**.voc** | audio/x-unknown | - -**.m3u** | application/vnd.apple.mpegurl | audio/mpegurl -**.rmvb** | application/vnd.rn-realmedia-vbr | - -**.gz** | application/gzip | application/x-gzip, application/x-gunzip, application/gzipped, application/gzip-compressed, application/x-gzip-compressed, gzip/document -**.class** | application/x-java-applet | - -**.swf** | application/x-shockwave-flash | - -**.crx** | application/x-chrome-extension | - -**.ttf** | font/ttf | font/sfnt, application/x-font-ttf, application/font-sfnt -**.woff** | font/woff | - -**.woff2** | font/woff2 | - -**.otf** | font/otf | - -**.ttc** | font/collection | - -**.eot** | application/vnd.ms-fontobject | - -**.wasm** | application/wasm | - -**.shx** | application/vnd.shx | - -**.shp** | application/vnd.shp | - -**.dbf** | application/x-dbf | - -**.dcm** | application/dicom | - -**.rar** | application/x-rar-compressed | application/x-rar -**.djvu** | image/vnd.djvu | - -**.mobi** | application/x-mobipocket-ebook | - -**.lit** | application/x-ms-reader | - -**.bpg** | image/bpg | - -**.cbor** | application/cbor | - -**.sqlite** | application/vnd.sqlite3 | application/x-sqlite3 -**.dwg** | image/vnd.dwg | image/x-dwg, application/acad, application/x-acad, application/autocad_dwg, application/dwg, application/x-dwg, application/x-autocad, drawing/dwg -**.nes** | application/vnd.nintendo.snes.rom | - -**.lnk** | application/x-ms-shortcut | - -**.macho** | application/x-mach-binary | - -**.qcp** | audio/qcelp | - -**.icns** | image/x-icns | - -**.hdr** | image/vnd.radiance | - -**.mrc** | application/marc | - -**.mdb** | application/x-msaccess | - -**.accdb** | application/x-msaccess | - -**.zst** | application/zstd | - -**.cab** | application/vnd.ms-cab-compressed | - -**.rpm** | application/x-rpm | - -**.xz** | application/x-xz | - -**.lz** | application/lzip | application/x-lzip -**.torrent** | application/x-bittorrent | - -**.cpio** | application/x-cpio | - -**n/a** | application/tzif | - -**.xcf** | image/x-xcf | - -**.pat** | image/x-gimp-pat | - -**.gbr** | image/x-gimp-gbr | - -**.glb** | model/gltf-binary | - -**.cab** | application/x-installshield | - -**.jxr** | image/jxr | image/vnd.ms-photo -**.parquet** | application/vnd.apache.parquet | application/x-parquet -**.txt** | text/plain | - -**.html** | text/html | - -**.svg** | image/svg+xml | - -**.xml** | text/xml | application/xml -**.rss** | application/rss+xml | text/rss -**.atom** | application/atom+xml | - -**.x3d** | model/x3d+xml | - -**.kml** | application/vnd.google-earth.kml+xml | - -**.xlf** | application/x-xliff+xml | - -**.dae** | model/vnd.collada+xml | - -**.gml** | application/gml+xml | - -**.gpx** | application/gpx+xml | - -**.tcx** | application/vnd.garmin.tcx+xml | - -**.amf** | application/x-amf | - -**.3mf** | application/vnd.ms-package.3dmanufacturing-3dmodel+xml | - -**.xfdf** | application/vnd.adobe.xfdf | - -**.owl** | application/owl+xml | - -**.php** | text/x-php | - -**.js** | text/javascript | application/x-javascript, application/javascript -**.lua** | text/x-lua | - -**.pl** | text/x-perl | - -**.py** | text/x-python | text/x-script.python, application/x-python -**.json** | application/json | - -**.geojson** | application/geo+json | - -**.har** | application/json | - -**.gltf** | model/gltf+json | - -**.ndjson** | application/x-ndjson | - -**.rtf** | text/rtf | application/rtf -**.srt** | application/x-subrip | application/x-srt, text/x-srt -**.tcl** | text/x-tcl | application/x-tcl -**.csv** | text/csv | - -**.tsv** | text/tab-separated-values | - -**.vcf** | text/vcard | - -**.ics** | text/calendar | - -**.warc** | application/warc | - -**.vtt** | text/vtt | - +Extension | MIME type
Aliases | Hierarchy +--------- | ---------------------- | --------- +**n/a** | **application/octet-stream** | root +**.xpm** | **image/x-xpixmap** | xpm>root +**.7z** | **application/x-7z-compressed** | 7z>root +**.zip** | **application/zip**
application/x-zip, application/x-zip-compressed | zip>root +**.docx** | **application/vnd.openxmlformats-officedocument.wordprocessingml.document** | docx>zip>root +**.pptx** | **application/vnd.openxmlformats-officedocument.presentationml.presentation** | pptx>zip>root +**.xlsx** | **application/vnd.openxmlformats-officedocument.spreadsheetml.sheet** | xlsx>zip>root +**.epub** | **application/epub+zip** | epub>zip>root +**.apk** | **application/vnd.android.package-archive** | apk>zip>root +**.jar** | **application/java-archive**
application/jar, application/jar-archive, application/x-java-archive | jar>zip>root +**.odt** | **application/vnd.oasis.opendocument.text**
application/x-vnd.oasis.opendocument.text | odt>zip>root +**.ott** | **application/vnd.oasis.opendocument.text-template**
application/x-vnd.oasis.opendocument.text-template | ott>odt>zip>root +**.ods** | **application/vnd.oasis.opendocument.spreadsheet**
application/x-vnd.oasis.opendocument.spreadsheet | ods>zip>root +**.ots** | **application/vnd.oasis.opendocument.spreadsheet-template**
application/x-vnd.oasis.opendocument.spreadsheet-template | ots>ods>zip>root +**.odp** | **application/vnd.oasis.opendocument.presentation**
application/x-vnd.oasis.opendocument.presentation | odp>zip>root +**.otp** | **application/vnd.oasis.opendocument.presentation-template**
application/x-vnd.oasis.opendocument.presentation-template | otp>odp>zip>root +**.odg** | **application/vnd.oasis.opendocument.graphics**
application/x-vnd.oasis.opendocument.graphics | odg>zip>root +**.otg** | **application/vnd.oasis.opendocument.graphics-template**
application/x-vnd.oasis.opendocument.graphics-template | otg>odg>zip>root +**.odf** | **application/vnd.oasis.opendocument.formula**
application/x-vnd.oasis.opendocument.formula | odf>zip>root +**.odc** | **application/vnd.oasis.opendocument.chart**
application/x-vnd.oasis.opendocument.chart | odc>zip>root +**.sxc** | **application/vnd.sun.xml.calc** | sxc>zip>root +**.kmz** | **application/vnd.google-earth.kmz** | kmz>zip>root +**.vsdx** | **application/vnd.ms-visio.drawing.main+xml** | vsdx>zip>root +**.pdf** | **application/pdf**
application/x-pdf | pdf>root +**.fdf** | **application/vnd.fdf** | fdf>root +**n/a** | **application/x-ole-storage** | x-ole-storage>root +**.msi** | **application/x-ms-installer**
application/x-windows-installer, application/x-msi | msi>x-ole-storage>root +**.msg** | **application/vnd.ms-outlook** | msg>x-ole-storage>root +**.xls** | **application/vnd.ms-excel**
application/msexcel | xls>x-ole-storage>root +**.pub** | **application/vnd.ms-publisher** | pub>x-ole-storage>root +**.ppt** | **application/vnd.ms-powerpoint**
application/mspowerpoint | ppt>x-ole-storage>root +**.doc** | **application/msword**
application/vnd.ms-word | doc>x-ole-storage>root +**.ps** | **application/postscript** | ps>root +**.psd** | **image/vnd.adobe.photoshop**
image/x-psd, application/photoshop | psd>root +**.p7s** | **application/pkcs7-signature** | p7s>root +**.ogg** | **application/ogg**
application/x-ogg | ogg>root +**.oga** | **audio/ogg** | oga>ogg>root +**.ogv** | **video/ogg** | ogv>ogg>root +**.png** | **image/png** | png>root +**.png** | **image/vnd.mozilla.apng** | png>png>root +**.jpg** | **image/jpeg** | jpg>root +**.jxl** | **image/jxl** | jxl>root +**.jp2** | **image/jp2** | jp2>root +**.jpf** | **image/jpx** | jpf>root +**.jpm** | **image/jpm**
video/jpm | jpm>root +**.jxs** | **image/jxs** | jxs>root +**.gif** | **image/gif** | gif>root +**.webp** | **image/webp** | webp>root +**.exe** | **application/vnd.microsoft.portable-executable** | exe>root +**n/a** | **application/x-elf** | x-elf>root +**n/a** | **application/x-object** | x-object>x-elf>root +**n/a** | **application/x-executable** | x-executable>x-elf>root +**.so** | **application/x-sharedlib** | so>x-elf>root +**n/a** | **application/x-coredump** | x-coredump>x-elf>root +**.a** | **application/x-archive**
application/x-unix-archive | a>root +**.deb** | **application/vnd.debian.binary-package** | deb>a>root +**.tar** | **application/x-tar** | tar>root +**.xar** | **application/x-xar** | xar>root +**.bz2** | **application/x-bzip2** | bz2>root +**.fits** | **application/fits**
image/fits | fits>root +**.tiff** | **image/tiff** | tiff>root +**.bmp** | **image/bmp**
image/x-bmp, image/x-ms-bmp | bmp>root +**.123** | **application/vnd.lotus-1-2-3** | 123>root +**.ico** | **image/x-icon** | ico>root +**.mp3** | **audio/mpeg**
audio/x-mpeg, audio/mp3 | mp3>root +**.flac** | **audio/flac** | flac>root +**.midi** | **audio/midi**
audio/mid, audio/sp-midi, audio/x-mid, audio/x-midi | midi>root +**.ape** | **audio/ape** | ape>root +**.mpc** | **audio/musepack** | mpc>root +**.amr** | **audio/amr**
audio/amr-nb | amr>root +**.wav** | **audio/wav**
audio/x-wav, audio/vnd.wave, audio/wave | wav>root +**.aiff** | **audio/aiff**
audio/x-aiff | aiff>root +**.au** | **audio/basic** | au>root +**.mpeg** | **video/mpeg** | mpeg>root +**.mov** | **video/quicktime** | mov>root +**.mp4** | **video/mp4** | mp4>root +**.avif** | **image/avif** | avif>mp4>root +**.3gp** | **video/3gpp**
video/3gp, audio/3gpp | 3gp>mp4>root +**.3g2** | **video/3gpp2**
video/3g2, audio/3gpp2 | 3g2>mp4>root +**.mp4** | **audio/mp4**
audio/x-mp4a | mp4>mp4>root +**.mqv** | **video/quicktime** | mqv>mp4>root +**.m4a** | **audio/x-m4a** | m4a>mp4>root +**.m4v** | **video/x-m4v** | m4v>mp4>root +**.heic** | **image/heic** | heic>mp4>root +**.heic** | **image/heic-sequence** | heic>mp4>root +**.heif** | **image/heif** | heif>mp4>root +**.heif** | **image/heif-sequence** | heif>mp4>root +**.mj2** | **video/mj2** | mj2>mp4>root +**.dvb** | **video/vnd.dvb.file** | dvb>mp4>root +**.webm** | **video/webm**
audio/webm | webm>root +**.avi** | **video/x-msvideo**
video/avi, video/msvideo | avi>root +**.flv** | **video/x-flv** | flv>root +**.mkv** | **video/x-matroska** | mkv>root +**.asf** | **video/x-ms-asf**
video/asf, video/x-ms-wmv | asf>root +**.aac** | **audio/aac** | aac>root +**.voc** | **audio/x-unknown** | voc>root +**.m3u** | **application/vnd.apple.mpegurl**
audio/mpegurl | m3u>root +**.rmvb** | **application/vnd.rn-realmedia-vbr** | rmvb>root +**.gz** | **application/gzip**
application/x-gzip, application/x-gunzip, application/gzipped, application/gzip-compressed, application/x-gzip-compressed, gzip/document | gz>root +**.class** | **application/x-java-applet** | class>root +**.swf** | **application/x-shockwave-flash** | swf>root +**.crx** | **application/x-chrome-extension** | crx>root +**.ttf** | **font/ttf**
font/sfnt, application/x-font-ttf, application/font-sfnt | ttf>root +**.woff** | **font/woff** | woff>root +**.woff2** | **font/woff2** | woff2>root +**.otf** | **font/otf** | otf>root +**.ttc** | **font/collection** | ttc>root +**.eot** | **application/vnd.ms-fontobject** | eot>root +**.wasm** | **application/wasm** | wasm>root +**.shx** | **application/vnd.shx** | shx>root +**.shp** | **application/vnd.shp** | shp>shx>root +**.dbf** | **application/x-dbf** | dbf>root +**.dcm** | **application/dicom** | dcm>root +**.rar** | **application/x-rar-compressed**
application/x-rar | rar>root +**.djvu** | **image/vnd.djvu** | djvu>root +**.mobi** | **application/x-mobipocket-ebook** | mobi>root +**.lit** | **application/x-ms-reader** | lit>root +**.bpg** | **image/bpg** | bpg>root +**.cbor** | **application/cbor** | cbor>root +**.sqlite** | **application/vnd.sqlite3**
application/x-sqlite3 | sqlite>root +**.dwg** | **image/vnd.dwg**
image/x-dwg, application/acad, application/x-acad, application/autocad_dwg, application/dwg, application/x-dwg, application/x-autocad, drawing/dwg | dwg>root +**.nes** | **application/vnd.nintendo.snes.rom** | nes>root +**.lnk** | **application/x-ms-shortcut** | lnk>root +**.macho** | **application/x-mach-binary** | macho>root +**.qcp** | **audio/qcelp** | qcp>root +**.icns** | **image/x-icns** | icns>root +**.hdr** | **image/vnd.radiance** | hdr>root +**.mrc** | **application/marc** | mrc>root +**.mdb** | **application/x-msaccess** | mdb>root +**.accdb** | **application/x-msaccess** | accdb>root +**.zst** | **application/zstd** | zst>root +**.cab** | **application/vnd.ms-cab-compressed** | cab>root +**.rpm** | **application/x-rpm** | rpm>root +**.xz** | **application/x-xz** | xz>root +**.lz** | **application/lzip**
application/x-lzip | lz>root +**.torrent** | **application/x-bittorrent** | torrent>root +**.cpio** | **application/x-cpio** | cpio>root +**n/a** | **application/tzif** | tzif>root +**.xcf** | **image/x-xcf** | xcf>root +**.pat** | **image/x-gimp-pat** | pat>root +**.gbr** | **image/x-gimp-gbr** | gbr>root +**.glb** | **model/gltf-binary** | glb>root +**.cab** | **application/x-installshield** | cab>root +**.jxr** | **image/jxr**
image/vnd.ms-photo | jxr>root +**.parquet** | **application/vnd.apache.parquet**
application/x-parquet | parquet>root +**.one** | **application/onenote** | one>root +**.chm** | **application/vnd.ms-htmlhelp** | chm>root +**.wpd** | **application/vnd.wordperfect** | wpd>root +**.dxf** | **image/vnd.dxf** | dxf>root +**.txt** | **text/plain** | txt>root +**.svg** | **image/svg+xml** | svg>txt>root +**.html** | **text/html** | html>txt>root +**.xml** | **text/xml**
application/xml | xml>txt>root +**.rss** | **application/rss+xml**
text/rss | rss>xml>txt>root +**.atom** | **application/atom+xml** | atom>xml>txt>root +**.x3d** | **model/x3d+xml** | x3d>xml>txt>root +**.kml** | **application/vnd.google-earth.kml+xml** | kml>xml>txt>root +**.xlf** | **application/x-xliff+xml** | xlf>xml>txt>root +**.dae** | **model/vnd.collada+xml** | dae>xml>txt>root +**.gml** | **application/gml+xml** | gml>xml>txt>root +**.gpx** | **application/gpx+xml** | gpx>xml>txt>root +**.tcx** | **application/vnd.garmin.tcx+xml** | tcx>xml>txt>root +**.amf** | **application/x-amf** | amf>xml>txt>root +**.3mf** | **application/vnd.ms-package.3dmanufacturing-3dmodel+xml** | 3mf>xml>txt>root +**.xfdf** | **application/vnd.adobe.xfdf** | xfdf>xml>txt>root +**.owl** | **application/owl+xml** | owl>xml>txt>root +**.html** | **application/xhtml+xml** | html>xml>txt>root +**.php** | **text/x-php** | php>txt>root +**.js** | **text/javascript**
application/x-javascript, application/javascript | js>txt>root +**.lua** | **text/x-lua** | lua>txt>root +**.pl** | **text/x-perl** | pl>txt>root +**.py** | **text/x-python**
text/x-script.python, application/x-python | py>txt>root +**.rb** | **text/x-ruby**
application/x-ruby | rb>txt>root +**.json** | **application/json** | json>txt>root +**.geojson** | **application/geo+json** | geojson>json>txt>root +**.har** | **application/json** | har>json>txt>root +**.gltf** | **model/gltf+json** | gltf>json>txt>root +**.ndjson** | **application/x-ndjson** | ndjson>txt>root +**.rtf** | **text/rtf**
application/rtf | rtf>txt>root +**.srt** | **application/x-subrip**
application/x-srt, text/x-srt | srt>txt>root +**.tcl** | **text/x-tcl**
application/x-tcl | tcl>txt>root +**.csv** | **text/csv** | csv>txt>root +**.tsv** | **text/tab-separated-values** | tsv>txt>root +**.vcf** | **text/vcard** | vcf>txt>root +**.ics** | **text/calendar** | ics>txt>root +**.warc** | **application/warc** | warc>txt>root +**.vtt** | **text/vtt** | vtt>txt>root +**.sh** | **text/x-shellscript**
text/x-sh, application/x-shellscript, application/x-sh | sh>txt>root +**.pbm** | **image/x-portable-bitmap** | pbm>txt>root +**.pgm** | **image/x-portable-graymap** | pgm>txt>root +**.ppm** | **image/x-portable-pixmap** | ppm>txt>root +**.pam** | **image/x-portable-arbitrarymap** | pam>txt>root diff --git a/vendor/github.com/gabriel-vasile/mimetype/tree.go b/vendor/github.com/gabriel-vasile/mimetype/tree.go index 63a2093a4b..21b70d5c91 100644 --- a/vendor/github.com/gabriel-vasile/mimetype/tree.go +++ b/vendor/github.com/gabriel-vasile/mimetype/tree.go @@ -18,12 +18,13 @@ import ( var root = newMIME("application/octet-stream", "", func([]byte, uint32) bool { return true }, xpm, sevenZ, zip, pdf, fdf, ole, ps, psd, p7s, ogg, png, jpg, jxl, jp2, jpx, - jpm, jxs, gif, webp, exe, elf, ar, tar, xar, bz2, fits, tiff, bmp, ico, mp3, - flac, midi, ape, musePack, amr, wav, aiff, au, mpeg, quickTime, mp4, webM, + jpm, jxs, gif, webp, exe, elf, ar, tar, xar, bz2, fits, tiff, bmp, lotus, ico, + mp3, flac, midi, ape, musePack, amr, wav, aiff, au, mpeg, quickTime, mp4, webM, avi, flv, mkv, asf, aac, voc, m3u, rmvb, gzip, class, swf, crx, ttf, woff, woff2, otf, ttc, eot, wasm, shx, dbf, dcm, rar, djvu, mobi, lit, bpg, cbor, sqlite3, dwg, nes, lnk, macho, qcp, icns, hdr, mrc, mdb, accdb, zstd, cab, rpm, xz, lzip, torrent, cpio, tzif, xcf, pat, gbr, glb, cabIS, jxr, parquet, + oneNote, chm, wpd, dxf, // Keep text last because it is the slowest check. text, ) @@ -48,24 +49,25 @@ var ( // This means APK should be a child of JAR detector, but in practice, // the decisive signature for JAR might be located at the end of the file // and not reachable because of library readLimit. - zip = newMIME("application/zip", ".zip", magic.Zip, xlsx, docx, pptx, epub, apk, jar, odt, ods, odp, odg, odf, odc, sxc). + zip = newMIME("application/zip", ".zip", magic.Zip, docx, pptx, xlsx, epub, apk, jar, odt, ods, odp, odg, odf, odc, sxc, kmz, visio). alias("application/x-zip", "application/x-zip-compressed") tar = newMIME("application/x-tar", ".tar", magic.Tar) xar = newMIME("application/x-xar", ".xar", magic.Xar) bz2 = newMIME("application/x-bzip2", ".bz2", magic.Bz2) - pdf = newMIME("application/pdf", ".pdf", magic.Pdf). + pdf = newMIME("application/pdf", ".pdf", magic.PDF). alias("application/x-pdf") - fdf = newMIME("application/vnd.fdf", ".fdf", magic.Fdf) - xlsx = newMIME("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xlsx", magic.Xlsx) - docx = newMIME("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx", magic.Docx) - pptx = newMIME("application/vnd.openxmlformats-officedocument.presentationml.presentation", ".pptx", magic.Pptx) - epub = newMIME("application/epub+zip", ".epub", magic.Epub) - jar = newMIME("application/jar", ".jar", magic.Jar) - apk = newMIME("application/vnd.android.package-archive", ".apk", magic.APK) - ole = newMIME("application/x-ole-storage", "", magic.Ole, msi, aaf, msg, xls, pub, ppt, doc) - msi = newMIME("application/x-ms-installer", ".msi", magic.Msi). + fdf = newMIME("application/vnd.fdf", ".fdf", magic.Fdf) + xlsx = newMIME("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xlsx", magic.Xlsx) + docx = newMIME("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx", magic.Docx) + pptx = newMIME("application/vnd.openxmlformats-officedocument.presentationml.presentation", ".pptx", magic.Pptx) + visio = newMIME("application/vnd.ms-visio.drawing.main+xml", ".vsdx", magic.Visio) + epub = newMIME("application/epub+zip", ".epub", magic.Epub) + jar = newMIME("application/java-archive", ".jar", magic.Jar). + alias("application/jar", "application/jar-archive", "application/x-java-archive") + apk = newMIME("application/vnd.android.package-archive", ".apk", magic.APK) + ole = newMIME("application/x-ole-storage", "", magic.Ole, msi, msg, xls, pub, ppt, doc) + msi = newMIME("application/x-ms-installer", ".msi", magic.Msi). alias("application/x-windows-installer", "application/x-msi") - aaf = newMIME("application/octet-stream", ".aaf", magic.Aaf) doc = newMIME("application/msword", ".doc", magic.Doc). alias("application/vnd.ms-word") ppt = newMIME("application/vnd.ms-powerpoint", ".ppt", magic.Ppt). @@ -75,18 +77,19 @@ var ( alias("application/msexcel") msg = newMIME("application/vnd.ms-outlook", ".msg", magic.Msg) ps = newMIME("application/postscript", ".ps", magic.Ps) - fits = newMIME("application/fits", ".fits", magic.Fits) + fits = newMIME("application/fits", ".fits", magic.Fits).alias("image/fits") ogg = newMIME("application/ogg", ".ogg", magic.Ogg, oggAudio, oggVideo). alias("application/x-ogg") oggAudio = newMIME("audio/ogg", ".oga", magic.OggAudio) oggVideo = newMIME("video/ogg", ".ogv", magic.OggVideo) - text = newMIME("text/plain", ".txt", magic.Text, html, svg, xml, php, js, lua, perl, python, json, ndJSON, rtf, srt, tcl, csv, tsv, vCard, iCalendar, warc, vtt) - xml = newMIME("text/xml", ".xml", magic.XML, rss, atom, x3d, kml, xliff, collada, gml, gpx, tcx, amf, threemf, xfdf, owl2). + text = newMIME("text/plain", ".txt", magic.Text, svg, html, xml, php, js, lua, perl, python, ruby, json, ndJSON, rtf, srt, tcl, csv, tsv, vCard, iCalendar, warc, vtt, shell, netpbm, netpgm, netppm, netpam) + xml = newMIME("text/xml", ".xml", magic.XML, rss, atom, x3d, kml, xliff, collada, gml, gpx, tcx, amf, threemf, xfdf, owl2, xhtml). alias("application/xml") + xhtml = newMIME("application/xhtml+xml", ".html", magic.XHTML) json = newMIME("application/json", ".json", magic.JSON, geoJSON, har, gltf) har = newMIME("application/json", ".har", magic.HAR) - csv = newMIME("text/csv", ".csv", magic.Csv) - tsv = newMIME("text/tab-separated-values", ".tsv", magic.Tsv) + csv = newMIME("text/csv", ".csv", magic.CSV) + tsv = newMIME("text/tab-separated-values", ".tsv", magic.TSV) geoJSON = newMIME("application/geo+json", ".geojson", magic.GeoJSON) ndJSON = newMIME("application/x-ndjson", ".ndjson", magic.NdJSON) html = newMIME("text/html", ".html", magic.HTML) @@ -101,6 +104,10 @@ var ( perl = newMIME("text/x-perl", ".pl", magic.Perl) python = newMIME("text/x-python", ".py", magic.Python). alias("text/x-script.python", "application/x-python") + ruby = newMIME("text/x-ruby", ".rb", magic.Ruby). + alias("application/x-ruby") + shell = newMIME("text/x-shellscript", ".sh", magic.Shell). + alias("text/x-sh", "application/x-shellscript", "application/x-sh") tcl = newMIME("text/x-tcl", ".tcl", magic.Tcl). alias("application/x-tcl") vCard = newMIME("text/vcard", ".vcf", magic.VCard) @@ -112,6 +119,7 @@ var ( atom = newMIME("application/atom+xml", ".atom", magic.Atom) x3d = newMIME("model/x3d+xml", ".x3d", magic.X3d) kml = newMIME("application/vnd.google-earth.kml+xml", ".kml", magic.Kml) + kmz = newMIME("application/vnd.google-earth.kmz", ".kmz", magic.KMZ) xliff = newMIME("application/x-xliff+xml", ".xlf", magic.Xliff) collada = newMIME("model/vnd.collada+xml", ".dae", magic.Collada) gml = newMIME("application/gml+xml", ".gml", magic.Gml) @@ -135,9 +143,12 @@ var ( tiff = newMIME("image/tiff", ".tiff", magic.Tiff) bmp = newMIME("image/bmp", ".bmp", magic.Bmp). alias("image/x-bmp", "image/x-ms-bmp") - ico = newMIME("image/x-icon", ".ico", magic.Ico) - icns = newMIME("image/x-icns", ".icns", magic.Icns) - psd = newMIME("image/vnd.adobe.photoshop", ".psd", magic.Psd). + // lotus check must be done before ico because some ico detection is a bit + // relaxed and some lotus files are wrongfully identified as ico otherwise. + lotus = newMIME("application/vnd.lotus-1-2-3", ".123", magic.Lotus123) + ico = newMIME("image/x-icon", ".ico", magic.Ico) + icns = newMIME("image/x-icns", ".icns", magic.Icns) + psd = newMIME("image/vnd.adobe.photoshop", ".psd", magic.Psd). alias("image/x-psd", "application/photoshop") heic = newMIME("image/heic", ".heic", magic.Heic) heicSeq = newMIME("image/heic-sequence", ".heic", magic.HeicSequence) @@ -267,5 +278,13 @@ var ( jxr = newMIME("image/jxr", ".jxr", magic.Jxr).alias("image/vnd.ms-photo") parquet = newMIME("application/vnd.apache.parquet", ".parquet", magic.Par1). alias("application/x-parquet") - cbor = newMIME("application/cbor", ".cbor", magic.CBOR) + netpbm = newMIME("image/x-portable-bitmap", ".pbm", magic.NetPBM) + netpgm = newMIME("image/x-portable-graymap", ".pgm", magic.NetPGM) + netppm = newMIME("image/x-portable-pixmap", ".ppm", magic.NetPPM) + netpam = newMIME("image/x-portable-arbitrarymap", ".pam", magic.NetPAM) + cbor = newMIME("application/cbor", ".cbor", magic.CBOR) + oneNote = newMIME("application/onenote", ".one", magic.One) + chm = newMIME("application/vnd.ms-htmlhelp", ".chm", magic.CHM) + wpd = newMIME("application/vnd.wordperfect", ".wpd", magic.WPD) + dxf = newMIME("image/vnd.dxf", ".dxf", magic.DXF) ) diff --git a/vendor/github.com/go-openapi/errors/.golangci.yml b/vendor/github.com/go-openapi/errors/.golangci.yml index ee8b9bd1f1..5609b4fea9 100644 --- a/vendor/github.com/go-openapi/errors/.golangci.yml +++ b/vendor/github.com/go-openapi/errors/.golangci.yml @@ -1,55 +1,75 @@ -linters-settings: - gocyclo: - min-complexity: 45 - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 3 - +version: "2" linters: - enable-all: true + default: all disable: - - unparam - - lll - - gochecknoinits - - gochecknoglobals + - cyclop + - depguard + - errchkjson + - errorlint + - exhaustruct + - forcetypeassert - funlen - - godox + - gochecknoglobals + - gochecknoinits - gocognit - - whitespace - - wsl - - wrapcheck - - testpackage - - nlreturn - - errorlint - - nestif - godot - - gofumpt + - godox + - gosmopolitan + - inamedparam + #- intrange # disabled while < go1.22 + - ireturn + - lll + - musttag + - nestif + - nlreturn + - noinlineerr + - nonamedreturns - paralleltest - - tparallel + - recvcheck + - testpackage - thelper - - exhaustruct + - tparallel + - unparam - varnamelen - - gci - - depguard - - errchkjson - - inamedparam - - nonamedreturns - - musttag - - ireturn - - forcetypeassert - - cyclop - # deprecated linters - #- deadcode - #- interfacer - #- scopelint - #- varcheck - #- structcheck - #- golint - #- nosnakecase - #- maligned - #- goerr113 - #- ifshort - #- gomnd - #- exhaustivestruct + - whitespace + - wrapcheck + - wsl + - wsl_v5 + settings: + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 3 + gocyclo: + min-complexity: 45 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + max-same-issues: 0 diff --git a/vendor/github.com/go-openapi/errors/README.md b/vendor/github.com/go-openapi/errors/README.md index 6d57ea55c7..d7e3a18bcf 100644 --- a/vendor/github.com/go-openapi/errors/README.md +++ b/vendor/github.com/go-openapi/errors/README.md @@ -6,3 +6,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/errors)](https://goreportcard.com/report/github.com/go-openapi/errors) Shared errors and error interface used throughout the various libraries found in the go-openapi toolkit. + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/errors/api.go b/vendor/github.com/go-openapi/errors/api.go index d6f507f42d..d39233bafe 100644 --- a/vendor/github.com/go-openapi/errors/api.go +++ b/vendor/github.com/go-openapi/errors/api.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -46,14 +35,14 @@ func (a *apiError) Code() int32 { // MarshalJSON implements the JSON encoding interface func (a apiError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": a.code, "message": a.message, }) } // New creates a new API error with a code and a message -func New(code int32, message string, args ...interface{}) Error { +func New(code int32, message string, args ...any) Error { if len(args) > 0 { return &apiError{ code: code, @@ -67,16 +56,16 @@ func New(code int32, message string, args ...interface{}) Error { } // NotFound creates a new not found error -func NotFound(message string, args ...interface{}) Error { +func NotFound(message string, args ...any) Error { if message == "" { message = "Not found" } - return New(http.StatusNotFound, fmt.Sprintf(message, args...)) + return New(http.StatusNotFound, message, args...) } // NotImplemented creates a new not implemented error func NotImplemented(message string) Error { - return New(http.StatusNotImplemented, message) + return New(http.StatusNotImplemented, "%s", message) } // MethodNotAllowedError represents an error for when the path matches but the method doesn't @@ -97,7 +86,7 @@ func (m *MethodNotAllowedError) Code() int32 { // MarshalJSON implements the JSON encoding interface func (m MethodNotAllowedError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": m.code, "message": m.message, "allowed": m.Allowed, @@ -179,7 +168,7 @@ func ServeError(rw http.ResponseWriter, r *http.Request, err error) { default: rw.WriteHeader(http.StatusInternalServerError) if r == nil || r.Method != http.MethodHead { - _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, err.Error()))) + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "%v", err))) } } } diff --git a/vendor/github.com/go-openapi/errors/auth.go b/vendor/github.com/go-openapi/errors/auth.go index 0545b501bd..08de582e5d 100644 --- a/vendor/github.com/go-openapi/errors/auth.go +++ b/vendor/github.com/go-openapi/errors/auth.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors diff --git a/vendor/github.com/go-openapi/errors/doc.go b/vendor/github.com/go-openapi/errors/doc.go index af01190ce6..b4627f30f4 100644 --- a/vendor/github.com/go-openapi/errors/doc.go +++ b/vendor/github.com/go-openapi/errors/doc.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 /* Package errors provides an Error interface and several concrete types diff --git a/vendor/github.com/go-openapi/errors/headers.go b/vendor/github.com/go-openapi/errors/headers.go index 6ea1151f41..2d837c34ac 100644 --- a/vendor/github.com/go-openapi/errors/headers.go +++ b/vendor/github.com/go-openapi/errors/headers.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -25,9 +14,9 @@ type Validation struct { //nolint: errname code int32 Name string In string - Value interface{} + Value any message string - Values []interface{} + Values []any } func (e *Validation) Error() string { @@ -41,7 +30,7 @@ func (e *Validation) Code() int32 { // MarshalJSON implements the JSON encoding interface func (e Validation) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, @@ -72,7 +61,7 @@ const ( // InvalidContentType error for an invalid content type func InvalidContentType(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } @@ -88,7 +77,7 @@ func InvalidContentType(value string, allowed []string) *Validation { // InvalidResponseFormat error for an unacceptable response format request func InvalidResponseFormat(value string, allowed []string) *Validation { - values := make([]interface{}, 0, len(allowed)) + values := make([]any, 0, len(allowed)) for _, v := range allowed { values = append(values, v) } diff --git a/vendor/github.com/go-openapi/errors/middleware.go b/vendor/github.com/go-openapi/errors/middleware.go index 67f80386a2..c434e59a6f 100644 --- a/vendor/github.com/go-openapi/errors/middleware.go +++ b/vendor/github.com/go-openapi/errors/middleware.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -35,7 +24,7 @@ func (v *APIVerificationFailed) Error() string { hasSpecMissing := len(v.MissingSpecification) > 0 if hasRegMissing { - buf.WriteString(fmt.Sprintf("missing [%s] %s registrations", strings.Join(v.MissingRegistration, ", "), v.Section)) + fmt.Fprintf(buf, "missing [%s] %s registrations", strings.Join(v.MissingRegistration, ", "), v.Section) } if hasRegMissing && hasSpecMissing { @@ -43,7 +32,7 @@ func (v *APIVerificationFailed) Error() string { } if hasSpecMissing { - buf.WriteString(fmt.Sprintf("missing from spec file [%s] %s", strings.Join(v.MissingSpecification, ", "), v.Section)) + fmt.Fprintf(buf, "missing from spec file [%s] %s", strings.Join(v.MissingSpecification, ", "), v.Section) } return buf.String() diff --git a/vendor/github.com/go-openapi/errors/parsing.go b/vendor/github.com/go-openapi/errors/parsing.go index ce1ef9cb67..ea2a7c6037 100644 --- a/vendor/github.com/go-openapi/errors/parsing.go +++ b/vendor/github.com/go-openapi/errors/parsing.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -30,6 +19,24 @@ type ParseError struct { message string } +// NewParseError creates a new parse error +func NewParseError(name, in, value string, reason error) *ParseError { + var msg string + if in == "" { + msg = fmt.Sprintf(parseErrorTemplContentNoIn, name, value, reason) + } else { + msg = fmt.Sprintf(parseErrorTemplContent, name, in, value, reason) + } + return &ParseError{ + code: http.StatusBadRequest, + Name: name, + In: in, + Value: value, + Reason: reason, + message: msg, + } +} + func (e *ParseError) Error() string { return e.message } @@ -45,7 +52,7 @@ func (e ParseError) MarshalJSON() ([]byte, error) { if e.Reason != nil { reason = e.Reason.Error() } - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": e.code, "message": e.message, "in": e.In, @@ -59,21 +66,3 @@ const ( parseErrorTemplContent = `parsing %s %s from %q failed, because %s` parseErrorTemplContentNoIn = `parsing %s from %q failed, because %s` ) - -// NewParseError creates a new parse error -func NewParseError(name, in, value string, reason error) *ParseError { - var msg string - if in == "" { - msg = fmt.Sprintf(parseErrorTemplContentNoIn, name, value, reason) - } else { - msg = fmt.Sprintf(parseErrorTemplContent, name, in, value, reason) - } - return &ParseError{ - code: http.StatusBadRequest, - Name: name, - In: in, - Value: value, - Reason: reason, - message: msg, - } -} diff --git a/vendor/github.com/go-openapi/errors/schema.go b/vendor/github.com/go-openapi/errors/schema.go index 8f3239dfd9..e59ca4f863 100644 --- a/vendor/github.com/go-openapi/errors/schema.go +++ b/vendor/github.com/go-openapi/errors/schema.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package errors @@ -130,7 +119,7 @@ func (c *CompositeError) Unwrap() []error { // MarshalJSON implements the JSON encoding interface func (c CompositeError) MarshalJSON() ([]byte, error) { - return json.Marshal(map[string]interface{}{ + return json.Marshal(map[string]any{ "code": c.code, "message": c.message, "errors": c.Errors, @@ -254,7 +243,7 @@ func InvalidTypeName(typeName string) *Validation { } // InvalidType creates an error for when the type is invalid -func InvalidType(name, in, typeName string, value interface{}) *Validation { +func InvalidType(name, in, typeName string, value any) *Validation { var message string if in != "" { @@ -302,7 +291,7 @@ func DuplicateItems(name, in string) *Validation { } // TooManyItems error for when an array contains too many items -func TooManyItems(name, in string, maximum int64, value interface{}) *Validation { +func TooManyItems(name, in string, maximum int64, value any) *Validation { msg := fmt.Sprintf(maximumItemsFail, name, in, maximum) if in == "" { msg = fmt.Sprintf(maximumItemsFailNoIn, name, maximum) @@ -318,7 +307,7 @@ func TooManyItems(name, in string, maximum int64, value interface{}) *Validation } // TooFewItems error for when an array contains too few items -func TooFewItems(name, in string, minimum int64, value interface{}) *Validation { +func TooFewItems(name, in string, minimum int64, value any) *Validation { msg := fmt.Sprintf(minItemsFail, name, in, minimum) if in == "" { msg = fmt.Sprintf(minItemsFailNoIn, name, minimum) @@ -333,7 +322,7 @@ func TooFewItems(name, in string, minimum int64, value interface{}) *Validation } // ExceedsMaximumInt error for when maximumimum validation fails -func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -358,7 +347,7 @@ func ExceedsMaximumInt(name, in string, maximum int64, exclusive bool, value int } // ExceedsMaximumUint error for when maximumimum validation fails -func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -383,7 +372,7 @@ func ExceedsMaximumUint(name, in string, maximum uint64, exclusive bool, value i } // ExceedsMaximum error for when maximumimum validation fails -func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value interface{}) *Validation { +func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := maximumIncFailNoIn @@ -408,7 +397,7 @@ func ExceedsMaximum(name, in string, maximum float64, exclusive bool, value inte } // ExceedsMinimumInt error for when minimum validation fails -func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -433,7 +422,7 @@ func ExceedsMinimumInt(name, in string, minimum int64, exclusive bool, value int } // ExceedsMinimumUint error for when minimum validation fails -func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -458,7 +447,7 @@ func ExceedsMinimumUint(name, in string, minimum uint64, exclusive bool, value i } // ExceedsMinimum error for when minimum validation fails -func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value interface{}) *Validation { +func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value any) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -483,7 +472,7 @@ func ExceedsMinimum(name, in string, minimum float64, exclusive bool, value inte } // NotMultipleOf error for when multiple of validation fails -func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { +func NotMultipleOf(name, in string, multiple, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(multipleOfFailNoIn, name, multiple) @@ -500,7 +489,7 @@ func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { } // EnumFail error for when an enum validation fails -func EnumFail(name, in string, value interface{}, values []interface{}) *Validation { +func EnumFail(name, in string, value any, values []any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(enumFailNoIn, name, values) @@ -519,7 +508,7 @@ func EnumFail(name, in string, value interface{}, values []interface{}) *Validat } // Required error for when a value is missing -func Required(name, in string, value interface{}) *Validation { +func Required(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(requiredFailNoIn, name) @@ -536,7 +525,7 @@ func Required(name, in string, value interface{}) *Validation { } // ReadOnly error for when a value is present in request -func ReadOnly(name, in string, value interface{}) *Validation { +func ReadOnly(name, in string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(readOnlyFailNoIn, name) @@ -553,7 +542,7 @@ func ReadOnly(name, in string, value interface{}) *Validation { } // TooLong error for when a string is too long -func TooLong(name, in string, maximum int64, value interface{}) *Validation { +func TooLong(name, in string, maximum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooLongMessageNoIn, name, maximum) @@ -570,7 +559,7 @@ func TooLong(name, in string, maximum int64, value interface{}) *Validation { } // TooShort error for when a string is too short -func TooShort(name, in string, minimum int64, value interface{}) *Validation { +func TooShort(name, in string, minimum int64, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooShortMessageNoIn, name, minimum) @@ -589,7 +578,7 @@ func TooShort(name, in string, minimum int64, value interface{}) *Validation { // FailedPattern error for when a string fails a regex pattern match // the pattern that is returned is the ECMA syntax version of the pattern not the golang version. -func FailedPattern(name, in, pattern string, value interface{}) *Validation { +func FailedPattern(name, in, pattern string, value any) *Validation { var msg string if in == "" { msg = fmt.Sprintf(patternFailNoIn, name, pattern) @@ -608,7 +597,7 @@ func FailedPattern(name, in, pattern string, value interface{}) *Validation { // MultipleOfMustBePositive error for when a // multipleOf factor is negative -func MultipleOfMustBePositive(name, in string, factor interface{}) *Validation { +func MultipleOfMustBePositive(name, in string, factor any) *Validation { return &Validation{ code: MultipleOfMustBePositiveCode, Name: name, diff --git a/vendor/github.com/go-openapi/jsonpointer/.cliff.toml b/vendor/github.com/go-openapi/jsonpointer/.cliff.toml new file mode 100644 index 0000000000..ae70028b70 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.cliff.toml @@ -0,0 +1,181 @@ +# git-cliff ~ configuration file +# https://git-cliff.org/docs/configuration + +[changelog] +header = """ +""" + +footer = """ + +----- + +**[{{ remote.github.repo }}]({{ self::remote_url() }}) license terms** + +[![License][license-badge]][license-url] + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: {{ self::remote_url() }}/?tab=Apache-2.0-1-ov-file#readme + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" + +body = """ +{%- if version %} +## [{{ version | trim_start_matches(pat="v") }}]({{ self::remote_url() }}/tree/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{%- else %} +## [unreleased] +{%- endif %} +{%- if message %} + {%- raw %}\n{% endraw %} +{{ message }} + {%- raw %}\n{% endraw %} +{%- endif %} +{%- if version %} + {%- if previous.version %} + +**Full Changelog**: <{{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}> + {%- endif %} +{%- else %} + {%- raw %}\n{% endraw %} +{%- endif %} + +{%- if statistics %}{% if statistics.commit_count %} + {%- raw %}\n{% endraw %} +{{ statistics.commit_count }} commits in this release. + {%- raw %}\n{% endraw %} +{%- endif %}{% endif %} +----- + +{%- for group, commits in commits | group_by(attribute="group") %} + {%- raw %}\n{% endraw %} +### {{ group | upper_first }} + {%- raw %}\n{% endraw %} + {%- for commit in commits %} + {%- if commit.remote.pr_title %} + {%- set commit_message = commit.remote.pr_title %} + {%- else %} + {%- set commit_message = commit.message %} + {%- endif %} +* {{ commit_message | split(pat="\n") | first | trim }} + {%- if commit.remote.username %} +{%- raw %} {% endraw %}by [@{{ commit.remote.username }}](https://github.com/{{ commit.remote.username }}) + {%- endif %} + {%- if commit.remote.pr_number %} +{%- raw %} {% endraw %}in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) + {%- endif %} +{%- raw %} {% endraw %}[...]({{ self::remote_url() }}/commit/{{ commit.id }}) + {%- endfor %} +{%- endfor %} + +{%- if github %} +{%- raw %}\n{% endraw -%} + {%- set all_contributors = github.contributors | length %} + {%- if github.contributors | filter(attribute="username", value="dependabot[bot]") | length < all_contributors %} +----- + +### People who contributed to this release + {% endif %} + {%- for contributor in github.contributors | filter(attribute="username") | sort(attribute="username") %} + {%- if contributor.username != "dependabot[bot]" %} +* [@{{ contributor.username }}](https://github.com/{{ contributor.username }}) + {%- endif %} + {%- endfor %} + + {% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} +----- + {%- raw %}\n{% endraw %} + +### New Contributors + {%- endif %} + + {%- for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} + {%- if contributor.username != "dependabot[bot]" %} +* @{{ contributor.username }} made their first contribution + {%- if contributor.pr_number %} + in [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ + {%- endif %} + {%- endif %} + {%- endfor %} +{%- endif %} + +{%- raw %}\n{% endraw %} + +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} +""" +# Remove leading and trailing whitespaces from the changelog's body. +trim = true +# Render body even when there are no releases to process. +render_always = true +# An array of regex based postprocessors to modify the changelog. +postprocessors = [ + # Replace the placeholder with a URL. + #{ pattern = '', replace = "https://github.com/orhun/git-cliff" }, +] +# output file path +# output = "test.md" + +[git] +# Parse commits according to the conventional commits specification. +# See https://www.conventionalcommits.org +conventional_commits = false +# Exclude commits that do not match the conventional commits specification. +filter_unconventional = false +# Require all commits to be conventional. +# Takes precedence over filter_unconventional. +require_conventional = false +# Split commits on newlines, treating each line as an individual commit. +split_commits = false +# An array of regex based parsers to modify commit messages prior to further processing. +commit_preprocessors = [ + # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. + #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))"}, + # Check spelling of the commit message using https://github.com/crate-ci/typos. + # If the spelling is incorrect, it will be fixed automatically. + #{ pattern = '.*', replace_command = 'typos --write-changes -' } +] +# Prevent commits that are breaking from being excluded by commit parsers. +protect_breaking_commits = false +# An array of regex based parsers for extracting data from the commit message. +# Assigns commits to groups. +# Optionally sets the commit's scope and can decide to exclude commits from further processing. +commit_parsers = [ + { message = "^[Cc]hore\\([Rr]elease\\): prepare for", skip = true }, + { message = "(^[Mm]erge)|([Mm]erge conflict)", skip = true }, + { field = "author.name", pattern = "dependabot*", group = "Updates" }, + { message = "([Ss]ecurity)|([Vv]uln)", group = "Security" }, + { body = "(.*[Ss]ecurity)|([Vv]uln)", group = "Security" }, + { message = "([Cc]hore\\(lint\\))|(style)|(lint)|(codeql)|(golangci)", group = "Code quality" }, + { message = "(^[Dd]oc)|((?i)readme)|(badge)|(typo)|(documentation)", group = "Documentation" }, + { message = "(^[Ff]eat)|(^[Ee]nhancement)", group = "Implemented enhancements" }, + { message = "(^ci)|(\\(ci\\))|(fixup\\s+ci)|(fix\\s+ci)|(license)|(example)", group = "Miscellaneous tasks" }, + { message = "^test", group = "Testing" }, + { message = "(^fix)|(panic)", group = "Fixed bugs" }, + { message = "(^refact)|(rework)", group = "Refactor" }, + { message = "(^[Pp]erf)|(performance)", group = "Performance" }, + { message = "(^[Cc]hore)", group = "Miscellaneous tasks" }, + { message = "^[Rr]evert", group = "Reverted changes" }, + { message = "(upgrade.*?go)|(go\\s+version)", group = "Updates" }, + { message = ".*", group = "Other" }, +] +# Exclude commits that are not matched by any commit parser. +filter_commits = false +# An array of link parsers for extracting external references, and turning them into URLs, using regex. +link_parsers = [] +# Include only the tags that belong to the current branch. +use_branch_tags = false +# Order releases topologically instead of chronologically. +topo_order = false +# Order releases topologically instead of chronologically. +topo_order_commits = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "newest" +# Process submodules commits +recurse_submodules = false + +#[remote.github] +#owner = "go-openapi" diff --git a/vendor/github.com/go-openapi/jsonpointer/.gitignore b/vendor/github.com/go-openapi/jsonpointer/.gitignore index 769c244007..59cd294891 100644 --- a/vendor/github.com/go-openapi/jsonpointer/.gitignore +++ b/vendor/github.com/go-openapi/jsonpointer/.gitignore @@ -1 +1,4 @@ -secrets.yml +*.out +*.cov +.idea +.env diff --git a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml index d2fafb8a2b..fdae591bce 100644 --- a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml +++ b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml @@ -1,56 +1,66 @@ -linters-settings: - gocyclo: - min-complexity: 45 - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 3 - +version: "2" linters: - enable-all: true + default: all disable: - - recvcheck - - unparam - - lll - - gochecknoinits - - gochecknoglobals + - depguard - funlen - godox - - gocognit - - whitespace - - wsl - - wrapcheck - - testpackage + - exhaustruct - nlreturn - - errorlint - - nestif - - godot - - gofumpt + - nonamedreturns + - noinlineerr - paralleltest + - recvcheck + - testpackage - tparallel - - thelper - - exhaustruct - varnamelen - - gci - - depguard - - errchkjson - - inamedparam - - nonamedreturns - - musttag - - ireturn - - forcetypeassert - - cyclop - # deprecated linters - #- deadcode - #- interfacer - #- scopelint - #- varcheck - #- structcheck - #- golint - #- nosnakecase - #- maligned - #- goerr113 - #- ifshort - #- gomnd - #- exhaustivestruct + - whitespace + - wrapcheck + - wsl + - wsl_v5 + settings: + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 3 + cyclop: + max-complexity: 20 + gocyclo: + min-complexity: 20 + exhaustive: + default-signifies-exhaustive: true + default-case-required: true + lll: + line-length: 180 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + - gofumpt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + max-same-issues: 0 diff --git a/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md b/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md new file mode 100644 index 0000000000..aace4fcfb8 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md @@ -0,0 +1,24 @@ +# Contributors + +- Repository: ['go-openapi/jsonpointer'] + +| Total Contributors | Total Contributions | +| --- | --- | +| 12 | 90 | + +| Username | All Time Contribution Count | All Commits | +| --- | --- | --- | +| @fredbi | 43 | https://github.com/go-openapi/jsonpointer/commits?author=fredbi | +| @casualjim | 33 | https://github.com/go-openapi/jsonpointer/commits?author=casualjim | +| @magodo | 3 | https://github.com/go-openapi/jsonpointer/commits?author=magodo | +| @youyuanwu | 3 | https://github.com/go-openapi/jsonpointer/commits?author=youyuanwu | +| @gaiaz-iusipov | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gaiaz-iusipov | +| @gbjk | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gbjk | +| @gordallott | 1 | https://github.com/go-openapi/jsonpointer/commits?author=gordallott | +| @ianlancetaylor | 1 | https://github.com/go-openapi/jsonpointer/commits?author=ianlancetaylor | +| @mfleader | 1 | https://github.com/go-openapi/jsonpointer/commits?author=mfleader | +| @Neo2308 | 1 | https://github.com/go-openapi/jsonpointer/commits?author=Neo2308 | +| @olivierlemasle | 1 | https://github.com/go-openapi/jsonpointer/commits?author=olivierlemasle | +| @testwill | 1 | https://github.com/go-openapi/jsonpointer/commits?author=testwill | + + _this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_ diff --git a/vendor/github.com/go-openapi/jsonpointer/LICENSE b/vendor/github.com/go-openapi/jsonpointer/LICENSE index d645695673..261eeb9e9f 100644 --- a/vendor/github.com/go-openapi/jsonpointer/LICENSE +++ b/vendor/github.com/go-openapi/jsonpointer/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/vendor/github.com/go-openapi/jsonpointer/NOTICE b/vendor/github.com/go-openapi/jsonpointer/NOTICE new file mode 100644 index 0000000000..f3b51939a9 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/NOTICE @@ -0,0 +1,39 @@ +Copyright 2015-2025 go-swagger maintainers + +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +This software library, github.com/go-openapi/jsonpointer, includes software developed +by the go-swagger and go-openapi maintainers ("go-swagger maintainers"). + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this software except in compliance with the License. + +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0. + +This software is copied from, derived from, and inspired by other original software products. +It ships with copies of other software which license terms are recalled below. + +The original software was authored on 25-02-2013 by sigu-399 (https://github.com/sigu-399, sigu.399@gmail.com). + +github.com/sigh-399/jsonpointer +=========================== + +// SPDX-FileCopyrightText: Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// SPDX-License-Identifier: Apache-2.0 + +Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md index 0108f1d572..00cbfd7416 100644 --- a/vendor/github.com/go-openapi/jsonpointer/README.md +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -1,19 +1,138 @@ -# gojsonpointer [![Build Status](https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonpointer/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) +# jsonpointer -[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) -[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer.svg)](https://pkg.go.dev/github.com/go-openapi/jsonpointer) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonpointer)](https://goreportcard.com/report/github.com/go-openapi/jsonpointer) + +[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] + + + +[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] + + + +[![GoDoc][godoc-badge]][godoc-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] -An implementation of JSON Pointer - Go language +--- + +An implementation of JSON Pointer for golang, which supports go `struct`. ## Status -Completed YES -Tested YES +API is stable. + +## Import this library in your project + +```cmd +go get github.com/go-openapi/jsonpointer +``` + +## Basic usage + +See also some [examples](./examples_test.go) + +### Retrieving a value + +```go + import ( + "github.com/go-openapi/jsonpointer" + ) + + + var doc any + + ... + + pointer, err := jsonpointer.New("/foo/1") + if err != nil { + ... // error: e.g. invalid JSON pointer specification + } + + value, kind, err := pointer.Get(doc) + if err != nil { + ... // error: e.g. key not found, index out of bounds, etc. + } + + ... +``` + +### Setting a value + +```go + ... + var doc any + ... + pointer, err := jsonpointer.New("/foo/1") + if err != nil { + ... // error: e.g. invalid JSON pointer specification + } + + doc, err = p.Set(doc, "value") + if err != nil { + ... // error: e.g. key not found, index out of bounds, etc. + } +``` + +## Change log + +See ## References -http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 -### Note -The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. + + +also known as [RFC6901](https://www.rfc-editor.org/rfc/rfc6901) + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). + +See the license [NOTICE](./NOTICE), which recalls the licensing terms of all the pieces of software +on top of which it has been built. + +## Limitations + +The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, +the reference token MUST contain either...' is not implemented. + +That is because our implementation of the JSON pointer only supports explicit references to array elements: +the provision in the spec to resolve non-existent members as "the last element in the array", +using the special trailing character "-" is not implemented. + +## Other documentation + +* [All-time contributors](./CONTRIBUTORS.md) +* [Contributing guidelines](.github/CONTRIBUTING.md) +* [Maintainers documentation](docs/MAINTAINERS.md) +* [Code style](docs/STYLE.md) + + +[test-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg +[test-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml +[cov-badge]: https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg +[cov-url]: https://codecov.io/gh/go-openapi/jsonpointer +[vuln-scan-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/scanner.yml/badge.svg +[vuln-scan-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/scanner.yml +[codeql-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml/badge.svg +[codeql-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml + +[release-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg +[release-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer + +[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonpointer +[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonpointer +[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/jsonpointer +[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/jsonpointer + +[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F +[doc-url]: https://goswagger.io/go-openapi +[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer +[godoc-url]: http://pkg.go.dev/github.com/go-openapi/jsonpointer +[slack-badge]: https://slackin.goswagger.io/badge.svg +[slack-url]: https://slackin.goswagger.io + +[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg +[license-url]: https://github.com/go-openapi/jsonpointer/?tab=Apache-2.0-1-ov-file#readme + +[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/jsonpointer +[goversion-url]: https://github.com/go-openapi/jsonpointer/blob/master/go.mod +[top-badge]: https://img.shields.io/github/languages/top/go-openapi/jsonpointer +[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/jsonpointer/latest diff --git a/vendor/github.com/go-openapi/jsonpointer/SECURITY.md b/vendor/github.com/go-openapi/jsonpointer/SECURITY.md new file mode 100644 index 0000000000..2a7b6f0910 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +This policy outlines the commitment and practices of the go-openapi maintainers regarding security. + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 0.22.x | :white_check_mark: | + +## Reporting a vulnerability + +If you become aware of a security vulnerability that affects the current repository, +please report it privately to the maintainers. + +Please follow the instructions provided by github to +[Privately report a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability). + +TL;DR: on Github, navigate to the project's "Security" tab then click on "Report a vulnerability". diff --git a/vendor/github.com/go-openapi/jsonpointer/errors.go b/vendor/github.com/go-openapi/jsonpointer/errors.go index b84343d9d7..8c50dde8bc 100644 --- a/vendor/github.com/go-openapi/jsonpointer/errors.go +++ b/vendor/github.com/go-openapi/jsonpointer/errors.go @@ -1,5 +1,10 @@ +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + package jsonpointer +import "fmt" + type pointerError string func (e pointerError) Error() string { @@ -7,12 +12,24 @@ func (e pointerError) Error() string { } const ( - // ErrPointer is an error raised by the jsonpointer package + // ErrPointer is a sentinel error raised by all errors from this package. ErrPointer pointerError = "JSON pointer error" - // ErrInvalidStart states that a JSON pointer must start with a separator ("/") + // ErrInvalidStart states that a JSON pointer must start with a separator ("/"). ErrInvalidStart pointerError = `JSON pointer must be empty or start with a "` + pointerSeparator - // ErrUnsupportedValueType indicates that a value of the wrong type is being set + // ErrUnsupportedValueType indicates that a value of the wrong type is being set. ErrUnsupportedValueType pointerError = "only structs, pointers, maps and slices are supported for setting values" ) + +func errNoKey(key string) error { + return fmt.Errorf("object has no key %q: %w", key, ErrPointer) +} + +func errOutOfBounds(length, idx int) error { + return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", length-1, idx, ErrPointer) +} + +func errInvalidReference(token string) error { + return fmt.Errorf("invalid token reference %q: %w", token, ErrPointer) +} diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index a08cd68ac0..7df49af3b9 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -1,28 +1,7 @@ -// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// author sigu-399 -// author-github https://github.com/sigu-399 -// author-mail sigu.399@gmail.com -// -// repository-name jsonpointer -// repository-desc An implementation of JSON Pointer - Go language -// -// description Main and unique file. -// -// created 25-02-2013 +// SPDX-FileCopyrightText: Copyright (c) 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 +// Package jsonpointer provides a golang implementation for json pointers. package jsonpointer import ( @@ -33,7 +12,7 @@ import ( "strconv" "strings" - "github.com/go-openapi/swag" + "github.com/go-openapi/swag/jsonname" ) const ( @@ -41,70 +20,273 @@ const ( pointerSeparator = `/` ) -var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() -var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() - -// JSONPointable is an interface for structs to implement when they need to customize the -// json pointer process +// JSONPointable is an interface for structs to implement, +// when they need to customize the json pointer process or want to avoid the use of reflection. type JSONPointable interface { - JSONLookup(string) (any, error) + // JSONLookup returns a value pointed at this (unescaped) key. + JSONLookup(key string) (any, error) } -// JSONSetable is an interface for structs to implement when they need to customize the -// json pointer process +// JSONSetable is an interface for structs to implement, +// when they need to customize the json pointer process or want to avoid the use of reflection. type JSONSetable interface { - JSONSet(string, any) error + // JSONSet sets the value pointed at the (unescaped) key. + JSONSet(key string, value any) error } -// New creates a new json pointer for the given string -func New(jsonPointerString string) (Pointer, error) { +// Pointer is a representation of a json pointer. +// +// Use [Pointer.Get] to retrieve a value or [Pointer.Set] to set a value. +// +// It works with any go type interpreted as a JSON document, which means: +// +// - if a type implements [JSONPointable], its [JSONPointable.JSONLookup] method is used to resolve [Pointer.Get] +// - if a type implements [JSONSetable], its [JSONPointable.JSONSet] method is used to resolve [Pointer.Set] +// - a go map[K]V is interpreted as an object, with type K assignable to a string +// - a go slice []T is interpreted as an array +// - a go struct is interpreted as an object, with exported fields interpreted as keys +// - promoted fields from an embedded struct are traversed +// - scalars (e.g. int, float64 ...), channels, functions and go arrays cannot be traversed +// +// For struct s resolved by reflection, key mappings honor the conventional struct tag `json`. +// +// Fields that do not specify a `json` tag, or specify an empty one, or are tagged as `json:"-"` are ignored. +// +// # Limitations +// +// - Unlike go standard marshaling, untagged fields do not default to the go field name and are ignored. +// - anonymous fields are not traversed if untagged +type Pointer struct { + referenceTokens []string +} +// New creates a new json pointer from its string representation. +func New(jsonPointerString string) (Pointer, error) { var p Pointer err := p.parse(jsonPointerString) + return p, err +} +// Get uses the pointer to retrieve a value from a JSON document. +// +// It returns the value with its type as a [reflect.Kind] or an error. +func (p *Pointer) Get(document any) (any, reflect.Kind, error) { + return p.get(document, jsonname.DefaultJSONNameProvider) } -// Pointer the json pointer reprsentation -type Pointer struct { - referenceTokens []string +// Set uses the pointer to set a value from a data type +// that represent a JSON document. +// +// It returns the updated document. +func (p *Pointer) Set(document any, value any) (any, error) { + return document, p.set(document, value, jsonname.DefaultJSONNameProvider) } -// "Constructor", parses the given string JSON pointer -func (p *Pointer) parse(jsonPointerString string) error { +// DecodedTokens returns the decoded (unescaped) tokens of this JSON pointer. +func (p *Pointer) DecodedTokens() []string { + result := make([]string, 0, len(p.referenceTokens)) + for _, token := range p.referenceTokens { + result = append(result, Unescape(token)) + } - var err error + return result +} - if jsonPointerString != emptyPointer { - if !strings.HasPrefix(jsonPointerString, pointerSeparator) { - err = errors.Join(ErrInvalidStart, ErrPointer) - } else { - referenceTokens := strings.Split(jsonPointerString, pointerSeparator) - p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) - } +// IsEmpty returns true if this is an empty json pointer. +// +// This indicates that it points to the root document. +func (p *Pointer) IsEmpty() bool { + return len(p.referenceTokens) == 0 +} + +// String representation of a pointer. +func (p *Pointer) String() string { + if len(p.referenceTokens) == 0 { + return emptyPointer } - return err + return pointerSeparator + strings.Join(p.referenceTokens, pointerSeparator) } -// Get uses the pointer to retrieve a value from a JSON document -func (p *Pointer) Get(document any) (any, reflect.Kind, error) { - return p.get(document, swag.DefaultJSONNameProvider) +func (p *Pointer) Offset(document string) (int64, error) { + dec := json.NewDecoder(strings.NewReader(document)) + var offset int64 + for _, ttk := range p.DecodedTokens() { + tk, err := dec.Token() + if err != nil { + return 0, err + } + switch tk := tk.(type) { + case json.Delim: + switch tk { + case '{': + offset, err = offsetSingleObject(dec, ttk) + if err != nil { + return 0, err + } + case '[': + offset, err = offsetSingleArray(dec, ttk) + if err != nil { + return 0, err + } + default: + return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) + } + default: + return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) + } + } + return offset, nil } -// Set uses the pointer to set a value from a JSON document -func (p *Pointer) Set(document any, value any) (any, error) { - return document, p.set(document, value, swag.DefaultJSONNameProvider) +// "Constructor", parses the given string JSON pointer. +func (p *Pointer) parse(jsonPointerString string) error { + if jsonPointerString == emptyPointer { + return nil + } + + if !strings.HasPrefix(jsonPointerString, pointerSeparator) { + // non empty pointer must start with "/" + return errors.Join(ErrInvalidStart, ErrPointer) + } + + referenceTokens := strings.Split(jsonPointerString, pointerSeparator) + p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) + + return nil } -// GetForToken gets a value for a json pointer token 1 level deep -func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { - return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) +func (p *Pointer) get(node any, nameProvider *jsonname.NameProvider) (any, reflect.Kind, error) { + if nameProvider == nil { + nameProvider = jsonname.DefaultJSONNameProvider + } + + kind := reflect.Invalid + + // full document when empty + if len(p.referenceTokens) == 0 { + return node, kind, nil + } + + for _, token := range p.referenceTokens { + decodedToken := Unescape(token) + + r, knd, err := getSingleImpl(node, decodedToken, nameProvider) + if err != nil { + return nil, knd, err + } + node = r + } + + rValue := reflect.ValueOf(node) + kind = rValue.Kind() + + return node, kind, nil } -// SetForToken gets a value for a json pointer token 1 level deep -func SetForToken(document any, decodedToken string, value any) (any, error) { - return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) +func (p *Pointer) set(node, data any, nameProvider *jsonname.NameProvider) error { + knd := reflect.ValueOf(node).Kind() + + if knd != reflect.Pointer && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { + return errors.Join( + fmt.Errorf("unexpected type: %T", node), //nolint:err113 // err wrapping is carried out by errors.Join, not fmt.Errorf. + ErrUnsupportedValueType, + ErrPointer, + ) + } + + l := len(p.referenceTokens) + + // full document when empty + if l == 0 { + return nil + } + + if nameProvider == nil { + nameProvider = jsonname.DefaultJSONNameProvider + } + + var decodedToken string + lastIndex := l - 1 + + if lastIndex > 0 { // skip if we only have one token in pointer + for _, token := range p.referenceTokens[:lastIndex] { + decodedToken = Unescape(token) + next, err := p.resolveNodeForToken(node, decodedToken, nameProvider) + if err != nil { + return err + } + + node = next + } + } + + // last token + decodedToken = Unescape(p.referenceTokens[lastIndex]) + + return setSingleImpl(node, data, decodedToken, nameProvider) +} + +func (p *Pointer) resolveNodeForToken(node any, decodedToken string, nameProvider *jsonname.NameProvider) (next any, err error) { + // check for nil during traversal + if isNil(node) { + return nil, fmt.Errorf("cannot traverse through nil value at %q: %w", decodedToken, ErrPointer) + } + + pointable, ok := node.(JSONPointable) + if ok { + r, err := pointable.JSONLookup(decodedToken) + if err != nil { + return nil, err + } + + fld := reflect.ValueOf(r) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Pointer { + return fld.Addr().Interface(), nil + } + + return r, nil + } + + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() + + switch kind { + case reflect.Struct: + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return nil, fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) + } + + return typeFromValue(rValue.FieldByName(nm)), nil + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + mv := rValue.MapIndex(kv) + + if !mv.IsValid() { + return nil, errNoKey(decodedToken) + } + + return typeFromValue(mv), nil + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return nil, errors.Join(err, ErrPointer) + } + + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return nil, errOutOfBounds(sLength, tokenIndex) + } + + return typeFromValue(rValue.Index(tokenIndex)), nil + + default: + return nil, errInvalidReference(decodedToken) + } } func isNil(input any) bool { @@ -113,15 +295,33 @@ func isNil(input any) bool { } kind := reflect.TypeOf(input).Kind() - switch kind { //nolint:exhaustive - case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: + switch kind { + case reflect.Pointer, reflect.Map, reflect.Slice, reflect.Chan: return reflect.ValueOf(input).IsNil() default: return false } } -func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { +func typeFromValue(v reflect.Value) any { + if v.CanAddr() && v.Kind() != reflect.Interface && v.Kind() != reflect.Map && v.Kind() != reflect.Slice && v.Kind() != reflect.Pointer { + return v.Addr().Interface() + } + + return v.Interface() +} + +// GetForToken gets a value for a json pointer token 1 level deep. +func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { + return getSingleImpl(document, decodedToken, jsonname.DefaultJSONNameProvider) +} + +// SetForToken sets a value for a json pointer token 1 level deep. +func SetForToken(document any, decodedToken string, value any) (any, error) { + return document, setSingleImpl(document, value, decodedToken, jsonname.DefaultJSONNameProvider) +} + +func getSingleImpl(node any, decodedToken string, nameProvider *jsonname.NameProvider) (any, reflect.Kind, error) { rValue := reflect.Indirect(reflect.ValueOf(node)) kind := rValue.Kind() if isNil(node) { @@ -139,13 +339,15 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide return getSingleImpl(*typed, decodedToken, nameProvider) } - switch kind { //nolint:exhaustive + switch kind { case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return nil, kind, fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) } + fld := rValue.FieldByName(nm) + return fld.Interface(), kind, nil case reflect.Map: @@ -155,261 +357,100 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide if mv.IsValid() { return mv.Interface(), kind, nil } - return nil, kind, fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer) + + return nil, kind, errNoKey(decodedToken) case reflect.Slice: tokenIndex, err := strconv.Atoi(decodedToken) if err != nil { - return nil, kind, err + return nil, kind, errors.Join(err, ErrPointer) } sLength := rValue.Len() if tokenIndex < 0 || tokenIndex >= sLength { - return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength-1, tokenIndex, ErrPointer) + return nil, kind, errOutOfBounds(sLength, tokenIndex) } elem := rValue.Index(tokenIndex) return elem.Interface(), kind, nil default: - return nil, kind, fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) + return nil, kind, errInvalidReference(decodedToken) } - } -func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameProvider) error { - rValue := reflect.Indirect(reflect.ValueOf(node)) +func setSingleImpl(node, data any, decodedToken string, nameProvider *jsonname.NameProvider) error { + // check for nil to prevent panic when calling rValue.Type() + if isNil(node) { + return fmt.Errorf("cannot set field %q on nil value: %w", decodedToken, ErrPointer) + } - if ns, ok := node.(JSONSetable); ok { // pointer impl + if ns, ok := node.(JSONSetable); ok { return ns.JSONSet(decodedToken, data) } - if rValue.Type().Implements(jsonSetableType) { - return node.(JSONSetable).JSONSet(decodedToken, data) - } + rValue := reflect.Indirect(reflect.ValueOf(node)) - switch rValue.Kind() { //nolint:exhaustive + switch rValue.Kind() { case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) } + fld := rValue.FieldByName(nm) - if fld.IsValid() { - fld.Set(reflect.ValueOf(data)) + if !fld.CanSet() { + return fmt.Errorf("can't set struct field %s to %v: %w", nm, data, ErrPointer) } + + value := reflect.ValueOf(data) + valueType := value.Type() + assignedType := fld.Type() + + if !valueType.AssignableTo(assignedType) { + return fmt.Errorf("can't set value with type %T to field %s with type %v: %w", data, nm, assignedType, ErrPointer) + } + + fld.Set(value) + return nil case reflect.Map: kv := reflect.ValueOf(decodedToken) rValue.SetMapIndex(kv, reflect.ValueOf(data)) + return nil case reflect.Slice: tokenIndex, err := strconv.Atoi(decodedToken) if err != nil { - return err + return errors.Join(err, ErrPointer) } + sLength := rValue.Len() if tokenIndex < 0 || tokenIndex >= sLength { - return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer) + return errOutOfBounds(sLength, tokenIndex) } elem := rValue.Index(tokenIndex) if !elem.CanSet() { return fmt.Errorf("can't set slice index %s to %v: %w", decodedToken, data, ErrPointer) } - elem.Set(reflect.ValueOf(data)) - return nil - - default: - return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) - } - -} -func (p *Pointer) get(node any, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { + value := reflect.ValueOf(data) + valueType := value.Type() + assignedType := elem.Type() - if nameProvider == nil { - nameProvider = swag.DefaultJSONNameProvider - } - - kind := reflect.Invalid - - // Full document when empty - if len(p.referenceTokens) == 0 { - return node, kind, nil - } - - for _, token := range p.referenceTokens { - decodedToken := Unescape(token) - - r, knd, err := getSingleImpl(node, decodedToken, nameProvider) - if err != nil { - return nil, knd, err + if !valueType.AssignableTo(assignedType) { + return fmt.Errorf("can't set value with type %T to slice element %d with type %v: %w", data, tokenIndex, assignedType, ErrPointer) } - node = r - } - - rValue := reflect.ValueOf(node) - kind = rValue.Kind() - return node, kind, nil -} + elem.Set(value) -func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error { - knd := reflect.ValueOf(node).Kind() - - if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { - return errors.Join( - ErrUnsupportedValueType, - ErrPointer, - ) - } - - if nameProvider == nil { - nameProvider = swag.DefaultJSONNameProvider - } - - // Full document when empty - if len(p.referenceTokens) == 0 { return nil - } - - lastI := len(p.referenceTokens) - 1 - for i, token := range p.referenceTokens { - isLastToken := i == lastI - decodedToken := Unescape(token) - - if isLastToken { - - return setSingleImpl(node, data, decodedToken, nameProvider) - } - - rValue := reflect.Indirect(reflect.ValueOf(node)) - kind := rValue.Kind() - - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) - if err != nil { - return err - } - fld := reflect.ValueOf(r) - if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { - node = fld.Addr().Interface() - continue - } - node = r - continue - } - - switch kind { //nolint:exhaustive - case reflect.Struct: - nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) - if !ok { - return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer) - } - fld := rValue.FieldByName(nm) - if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { - node = fld.Addr().Interface() - continue - } - node = fld.Interface() - - case reflect.Map: - kv := reflect.ValueOf(decodedToken) - mv := rValue.MapIndex(kv) - - if !mv.IsValid() { - return fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer) - } - if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Ptr { - node = mv.Addr().Interface() - continue - } - node = mv.Interface() - - case reflect.Slice: - tokenIndex, err := strconv.Atoi(decodedToken) - if err != nil { - return err - } - sLength := rValue.Len() - if tokenIndex < 0 || tokenIndex >= sLength { - return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer) - } - - elem := rValue.Index(tokenIndex) - if elem.CanAddr() && elem.Kind() != reflect.Interface && elem.Kind() != reflect.Map && elem.Kind() != reflect.Slice && elem.Kind() != reflect.Ptr { - node = elem.Addr().Interface() - continue - } - node = elem.Interface() - - default: - return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer) - } - - } - - return nil -} - -// DecodedTokens returns the decoded tokens -func (p *Pointer) DecodedTokens() []string { - result := make([]string, 0, len(p.referenceTokens)) - for _, t := range p.referenceTokens { - result = append(result, Unescape(t)) - } - return result -} - -// IsEmpty returns true if this is an empty json pointer -// this indicates that it points to the root document -func (p *Pointer) IsEmpty() bool { - return len(p.referenceTokens) == 0 -} - -// Pointer to string representation function -func (p *Pointer) String() string { - - if len(p.referenceTokens) == 0 { - return emptyPointer - } - pointerString := pointerSeparator + strings.Join(p.referenceTokens, pointerSeparator) - - return pointerString -} - -func (p *Pointer) Offset(document string) (int64, error) { - dec := json.NewDecoder(strings.NewReader(document)) - var offset int64 - for _, ttk := range p.DecodedTokens() { - tk, err := dec.Token() - if err != nil { - return 0, err - } - switch tk := tk.(type) { - case json.Delim: - switch tk { - case '{': - offset, err = offsetSingleObject(dec, ttk) - if err != nil { - return 0, err - } - case '[': - offset, err = offsetSingleArray(dec, ttk) - if err != nil { - return 0, err - } - default: - return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) - } - default: - return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) - } + default: + return errInvalidReference(decodedToken) } - return offset, nil } func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { @@ -439,13 +480,14 @@ func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer) } } + return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer) } func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { idx, err := strconv.Atoi(decodedToken) if err != nil { - return 0, fmt.Errorf("token reference %q is not a number: %v: %w", decodedToken, err, ErrPointer) + return 0, fmt.Errorf("token reference %q is not a number: %w: %w", decodedToken, err, ErrPointer) } var i int for i = 0; i < idx && dec.More(); i++ { @@ -471,10 +513,12 @@ func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { if !dec.More() { return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer) } + return dec.InputOffset(), nil } // drainSingle drains a single level of object or array. +// // The decoder has to guarantee the beginning delim (i.e. '{' or '[') has been consumed. func drainSingle(dec *json.Decoder) error { for dec.More() { @@ -496,14 +540,15 @@ func drainSingle(dec *json.Decoder) error { } } - // Consumes the ending delim + // consumes the ending delim if _, err := dec.Token(); err != nil { return err } + return nil } -// Specific JSON pointer encoding here +// JSON pointer encoding: // ~0 => ~ // ~1 => / // ... and vice versa @@ -515,16 +560,24 @@ const ( decRefTok1 = `/` ) -// Unescape unescapes a json pointer reference token string to the original representation +var ( + encRefTokReplacer = strings.NewReplacer(encRefTok1, decRefTok1, encRefTok0, decRefTok0) //nolint:gochecknoglobals // it's okay to declare a replacer as a private global + decRefTokReplacer = strings.NewReplacer(decRefTok1, encRefTok1, decRefTok0, encRefTok0) //nolint:gochecknoglobals // it's okay to declare a replacer as a private global +) + +// Unescape unescapes a json pointer reference token string to the original representation. func Unescape(token string) string { - step1 := strings.ReplaceAll(token, encRefTok1, decRefTok1) - step2 := strings.ReplaceAll(step1, encRefTok0, decRefTok0) - return step2 + return encRefTokReplacer.Replace(token) } -// Escape escapes a pointer reference token string +// Escape escapes a pointer reference token string. +// +// The JSONPointer specification defines "/" as a separator and "~" as an escape prefix. +// +// Keys containing such characters are escaped with the following rules: +// +// - "~" is escaped as "~0" +// - "/" is escaped as "~1" func Escape(token string) string { - step1 := strings.ReplaceAll(token, decRefTok0, encRefTok0) - step2 := strings.ReplaceAll(step1, decRefTok1, encRefTok1) - return step2 + return decRefTokReplacer.Replace(token) } diff --git a/vendor/github.com/go-openapi/strfmt/.golangci.yml b/vendor/github.com/go-openapi/strfmt/.golangci.yml index 22f8d21cca..1ad5adf47e 100644 --- a/vendor/github.com/go-openapi/strfmt/.golangci.yml +++ b/vendor/github.com/go-openapi/strfmt/.golangci.yml @@ -1,61 +1,75 @@ -linters-settings: - govet: - check-shadowing: true - golint: - min-confidence: 0 - gocyclo: - min-complexity: 45 - maligned: - suggest-new: true - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 3 - +version: "2" linters: - enable-all: true + default: all disable: - - maligned - - unparam - - lll - - gochecknoinits - - gochecknoglobals + - cyclop + - depguard + - errchkjson + - errorlint + - exhaustruct + - forcetypeassert - funlen - - godox + - gochecknoglobals + - gochecknoinits - gocognit - - whitespace - - wsl - - wrapcheck - - testpackage - - nlreturn - - gomnd - - exhaustivestruct - - goerr113 - - errorlint - - nestif - godot - - gofumpt + - godox + - gosmopolitan + - inamedparam + - intrange + - ireturn + - lll + - musttag + - nestif + - nlreturn + - nonamedreturns + - noinlineerr - paralleltest - - tparallel + - recvcheck + - testpackage - thelper - - ifshort - - exhaustruct + - tparallel + - unparam - varnamelen - - gci - - depguard - - errchkjson - - inamedparam - - nonamedreturns - - musttag - - ireturn - - forcetypeassert - - cyclop - # deprecated linters - - deadcode - - interfacer - - scopelint - - varcheck - - structcheck - - golint - - nosnakecase + - whitespace + - wrapcheck + - wsl + - wsl_v5 + settings: + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 3 + gocyclo: + min-complexity: 45 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + max-same-issues: 0 diff --git a/vendor/github.com/go-openapi/strfmt/README.md b/vendor/github.com/go-openapi/strfmt/README.md index f6b39c6c56..de5afe1376 100644 --- a/vendor/github.com/go-openapi/strfmt/README.md +++ b/vendor/github.com/go-openapi/strfmt/README.md @@ -35,7 +35,7 @@ It also provides convenient extensions to go-openapi users. - mac (e.g "01:02:03:04:05:06") - rgbcolor (e.g. "rgb(100,100,100)") - ssn - - uuid, uuid3, uuid4, uuid5 + - uuid, uuid3, uuid4, uuid5, uuid7 - cidr (e.g. "192.0.2.1/24", "2001:db8:a0b:12f0::1/32") - ulid (e.g. "00000PP9HGSBSSDZ1JTEXBJ0PW", [spec](https://github.com/ulid/spec)) @@ -81,7 +81,12 @@ List of defined types: - SSN - URI - UUID -- UUID3 -- UUID4 -- UUID5 +- [UUID3](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-3) +- [UUID4](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-4) +- [UUID5](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-5) +- [UUID7](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-7) - [ULID](https://github.com/ulid/spec) + +## Licensing + +This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). diff --git a/vendor/github.com/go-openapi/strfmt/bson.go b/vendor/github.com/go-openapi/strfmt/bson.go index cfa9a526fe..0eec8f6432 100644 --- a/vendor/github.com/go-openapi/strfmt/bson.go +++ b/vendor/github.com/go-openapi/strfmt/bson.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -18,9 +7,6 @@ import ( "database/sql/driver" "fmt" - "go.mongodb.org/mongo-driver/bson" - - "go.mongodb.org/mongo-driver/bson/bsontype" bsonprim "go.mongodb.org/mongo-driver/bson/primitive" ) @@ -39,10 +25,10 @@ func IsBSONObjectID(str string) bool { // ObjectId represents a BSON object ID (alias to go.mongodb.org/mongo-driver/bson/primitive.ObjectID) // // swagger:strfmt bsonobjectid -type ObjectId bsonprim.ObjectID //nolint:revive,stylecheck +type ObjectId bsonprim.ObjectID //nolint:revive // NewObjectId creates a ObjectId from a Hex String -func NewObjectId(hex string) ObjectId { //nolint:revive,stylecheck +func NewObjectId(hex string) ObjectId { //nolint:revive oid, err := bsonprim.ObjectIDFromHex(hex) if err != nil { panic(err) @@ -75,7 +61,7 @@ func (id *ObjectId) UnmarshalText(data []byte) error { // validation is performe } // Scan read a value from a database driver -func (id *ObjectId) Scan(raw interface{}) error { +func (id *ObjectId) Scan(raw any) error { var data []byte switch v := raw.(type) { case []byte: @@ -83,7 +69,7 @@ func (id *ObjectId) Scan(raw interface{}) error { case string: data = []byte(v) default: - return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v", v) + return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v: %w", v, ErrFormat) } return id.UnmarshalText(data) @@ -113,42 +99,6 @@ func (id *ObjectId) UnmarshalJSON(data []byte) error { return nil } -// MarshalBSON renders the object id as a BSON document -func (id ObjectId) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": bsonprim.ObjectID(id)}) -} - -// UnmarshalBSON reads the objectId from a BSON document -func (id *ObjectId) UnmarshalBSON(data []byte) error { - var obj struct { - Data bsonprim.ObjectID - } - if err := bson.Unmarshal(data, &obj); err != nil { - return err - } - *id = ObjectId(obj.Data) - return nil -} - -// MarshalBSONValue is an interface implemented by types that can marshal themselves -// into a BSON document represented as bytes. The bytes returned must be a valid -// BSON document if the error is nil. -func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) { - oid := bsonprim.ObjectID(id) - return bson.TypeObjectID, oid[:], nil -} - -// UnmarshalBSONValue is an interface implemented by types that can unmarshal a -// BSON value representation of themselves. The BSON bytes and type can be -// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it -// wishes to retain the data after returning. -func (id *ObjectId) UnmarshalBSONValue(_ bsontype.Type, data []byte) error { - var oid bsonprim.ObjectID - copy(oid[:], data) - *id = ObjectId(oid) - return nil -} - // DeepCopyInto copies the receiver and writes its value into out. func (id *ObjectId) DeepCopyInto(out *ObjectId) { *out = *id diff --git a/vendor/github.com/go-openapi/strfmt/date.go b/vendor/github.com/go-openapi/strfmt/date.go index 3c93381c7c..8aa17b8ea5 100644 --- a/vendor/github.com/go-openapi/strfmt/date.go +++ b/vendor/github.com/go-openapi/strfmt/date.go @@ -1,27 +1,13 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt import ( "database/sql/driver" "encoding/json" - "errors" "fmt" "time" - - "go.mongodb.org/mongo-driver/bson" ) func init() { @@ -71,7 +57,7 @@ func (d Date) MarshalText() ([]byte, error) { } // Scan scans a Date value from database driver type. -func (d *Date) Scan(raw interface{}) error { +func (d *Date) Scan(raw any) error { switch v := raw.(type) { case []byte: return d.UnmarshalText(v) @@ -84,7 +70,7 @@ func (d *Date) Scan(raw interface{}) error { *d = Date{} return nil default: - return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v", v) + return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v: %w", v, ErrFormat) } } @@ -115,28 +101,6 @@ func (d *Date) UnmarshalJSON(data []byte) error { return nil } -func (d Date) MarshalBSON() ([]byte, error) { - return bson.Marshal(bson.M{"data": d.String()}) -} - -func (d *Date) UnmarshalBSON(data []byte) error { - var m bson.M - if err := bson.Unmarshal(data, &m); err != nil { - return err - } - - if data, ok := m["data"].(string); ok { - rd, err := time.ParseInLocation(RFC3339FullDate, data, DefaultTimeLocation) - if err != nil { - return err - } - *d = Date(rd) - return nil - } - - return errors.New("couldn't unmarshal bson bytes value as Date") -} - // DeepCopyInto copies the receiver and writes its value into out. func (d *Date) DeepCopyInto(out *Date) { *out = *d diff --git a/vendor/github.com/go-openapi/strfmt/default.go b/vendor/github.com/go-openapi/strfmt/default.go index 2813714060..8a80cfbdb8 100644 --- a/vendor/github.com/go-openapi/strfmt/default.go +++ b/vendor/github.com/go-openapi/strfmt/default.go @@ -1,16 +1,5 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 package strfmt @@ -18,46 +7,24 @@ import ( "database/sql/driver" "encoding/base64" "encoding/json" - "errors" "fmt" + "net" "net/mail" + "net/netip" + "net/url" "regexp" + "strconv" "strings" - "github.com/asaskevich/govalidator" "github.com/google/uuid" - "go.mongodb.org/mongo-driver/bson" + "golang.org/x/net/idna" ) const ( - // HostnamePattern http://json-schema.org/latest/json-schema-validation.html#anchor114 - // A string instance is valid against this attribute if it is a valid - // representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // http://tools.ietf.org/html/rfc1034#section-3.5 - // ::= any one of the ten digits 0 through 9 - // var digit = /[0-9]/; - // ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case - // var letter = /[a-zA-Z]/; - // ::= | - // var letDig = /[0-9a-zA-Z]/; - // ::= | "-" - // var letDigHyp = /[-0-9a-zA-Z]/; - // ::= | - // var ldhStr = /[-0-9a-zA-Z]+/; - //